{
  "$comment": "The fixed test set for tool-call-reliability.py (Part 24). Four tools with deliberately different argument shapes - two strings, an integer with bounds, an enum, an optional parameter - and twenty prompts, fifteen of which should produce exactly one named call and five of which should produce no call at all. The no-call cases are the half people leave out, and they are what catch a model or a tool_choice setting that calls something on every turn. Edit the cases to match your own tools once you have run it as shipped; keep the no-call cases.",
  "version": "1",
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "search_notes",
        "description": "Search the local note collection for passages matching a query. Returns matching passages with their file names. Use this when the answer might be written down in the user's own notes rather than known in general.",
        "parameters": {
          "type": "object",
          "properties": {
            "query": {
              "type": "string",
              "description": "The search terms, as words rather than a question."
            },
            "limit": {
              "type": "integer",
              "description": "How many passages to return, between 1 and 20. Defaults to 5.",
              "minimum": 1,
              "maximum": 20
            }
          },
          "required": ["query"],
          "additionalProperties": false
        }
      }
    },
    {
      "type": "function",
      "function": {
        "name": "read_file",
        "description": "Read one text file from the workspace and return its contents. The path must be relative to the workspace root and must not contain '..'.",
        "parameters": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string",
              "description": "A path relative to the workspace root, for example 'notes/backup.md'."
            }
          },
          "required": ["path"],
          "additionalProperties": false
        }
      }
    },
    {
      "type": "function",
      "function": {
        "name": "run_tests",
        "description": "Run the project's test suite and return the summary line. Optionally restrict the run to one target.",
        "parameters": {
          "type": "object",
          "properties": {
            "target": {
              "type": "string",
              "description": "A test file or directory to run. Omit to run everything."
            }
          },
          "required": [],
          "additionalProperties": false
        }
      }
    },
    {
      "type": "function",
      "function": {
        "name": "convert_memory",
        "description": "Convert a memory figure between gigabytes and gibibytes. Use this whenever a unit conversion is needed rather than doing the arithmetic yourself.",
        "parameters": {
          "type": "object",
          "properties": {
            "value": {
              "type": "number",
              "description": "The figure to convert."
            },
            "from_unit": {
              "type": "string",
              "description": "The unit the figure is in.",
              "enum": ["GB", "GiB"]
            },
            "to_unit": {
              "type": "string",
              "description": "The unit to convert to.",
              "enum": ["GB", "GiB"]
            }
          },
          "required": ["value", "from_unit", "to_unit"],
          "additionalProperties": false
        }
      }
    }
  ],
  "cases": [
    {
      "id": "search-1",
      "prompt": "What did I write in my notes about the backup window?",
      "expect_tool": "search_notes",
      "expect_args": { "query": { "contains": "backup" } }
    },
    {
      "id": "search-2",
      "prompt": "Look through my notes for anything about the office printer and show me the three best matches.",
      "expect_tool": "search_notes",
      "expect_args": { "query": { "contains": "printer" }, "limit": { "equals": 3 } }
    },
    {
      "id": "search-3",
      "prompt": "Did I record a decision about which quantisation to use? Check my notes.",
      "expect_tool": "search_notes",
      "expect_args": { "query": { "contains": "quantis" } }
    },
    {
      "id": "search-4",
      "prompt": "Find the passages in my notes that mention the wifi upgrade.",
      "expect_tool": "search_notes",
      "expect_args": { "query": { "contains": "wifi" } }
    },
    {
      "id": "read-1",
      "prompt": "Show me the contents of notes/backup.md.",
      "expect_tool": "read_file",
      "expect_args": { "path": { "equals": "notes/backup.md" } }
    },
    {
      "id": "read-2",
      "prompt": "Open README.md and tell me what the project is for.",
      "expect_tool": "read_file",
      "expect_args": { "path": { "equals": "README.md" } }
    },
    {
      "id": "read-3",
      "prompt": "I need to see src/config/settings.toml.",
      "expect_tool": "read_file",
      "expect_args": { "path": { "equals": "src/config/settings.toml" } }
    },
    {
      "id": "read-4",
      "prompt": "Read the file docs/decisions.md for me.",
      "expect_tool": "read_file",
      "expect_args": { "path": { "equals": "docs/decisions.md" } }
    },
    {
      "id": "tests-1",
      "prompt": "Run the test suite and tell me whether it is green.",
      "expect_tool": "run_tests",
      "expect_args": {}
    },
    {
      "id": "tests-2",
      "prompt": "Please run only the tests in tests/test_parser.py.",
      "expect_tool": "run_tests",
      "expect_args": { "target": { "contains": "test_parser" } }
    },
    {
      "id": "tests-3",
      "prompt": "Are the tests passing right now?",
      "expect_tool": "run_tests",
      "expect_args": {}
    },
    {
      "id": "convert-1",
      "prompt": "A file listing says 5.03 GB. How many gibibytes is that?",
      "expect_tool": "convert_memory",
      "expect_args": {
        "value": { "equals": 5.03 },
        "from_unit": { "equals": "GB" },
        "to_unit": { "equals": "GiB" }
      }
    },
    {
      "id": "convert-2",
      "prompt": "Convert 24 GiB into gigabytes.",
      "expect_tool": "convert_memory",
      "expect_args": {
        "value": { "equals": 24 },
        "from_unit": { "equals": "GiB" },
        "to_unit": { "equals": "GB" }
      }
    },
    {
      "id": "convert-3",
      "prompt": "My machine reports 119.2 GiB of memory. What is that in GB?",
      "expect_tool": "convert_memory",
      "expect_args": {
        "value": { "equals": 119.2 },
        "from_unit": { "equals": "GiB" },
        "to_unit": { "equals": "GB" }
      }
    },
    {
      "id": "convert-4",
      "prompt": "Express 128 GB as gibibytes, using the conversion tool rather than doing it in your head.",
      "expect_tool": "convert_memory",
      "expect_args": {
        "value": { "equals": 128 },
        "from_unit": { "equals": "GB" },
        "to_unit": { "equals": "GiB" }
      }
    },
    {
      "id": "none-1",
      "prompt": "In one sentence, what is the difference between prefill and decode?",
      "expect_tool": null
    },
    {
      "id": "none-2",
      "prompt": "Thanks, that is all for now.",
      "expect_tool": null
    },
    {
      "id": "none-3",
      "prompt": "Explain why a mixture-of-experts model needs more memory than its active parameter count suggests.",
      "expect_tool": null
    },
    {
      "id": "none-4",
      "prompt": "Which of the tools you have would you use to find out what is in a file, and why?",
      "expect_tool": null
    },
    {
      "id": "none-5",
      "prompt": "Write me a two-line summary of what an agent loop is.",
      "expect_tool": null
    }
  ]
}
