{
"name": "close_ticket",
"summary": [
"Record your final answer and mark the current ticket `Done`. Call this tool as the last action of every response — your work is not saved until you call it.",
"`result` is a JSON value of its natural type: string for plain text, object/array/number/boolean for structured payloads. Omit `result` when there is nothing to report."
],
"constraints": [
"Operates on the agent's current ticket. No `key` parameter; the loop resolves it from the calling agent's identity.",
"Call exactly once per ticket, as the final action of your response.",
"MUST pass `result` as a JSON value of its natural type when provided. Stringifying an object first (passing `\"{\\\"x\\\": 1}\"` instead of `{\"x\": 1}`) saves the value as an escaped string of JSON, not as the object itself.",
"When the ticket carries a `schema`, `result` must validate against it. Failures count toward `max_schema_retries`."
],
"anti_patterns": [
"Calling this tool mid-task to 'check in' or 'save progress'. `Done` is terminal: finish the work first, then call.",
"To create or edit other tickets: use `manage_tickets_tool`. This tool finishes the current ticket only."
],
"cautions": [
"IMPORTANT: Every response that completes the task MUST end with this call. Returning text without calling `close_ticket` leaves the ticket `InProgress`; the loop will re-assign the ticket and ask you to retry.",
"IMPORTANT: `Done` is terminal. Once the call succeeds, the ticket cannot be re-opened or amended.",
"IMPORTANT: a schema validation failure counts toward `max_schema_retries`. Read the violation message, correct the shape, and retry; do not loop blindly."
],
"output": [
"Success: `Ticket TICKET-N marked done`.",
"Schema error: a JSON Schema violation message; counted toward `max_schema_retries`.",
"Input error: no `InProgress` ticket is assigned to this agent."
],
"read_only": false,
"input_schema": {
"type": "object",
"properties": {
"result": {
"description": "The agent's final answer as a JSON value: string, object, array, number, or boolean. Pass structured payloads as JSON values, not as JSON-encoded strings. Omit this field when there is nothing to report. When the ticket has a `schema`, the value is validated against it. Examples: `\"forwarded 3 findings\"`, `{\"status\": \"ok\", \"items\": [...]}`, `[1, 2, 3]`, `42`."
}
}
}
}