listImageModels
Discover available AI image generation models to select the right one for your creative projects.
Instructions
List available image models
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "listImageModels"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/services/imageService.js:139-156 (handler)The handler function for listImageModels that fetches the list of available image models from the Pollinations API and returns it in MCP format.
async function listImageModels(params) { try { const url = buildUrl(IMAGE_API_BASE_URL, "models"); const response = await fetch(url); if (!response.ok) { throw new Error(`Failed to list models: ${response.statusText}`); } const models = await response.json(); // Return the response in MCP format return createMCPResponse([createTextContent(models, true)]); } catch (error) { console.error("Error listing image models:", error); throw error; } } - src/services/imageService.js:226-227 (registration)Registration of the listImageModels tool within the imageTools export array, with no input schema defined.
["listImageModels", "List available image models", {}, listImageModels], ];