gemini_structured_output
Generate structured JSON responses from Gemini by providing a prompt and a JSON schema. Ensures output conforms to your specified format.
Instructions
Get structured JSON output from Gemini using a provided JSON schema
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>",
"jsonSchema": "<jsonSchema>"
},
"name": "gemini_structured_output"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model name (default: gemini-3.1-pro-preview) | |
| prompt | Yes | The prompt to send to Gemini | |
| jsonSchema | Yes | JSON schema string defining the expected output structure |