Skip to main content
Glama

List image models

list_models

List supported OpenAI image models with their capabilities (sizes, qualities, edit/variation support) to check accepted options before generating or editing images.

Instructions

List supported OpenAI image models with their capabilities (sizes, qualities, edit/variation support, etc.). Use this before calling generate_image or edit_image to check which options a model accepts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The registerModelsTool function that registers the 'list_models' MCP tool. The handler iterates over all MODELS and returns JSON with default model and per-model capabilities (sizes, qualities, features).
    import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
    import { MODELS, defaultModel } from "../models.js";
    
    export function registerModelsTool(server: McpServer): void {
      server.registerTool(
        "list_models",
        {
          title: "List image models",
          description:
            "List supported OpenAI image models with their capabilities (sizes, qualities, edit/variation support, etc.). Use this before calling generate_image or edit_image to check which options a model accepts.",
          inputSchema: {},
        },
        async () => {
          const rows = Object.values(MODELS).map((m) => ({
            id: m.id,
            family: m.family,
            sizes: m.sizes,
            qualities: m.qualities,
            max_images_per_request: m.maxN,
            supports: {
              edit: m.supportsEdit,
              variation: m.supportsVariation,
              background: m.supportsBackground,
              output_format: m.supportsOutputFormat,
              input_fidelity: m.supportsInputFidelity,
              moderation: m.supportsModeration,
              style: m.supportsStyle,
              url_response: m.supportsUrlResponse,
            },
            notes: m.notes,
          }));
          const payload = {
            default_model: defaultModel(),
            models: rows,
          };
          return {
            content: [{ type: "text", text: JSON.stringify(payload, null, 2) }],
          };
        },
      );
    }
  • The tool's input schema (empty object, no parameters required) and title/description metadata for the 'list_models' tool.
    "list_models",
    {
      title: "List image models",
      description:
        "List supported OpenAI image models with their capabilities (sizes, qualities, edit/variation support, etc.). Use this before calling generate_image or edit_image to check which options a model accepts.",
      inputSchema: {},
  • src/server.ts:19-19 (registration)
    Registration call: registerModelsTool(server) is called during server creation to wire up the 'list_models' tool.
    registerModelsTool(server);
  • src/server.ts:5-5 (registration)
    Import of registerModelsTool from ./tools/models.js.
    import { registerModelsTool } from "./tools/models.js";
  • The MODELS data structure and ModelInfo type that provides the model capability data consumed by the list_models handler.
    export type Model =
      | "gpt-image-1.5"
      | "gpt-image-1"
      | "gpt-image-1-mini"
      | "dall-e-3"
      | "dall-e-2";
    
    export interface ModelInfo {
      id: Model;
      family: "gpt-image" | "dall-e-3" | "dall-e-2";
      sizes: readonly string[];
      qualities: readonly string[];
      maxN: number;
      supportsBackground: boolean;
      supportsOutputFormat: boolean;
      supportsInputFidelity: boolean;
      supportsModeration: boolean;
      supportsStyle: boolean;
      supportsEdit: boolean;
      supportsVariation: boolean;
      supportsUrlResponse: boolean;
      notes: string;
    }
    
    export const MODELS: Record<Model, ModelInfo> = {
      "gpt-image-1.5": {
        id: "gpt-image-1.5",
        family: "gpt-image",
        sizes: ["auto", "1024x1024", "1536x1024", "1024x1536"],
        qualities: ["auto", "low", "medium", "high"],
        maxN: 10,
        supportsBackground: true,
        supportsOutputFormat: true,
        supportsInputFidelity: true,
        supportsModeration: true,
        supportsStyle: false,
        supportsEdit: true,
        supportsVariation: false,
        supportsUrlResponse: false,
        notes: "Latest GPT Image model. Always returns base64; URL response_format is not supported.",
      },
      "gpt-image-1": {
        id: "gpt-image-1",
        family: "gpt-image",
        sizes: ["auto", "1024x1024", "1536x1024", "1024x1536"],
        qualities: ["auto", "low", "medium", "high"],
        maxN: 10,
        supportsBackground: true,
        supportsOutputFormat: true,
        supportsInputFidelity: true,
        supportsModeration: true,
        supportsStyle: false,
        supportsEdit: true,
        supportsVariation: false,
        supportsUrlResponse: false,
        notes: "GPT Image 1. Always returns base64.",
      },
      "gpt-image-1-mini": {
        id: "gpt-image-1-mini",
        family: "gpt-image",
        sizes: ["auto", "1024x1024", "1536x1024", "1024x1536"],
        qualities: ["auto", "low", "medium", "high"],
        maxN: 10,
        supportsBackground: true,
        supportsOutputFormat: true,
        supportsInputFidelity: true,
        supportsModeration: true,
        supportsStyle: false,
        supportsEdit: true,
        supportsVariation: false,
        supportsUrlResponse: false,
        notes: "Smaller/cheaper GPT Image. Always returns base64.",
      },
      "dall-e-3": {
        id: "dall-e-3",
        family: "dall-e-3",
        sizes: ["1024x1024", "1792x1024", "1024x1792"],
        qualities: ["standard", "hd"],
        maxN: 1,
        supportsBackground: false,
        supportsOutputFormat: false,
        supportsInputFidelity: false,
        supportsModeration: false,
        supportsStyle: true,
        supportsEdit: false,
        supportsVariation: false,
        supportsUrlResponse: true,
        notes:
          "DALL·E 3. Generates a single image per request; does not support edits or variations. Deprecated 2026-05-12.",
      },
      "dall-e-2": {
        id: "dall-e-2",
        family: "dall-e-2",
        sizes: ["256x256", "512x512", "1024x1024"],
        qualities: ["standard"],
        maxN: 10,
        supportsBackground: false,
        supportsOutputFormat: false,
        supportsInputFidelity: false,
        supportsModeration: false,
        supportsStyle: false,
        supportsEdit: true,
        supportsVariation: true,
        supportsUrlResponse: true,
        notes: "DALL·E 2. Only model with variations. Deprecated 2026-05-12.",
      },
    };
    
    export function defaultModel(): Model {
      const env = process.env.DALLE_DEFAULT_MODEL as Model | undefined;
      if (env && env in MODELS) return env;
      return "gpt-image-1.5";
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It does not explicitly state that the tool is read-only or non-destructive, which is expected for a listing operation. The behavioral disclosure is insufficient.

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?

Two sentences, front-loaded with the action and resource, no wasted words. Every sentence adds value.

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

Completeness4/5

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

Given no parameters and no output schema, the description covers the tool's purpose and usage context. It could mention the output format, but it's fairly complete for a simple list operation.

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 no parameters, and schema description coverage is 100%. The description adds no parameter info, which is acceptable since none exist. Baseline of 4 is appropriate.

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

Purpose5/5

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

The description uses a specific verb ('List') and resource ('supported OpenAI image models') and distinguishes from siblings by stating to use this tool before generate_image or edit_image to check model capabilities.

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

Usage Guidelines4/5

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

The description explicitly advises to use this tool before calling generate_image or edit_image, providing clear context. It does not list when not to use, but the guidance is clear enough.

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/sam-david/openai-images-mcp'

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