generate_image
Generates images from text prompts using Grok models, downloads them locally, and returns inline MCP Image content for display.
Instructions
Generate images via Grok2API Console models, download them to the grok-mcp host, and return MCP Image content for inline display. Default model: grok-imagine-image; quality=true uses grok-imagine-image-quality. After a successful local download, remote gallery assets are deleted when GROK2API_ADMIN_* credentials are set. aspect_ratio examples: 1:1, 16:9, 9:16.
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_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | ||
| model | No | ||
| prompt | Yes | ||
| quality | No | ||
| resolution | No | ||
| aspect_ratio | No | ||
| delete_remote | No |