generate_text
Generates text from prompts using Google Gemini models and lets you control model, temperature, token limits, JSON output, search grounding, and conversation context.
Instructions
Generate text using Google Gemini with advanced features
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": "generate_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topK | No | Top-k sampling parameter | |
| topP | No | Top-p (nucleus) sampling parameter | |
| model | No | Specific Gemini model to use | gemini-2.5-flash |
| prompt | Yes | The prompt to send to Gemini | |
| jsonMode | No | Enable JSON mode for structured output | |
| grounding | No | Enable Google Search grounding for up-to-date information | |
| maxTokens | No | Maximum tokens to generate | |
| jsonSchema | No | JSON schema for structured output (when jsonMode is true) | |
| temperature | No | Temperature for generation (0-2) | |
| conversationId | No | ID for maintaining conversation context | |
| safetySettings | No | Safety settings for content filtering | |
| systemInstruction | No | System instruction to guide model behavior |