{
  "_readme": [
    "Client tool definitions for the Illustrated Primer agent. Add these under Tools in the",
    "ElevenLabs agent dashboard. Names and parameter ids are case-sensitive and must match",
    "the handlers registered in zoo.html (see the REAL map).",
    "",
    "ALSO REQUIRED, and easy to miss: turn on the `audio` client event in the agent's",
    "Advanced settings. Without it onAudioAlignment never fires and the read-along",
    "highlighting stays silent -- the pages still work, they just never light up.",
    "",
    "`beats` is declared as a string carrying a JSON array because that type is supported",
    "everywhere. If your dashboard offers a real array/object parameter type, that works",
    "too -- the client accepts either."
  ],
  "tools": [
    {
      "type": "client",
      "name": "show_page",
      "description": "Illustrate the book. Call this BEFORE speaking your answer about an animal, so the picture is on the page as you begin talking.",
      "expects_response": true,
      "response_timeout_secs": 5,
      "parameters": [
        {
          "id": "headline",
          "type": "string",
          "value_type": "llm_prompt",
          "description": "Two or three words, like 'The Deep' or 'Tiny Giants'.",
          "required": true
        },
        {
          "id": "sentence",
          "type": "string",
          "value_type": "llm_prompt",
          "description": "ONE sentence - exactly one full stop. Say it in your own words; the book writes down what you actually say. Keep it close in meaning and length to what you will say, and name the animal inside it, because the picture is chosen from it.",
          "required": true
        },
        {
          "id": "subjects",
          "type": "string",
          "value_type": "llm_prompt",
          "description": "One to three names from the library, comma separated, most important first.",
          "required": true
        }
      ]
    },
    {
      "type": "client",
      "name": "begin_story",
      "description": "Start a multi-page story. Call this ONCE with every beat planned up front; the book builds and loads all the pages before you speak. Then tell beat one and use story_beat for each beat after it.",
      "expects_response": true,
      "response_timeout_secs": 15,
      "parameters": [
        {
          "id": "title",
          "type": "string",
          "value_type": "llm_prompt",
          "description": "What the story is called.",
          "required": true
        },
        {
          "id": "beats",
          "type": "string",
          "value_type": "llm_prompt",
          "description": "A JSON array of three to six beats, in order. Each is an object with 'headline' (two or three words), 'sentence' (exactly ONE sentence - the book turns the page every time you finish a sentence, so one sentence is one page) and 'subjects' (comma separated library names; give each beat its own). Example: [{\"headline\":\"Setting Out\",\"sentence\":\"The little octopus left her cave for the first time.\",\"subjects\":\"Octopus\"}]",
          "required": true
        }
      ]
    },
    {
      "type": "client",
      "name": "story_beat",
      "description": "Optional. Marks which beat you have reached. The book turns its own pages by listening, so do not wait for this or depend on it.",
      "expects_response": true,
      "response_timeout_secs": 5,
      "parameters": [
        {
          "id": "index",
          "type": "integer",
          "value_type": "llm_prompt",
          "description": "Which beat to show, counting from 1.",
          "required": true
        }
      ]
    },
    {
      "type": "client",
      "name": "end_story",
      "description": "Close the current story when it is finished, before going back to ordinary questions and answers.",
      "expects_response": true,
      "response_timeout_secs": 5,
      "parameters": []
    },
    {
      "type": "client",
      "name": "remember_name",
      "description": "Remember what the child would like to be called, so the book can greet them by name next time. Call this as soon as they tell you.",
      "expects_response": true,
      "response_timeout_secs": 5,
      "parameters": [
        {
          "id": "name",
          "type": "string",
          "value_type": "llm_prompt",
          "description": "The name the child gave, exactly as they said it.",
          "required": true
        }
      ]
    }
  ]
}