{
  "tools": [
    {
      "name": "start_run",
      "title": "Start a new run",
      "description": "New Shuran run: identifier and any carried relic.",
      "input_schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "carried_relic_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "input_fields": [
        {
          "name": "carried_relic_id",
          "type": "uuid | null",
          "required": false
        }
      ]
    },
    {
      "name": "open_night",
      "title": "Open a new night in daytime phase",
      "description": "New night in daytime phase for white-day actions before entering speaking.",
      "input_schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "run_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "run_id"
        ],
        "additionalProperties": false
      },
      "input_fields": [
        {
          "name": "run_id",
          "type": "uuid",
          "required": true
        }
      ]
    },
    {
      "name": "start_night",
      "title": "Enter speaking phase",
      "description": "Locked oil cap and speaking-phase state for tonight (transitions daytime → speaking).",
      "input_schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "run_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "night_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "run_id",
          "night_id"
        ],
        "additionalProperties": false
      },
      "input_fields": [
        {
          "name": "run_id",
          "type": "uuid",
          "required": true
        },
        {
          "name": "night_id",
          "type": "uuid",
          "required": true
        }
      ]
    },
    {
      "name": "daytime_action",
      "title": "Daytime action",
      "description": "Daytime move record (打听 / 播种 / 交换 / 布置) with resulting reward, if any.",
      "input_schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "run_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "night_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "action_type": {
            "type": "string",
            "enum": [
              "打听",
              "播种",
              "交换",
              "布置"
            ]
          },
          "target": {
            "type": "string",
            "maxLength": 200
          },
          "payload": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "run_id",
          "night_id",
          "action_type"
        ],
        "additionalProperties": false
      },
      "input_fields": [
        {
          "name": "run_id",
          "type": "uuid",
          "required": true
        },
        {
          "name": "night_id",
          "type": "uuid",
          "required": true
        },
        {
          "name": "action_type",
          "type": "enum: `打听` | `播种` | `交换` | `布置`",
          "required": true
        },
        {
          "name": "target",
          "type": "string (0..200)",
          "required": false
        },
        {
          "name": "payload",
          "type": "object",
          "required": false
        }
      ]
    },
    {
      "name": "speak_to_king",
      "title": "Speak to the King",
      "description": "One narrative turn: King's reply, oil accounting, forced-dawn signal.",
      "input_schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "run_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "night_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000,
            "description": "narrative text from Shuran for this turn"
          }
        },
        "required": [
          "run_id",
          "night_id",
          "text"
        ],
        "additionalProperties": false
      },
      "input_fields": [
        {
          "name": "run_id",
          "type": "uuid",
          "required": true
        },
        {
          "name": "night_id",
          "type": "uuid",
          "required": true
        },
        {
          "name": "text",
          "type": "string (1..4000)",
          "required": true,
          "description": "narrative text from Shuran for this turn"
        }
      ]
    },
    {
      "name": "bring_relic",
      "title": "Bring a relic to the King tonight",
      "description": "Presentation event of a relic before the King tonight.",
      "input_schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "run_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "night_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "relic_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "run_id",
          "night_id",
          "relic_id"
        ],
        "additionalProperties": false
      },
      "input_fields": [
        {
          "name": "run_id",
          "type": "uuid",
          "required": true
        },
        {
          "name": "night_id",
          "type": "uuid",
          "required": true
        },
        {
          "name": "relic_id",
          "type": "uuid",
          "required": true
        }
      ]
    },
    {
      "name": "use_continue_lamp",
      "title": "Use one continue-lamp charge",
      "description": "Continue-lamp charge consumption: new oil cap and remaining lamps.",
      "input_schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "run_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "night_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "run_id",
          "night_id"
        ],
        "additionalProperties": false
      },
      "input_fields": [
        {
          "name": "run_id",
          "type": "uuid",
          "required": true
        },
        {
          "name": "night_id",
          "type": "uuid",
          "required": true
        }
      ]
    },
    {
      "name": "end_night",
      "title": "Reach dawn",
      "description": "Dawn verdict for tonight: survival, concepts, cheats, relic mutations.",
      "input_schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "run_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "night_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "run_id",
          "night_id"
        ],
        "additionalProperties": false
      },
      "input_fields": [
        {
          "name": "run_id",
          "type": "uuid",
          "required": true
        },
        {
          "name": "night_id",
          "type": "uuid",
          "required": true
        }
      ]
    },
    {
      "name": "list_relics",
      "title": "List relics owned by this player",
      "description": "Relics alive under this account, each with name / origin / current meaning.",
      "input_schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "input_fields": []
    },
    {
      "name": "get_state",
      "title": "Snapshot of current run and night",
      "description": "Snapshot of the run and current night; welcome and tools flow when run_id omitted.",
      "input_schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "run_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "night_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "additionalProperties": false
      },
      "input_fields": [
        {
          "name": "run_id",
          "type": "uuid",
          "required": false
        },
        {
          "name": "night_id",
          "type": "uuid",
          "required": false
        }
      ]
    }
  ]
}