Gemini Structured Tool
gemini_structured_toolGenerate structured JSON from Gemini prompts, optionally constrained by a JSON schema or grounded with Google Search for consistent data extraction.
Instructions
Get structured JSON output from Gemini.
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>"
},
"name": "gemini_structured_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model to use. | flash |
| prompt | Yes | The prompt to generate structured output for. | |
| schema | No | Optional JSON schema to constrain the output. | |
| use_google_search | No | Ground response with Google Search. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||