Generate text with OpenAI
generate_textGenerate text responses using OpenAI GPT. Provide a prompt, and optionally set system instructions and maximum output tokens to control the generated content.
Instructions
Generate a text response using an OpenAI GPT model via the Responses API.
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 |
|---|---|---|---|
| model | No | Optional model ID. Defaults to gpt-5. | |
| prompt | Yes | The user prompt to send to the model. | |
| instructions | No | Optional system-level instructions for the model. | |
| max_output_tokens | No | Optional maximum number of generated tokens (up to 16,384). |