yoto_story_compile
Compile a story graph into an interactive Yoto card, simulate player presses to verify the walk, and return a diff-based write plan for review before applying.
Instructions
Compile a story graph into an interactive card, walk it like the player would, and (if the walk is clean) return a plan writing it to card (a title, or "new"). Show the user the simulator result and the diff, then yoto_card_apply.
A graph: {"start"?: id, "nodes": [{"id", "type": "choice"|"segment"|"end", "title",
"tracks": [{"title", "audio": "yoto:#…" | media | asset name, "icon"?}], "next"?: id|"stop",
"left"?: id, "right"?: id}], "assets"?: {name: media}, "expect"?: [{"presses": ["right", "left"],
"plays": [node ids]}]}. A choice waits for a button; a segment plays on to next; an end stops.
Node order is chapter (dial) order, with the start node first. Full schema: yoto://schema/story-graph.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"graph": "<graph>",
"title": "<title>"
},
"name": "yoto_story_compile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| card | No | new | |
| cover | No | ||
| graph | Yes | ||
| title | Yes | ||
| config | No | ||
| account | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||