Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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; } }
  • Registration of the listImageModels tool within the imageTools export array, with no input schema defined.
    ["listImageModels", "List available image models", {}, listImageModels], ];

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tusharpatil2912/pollinations-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server