{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "new_tool.schema.json",
  "title": "new_tool",
  "description": "Create a custom-tool pair inside a project: scripts/<name>.py plus schemas/<name>.schema.json. The generated script is importable and runs immediately (echoing its inputs with a TODO), and both an import check and a run check are executed before success is reported.",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Tool name in lower_snake_case; becomes the Python function name and both file names."
    },
    "description": {
      "type": "string",
      "description": "One-line description of what the tool does. Goes in the docstring and the schema."
    },
    "params": {
      "type": "array",
      "description": "Input parameters as \"name:type:description\" strings (type defaults to string; integer/number/boolean/array/object also allowed).",
      "items": {"type": "string"}
    },
    "returns": {
      "type": "string",
      "description": "Short description of the returned JSON, appended to the schema description."
    },
    "force": {
      "type": "boolean",
      "description": "Overwrite existing files instead of refusing.",
      "default": false
    },
    "root": {
      "type": "string",
      "description": "Project root to scaffold into. Defaults to the project the script lives in."
    }
  },
  "required": ["name"],
  "additionalProperties": false
}
