Structured Output
structuredGenerates JSON responses conforming to a provided JSON Schema for data extraction, classification, or other machine-parseable output tasks.
Instructions
Generate a JSON response conforming to a provided JSON Schema. Use for data extraction, classification, or any task needing machine-parseable output.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>",
"schema": "<schema>"
},
"name": "structured"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | No | File paths to include as context (text only, no images). Supports line ranges: 'path:start-end' (e.g. 'src/lib.rs:900-950'). | |
| model | No | Model to use (e.g. o3, gpt-4.1) | |
| prompt | Yes | What to generate or extract | |
| schema | Yes | JSON Schema the response must conform to (as a JSON string) | |
| timeout | No | Timeout in milliseconds (default: 60000) | |
| workingDirectory | No | Working directory for file paths |