{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://sediment.so/schemas/trainer-messages/tool-call/v1.json",
  "title": "TrainerToolCall",
  "description": "One assistant-requested function call.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The tool-call identity used by the matching result."
    },
    "type": {
      "const": "function",
      "type": "string",
      "description": "The fixed `function` tool-call discriminator."
    },
    "function": {
      "$ref": "#/$defs/TrainerFunctionCall",
      "description": "The structured function payload for this tool call."
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "type",
    "function"
  ],
  "$defs": {
    "TrainerFunctionCall": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The function name associated with this tool call or result."
        },
        "arguments": {
          "type": "object",
          "additionalProperties": {},
          "description": "The exact structured arguments supplied to the function."
        }
      },
      "additionalProperties": false,
      "required": [
        "name",
        "arguments"
      ]
    }
  }
}
