listImageModels
Discover available AI image generation models to select the right one for your creative projects.
Instructions
List available image models
Input Schema
TableJSON 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], ];