MCP tools
《夜如何》MCP server 目前暴露 10 个 tool,按玩家 flow 顺序列出。所有 tool 元数据由 scripts/export_tools_md.ts 从 src/mcp/tools/*.ts 的 registerXxx 直接抽出,跟 server 的 tools/list 响应严格同源。
机器可读版:/tools.json(含完整 JSON Schema)。
start_run
Start a new run
New Shuran run: identifier and any carried relic.
Input:
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
carried_relic_id | uuid | null |
open_night
Open a new night in daytime phase
New night in daytime phase for white-day actions before entering speaking.
Input:
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
run_id | uuid | ✓ |
start_night
Enter speaking phase
Locked oil cap and speaking-phase state for tonight (transitions daytime → speaking).
Input:
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
run_id | uuid | ✓ | |
night_id | uuid | ✓ |
daytime_action
Daytime action
Daytime move record (打听 / 播种 / 交换 / 布置) with resulting reward, if any.
Input:
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
run_id | uuid | ✓ | |
night_id | uuid | ✓ | |
action_type | enum: 打听 | 播种 | 交换 | 布置 | ✓ | |
target | string (0..200) | ||
payload | object |
speak_to_king
Speak to the King
One narrative turn: King's reply, oil accounting, forced-dawn signal.
Input:
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
run_id | uuid | ✓ | |
night_id | uuid | ✓ | |
text | string (1..4000) | ✓ | narrative text from Shuran for this turn |
bring_relic
Bring a relic to the King tonight
Presentation event of a relic before the King tonight.
Input:
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
run_id | uuid | ✓ | |
night_id | uuid | ✓ | |
relic_id | uuid | ✓ |
use_continue_lamp
Use one continue-lamp charge
Continue-lamp charge consumption: new oil cap and remaining lamps.
Input:
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
run_id | uuid | ✓ | |
night_id | uuid | ✓ |
end_night
Reach dawn
Dawn verdict for tonight: survival, concepts, cheats, relic mutations.
Input:
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
run_id | uuid | ✓ | |
night_id | uuid | ✓ |
list_relics
List relics owned by this player
Relics alive under this account, each with name / origin / current meaning.
Input: none
get_state
Snapshot of current run and night
Snapshot of the run and current night; welcome and tools flow when run_id omitted.
Input:
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
run_id | uuid | ||
night_id | uuid |
响应体里每个 tool 都带 next_step 中文引导字段(list_relics 除外——那是纯 array)。玩家侧 AI 遵循 next_step 即可跑完整 flow。