Skip to main content
Glama

listImageModels

Discover available image generation models to select the right one for your creative projects through the MCPollinations Multimodal MCP Server.

Instructions

List available image models

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function that fetches the list of available image models from the Pollinations API endpoint and returns the JSON response.
    export async function listImageModels() {
      try {
        const response = await fetch('https://image.pollinations.ai/models');
    
        if (!response.ok) {
          throw new Error(`Failed to list models: ${response.statusText}`);
        }
    
        return await response.json();
      } catch (error) {
        log('Error listing image models:', error);
        throw error;
      }
    }
  • The JSON schema definition for the listImageModels tool, specifying no required input parameters.
    export const listImageModelsSchema = {
      name: 'listImageModels',
      description: 'List available image models',
      inputSchema: {
        type: 'object',
        properties: {}
      }
    };
  • MCP server request handler that registers and dispatches tool calls to the listImageModels handler function.
    } else if (name === 'listImageModels') {
      try {
        const result = await listImageModels();
        return {
          content: [
            { type: 'text', text: JSON.stringify(result, null, 2) }
          ]
        };
      } catch (error) {
        return {
          content: [
            { type: 'text', text: `Error listing image models: ${error.message}` }
          ],
          isError: true
        };
      }
  • Central function that collects and returns all tool schemas, including listImageModelsSchema, for MCP listTools requests.
    export function getAllToolSchemas() {
      return [
        generateImageUrlSchema,
        generateImageSchema,
        editImageSchema,
        generateImageFromReferenceSchema,
        listImageModelsSchema,
        respondAudioSchema,
        listAudioVoicesSchema,
        respondTextSchema,
        listTextModelsSchema
      ];
    }
  • MCP server registration for ListToolsRequestSchema, which provides the tool schema for listImageModels via getAllToolSchemas().
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: getAllToolSchemas()
    }));
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'List available image models' implies a read-only operation, but it doesn't specify whether this requires authentication, how results are returned (e.g., pagination, format), rate limits, or error conditions. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description 'List available image models' is a single, efficient sentence that front-loads the core action and resource. It wastes no words and is appropriately sized for a simple listing tool with no parameters. Every word earns its place by clearly conveying the tool's purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (0 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks details on behavioral aspects like authentication needs or return format. For a simple read operation, this might suffice, but without annotations or output schema, it leaves the agent guessing about practical usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, meaning there are no parameters to document. The description doesn't need to add parameter semantics beyond what the schema provides. It correctly implies no inputs are required, aligning with the empty schema. A baseline of 4 is appropriate for zero-parameter tools when the description doesn't mislead about inputs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'List available image models' clearly states the verb ('List') and resource ('available image models'), making the purpose immediately understandable. It distinguishes from siblings like 'editImage' or 'generateImage' by focusing on listing rather than creating or modifying. However, it doesn't explicitly differentiate from 'listTextModels' or 'listAudioVoices' beyond the resource type.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., authentication), when it's appropriate (e.g., before generating images to choose a model), or exclusions (e.g., not for editing images). With siblings like 'listTextModels' and 'listAudioVoices', there's no explicit differentiation in usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/pinkpixel-dev/MCPollinations'

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