Skip to main content
Glama
2xapi

2Xapi.com GPT-image MCP Server

by 2xapi

Generate image (GPT-image)

generate_image

Turns text prompts into images using an OpenAI-compatible API, returning the image URL and optional local file path.

Instructions

Generate one or more images from a text prompt via the configured OpenAI-compatible image API. Endpoint, key and default model come from config (see get_config / set_config); per-call args override them. Returns the image URL, and the local path if save_dir is set or save=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNo
saveNo
sizeNo
modelNo
promptYes
qualityNo
include_previewNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv0.3.1
    • changedInput schema / properties / include_preview / default
      Previous value: -trueNew value: +false
  2. Changed2 schema fields changedv0.3.0
    • addedInput schema / properties / include_preview
      Added value: +{
      +  "default": true,
      +  "title": "Include Preview",
      +  "type": "boolean"
      +}
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "title": "Result",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "generate_imageOutput",
      -  "type": "object"
      -}New value: +null
  3. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses the external API dependency, config-based endpoint/key/model resolution, per-call overrides, and the return value (image URL plus local path under save conditions). This is solid coverage, though it could also mention rate limits, errors, or data-sent-to-third-party implications.

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 is three focused sentences with no filler. The primary purpose is front-loaded, and each sentence contributes: what it does, how configuration works, and what it returns.

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?

The description captures the core flow, configuration dependency, and return contract, but there is no output schema and no annotations. Missing details such as accepted size/quality values, what include_preview does, save_dir mechanics, and error behavior leave meaningful gaps for an agent invoking this tool correctly in varied cases.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate, and it does add meaning for n ('one or more'), model (per-call override), and save (triggers local path). However, it does not explain size, quality, include_preview, or valid value formats, leaving several parameters dependent on their self-explanatory names only.

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 opens with a specific action and resource: 'Generate one or more images from a text prompt.' This clearly identifies the tool's purpose and naturally distinguishes it from the sibling edit_image, which would modify existing images rather than generate new ones.

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

Usage Guidelines3/5

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

The description provides useful context by pointing to get_config / set_config and explaining that per-call arguments override defaults, implying the tool relies on prior configuration. However, it does not explicitly state when to choose generate_image over edit_image or list_image_models, so usage guidance remains implicit rather than explicit.

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

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/2xapi/2Xapi.com-GPT-image-MCP-Server'

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