Skip to main content
Glama

Grok Image MCP

English | 中文

An MCP server for generating and editing images with the xAI image API. Supports model and quality selection, local images, stored files, and inline image results over stdio.

Requires Node.js 22.19+ and an xAI API key.

Quick start

Add this to your MCP client's configuration:

{
  "mcpServers": {
    "grok_image": {
      "command": "npx",
      "args": ["-y", "grok-image-mcp"],
      "env": {
        "XAI_API_KEY": "your-xai-api-key"
      }
    }
  }
}

The server exposes generate_image and edit_image. Example generate_image arguments:

{
  "prompt": "A watercolor illustration of a quiet mountain lake",
  "model": "grok-imagine-image-2.0",
  "quality": "low",
  "aspect_ratio": "16:9"
}

Related MCP server: image-studio-mcp

Models and quality

Capability

grok-imagine-image

grok-imagine-image-2.0

Default model

Yes

Select per call or set XAI_IMAGE_MODEL

Source images per edit

1–3

1–5

Resolution

1k, 2k

1k, 2k

Quality parameter

—

low, medium, auto

Additional aspect ratios

—

21:9, 5:2

The model argument overrides XAI_IMAGE_MODEL. The default is grok-imagine-image.

On 2.0, quality defaults to auto: low for generation and medium for editing. See xAI pricing for costs.

Tools

Both tools accept these parameters:

Parameter

Type

Description

prompt

string, required

Image description or editing instructions

model

string

One of the two models above

n

integer

Output count, 1–10; default 1

aspect_ratio

string

Generation defaults to auto; editing follows the first input

resolution

string

1k or 2k; default 1k

quality

string

2.0: low, medium, auto

response_format

string

url (default) or b64_json for inline MCP image content

storage_options

object

Save generated images to the Files API

Aspect ratios: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 2:1, 1:2, 19.5:9, 9:19.5, 20:9, 9:20, auto; 2.0 additionally supports 21:9 and 5:2.

Editing

For edit_image, supply one of these source lists:

  • image_urls: ordered array of public URLs, base64 data URIs, or local paths.

  • images: ordered array of { "url": "..." } or { "file_id": "..." } objects. url also accepts data URIs and local paths.

{
  "prompt": "Replace the background with a snowy forest",
  "image_urls": ["/absolute/path/to/photo.png"]
}

Local files support PNG, JPEG and WebP. Relative paths resolve from the server's working directory.

Results

structuredContent.images contains image URLs, revised prompts, MIME types and stored-file metadata. Model, quality and usage are included when returned by xAI.

  • url: temporary image links, also returned as Markdown. Use storage_options to save images.

  • b64_json: MCP image content blocks, with inline: true in the corresponding structured entry.

Save images and reuse them

Add storage_options to either tool to persist output in the xAI Files API:

{
  "prompt": "A small cabin in a pine forest",
  "model": "grok-imagine-image-2.0",
  "quality": "low",
  "storage_options": {
    "filename": "cabin.jpg",
    "expires_after": 86400
  }
}

This saves the image privately for one day. Use structuredContent.images[0].file_output.file_id in a subsequent edit:

{
  "prompt": "Change the season to winter",
  "model": "grok-imagine-image-2.0",
  "quality": "low",
  "images": [{ "file_id": "file-id-from-the-previous-result" }]
}

Storage option

Description

filename

Required filename for the stored image

expires_after

File lifetime in seconds, 3600–2592000; default: permanent

public_url

true creates a shareable public link; default: private

public_url.expires_after

Use public_url: { "expires_after": 86400 } to set a link lifetime

See xAI storage documentation for details.

Configuration and networking

Environment variable

Description

XAI_API_KEY

xAI API key; takes precedence over XAIAPI_KEY

XAIAPI_KEY

Alternative API-key variable

XAI_IMAGE_MODEL

Default model; grok-imagine-image when omitted

XAIAPI_BASE_URL

API base URL; default https://api.x.ai/v1

XAI_TIMEOUT_MS

Request timeout in milliseconds; default 180000

HTTPS_PROXY

Network proxy for API requests; takes precedence over HTTP_PROXY

HTTP_PROXY

Network proxy, e.g. http://127.0.0.1:7890

IMAGE_PROXY_DOMAIN

Reverse proxy for returned imgen.x.ai URLs, e.g. https://images.example.com

For IMAGE_PROXY_DOMAIN, configure your reverse proxy to forward paths and query strings to https://imgen.x.ai.

For long generations, set the MCP client's tool timeout to XAI_TIMEOUT_MS or longer.

Development

npm ci
npm test

To use a local build, configure your MCP client to run node with the absolute path to dist/index.js.

License

MIT


基于 xAI 图像 API 的 MCP 服务,支持选择模型与质量、编辑本地图片或已存储的图片,并返回图片链接或内联图片。使用 stdio 传输。

需要 Node.js 22.19+ 和 xAI API 密钥。

快速开始

在 MCP 客户端中添加:

{
  "mcpServers": {
    "grok_image": {
      "command": "npx",
      "args": ["-y", "grok-image-mcp"],
      "env": {
        "XAI_API_KEY": "你的 xAI API 密钥"
      }
    }
  }
}

服务提供 generate_image 和 edit_image 两个工具。generate_image 调用示例:

{
  "prompt": "一幅宁静山间湖泊的水彩插画",
  "model": "grok-imagine-image-2.0",
  "quality": "low",
  "aspect_ratio": "16:9"
}

模型与质量

能力

grok-imagine-image

grok-imagine-image-2.0

默认模型

是

每次调用指定,或设置 XAI_IMAGE_MODEL

编辑源图数量

1–3 张

1–5 张

分辨率

1k、2k

1k、2k

质量参数

—

low、medium、auto

新增宽高比

—

21:9、5:2

调用时的 model 优先于环境变量 XAI_IMAGE_MODEL,默认值为 grok-imagine-image。

2.0 的质量默认为 auto:生成对应 low,编辑对应 medium。费用见 xAI 定价。

工具参数

两个工具共用以下参数:

参数

类型

说明

prompt

string,必填

图片描述或编辑指令

model

string

上表中的模型之一

n

integer

输出数量,1–10,默认 1

aspect_ratio

string

生成默认 auto;编辑默认跟随第一张源图

resolution

string

1k 或 2k,默认 1k

quality

string

2.0:low、medium、auto

response_format

string

默认 url;b64_json 返回 MCP 原生图片内容

storage_options

object

将输出保存至 Files API

宽高比支持 1:1、16:9、9:16、4:3、3:4、3:2、2:3、2:1、1:2、19.5:9、9:19.5、20:9、9:20、auto;2.0 还支持 21:9、5:2。

编辑图片

edit_image 的源图列表使用以下一种形式:

  • image_urls:按顺序提供公开 URL、base64 data URI 或本地路径。

  • images:按顺序提供 { "url": "..." } 或 { "file_id": "..." } 对象。url 也接受 data URI 和本地路径。

{
  "prompt": "将背景替换成雪中的森林",
  "image_urls": ["/absolute/path/to/photo.png"]
}

本地文件支持 PNG、JPEG、WebP。相对路径以服务的工作目录为基准。

返回结果

structuredContent.images 包含图片 URL、修改后的提示词、MIME 类型和文件存储信息;模型、质量、用量信息随 xAI 返回内容提供。

  • url:临时图片链接,同时以 Markdown 返回。使用 storage_options 可保存图片。

  • b64_json:MCP image 内容块,对应的结构化条目标记为 inline: true。

保存与复用图片

为任一工具添加 storage_options,即可保存输出:

{
  "prompt": "松林中的一间小木屋",
  "model": "grok-imagine-image-2.0",
  "quality": "low",
  "storage_options": {
    "filename": "cabin.jpg",
    "expires_after": 86400
  }
}

上述配置将图片私有保存一天。从 structuredContent.images[0].file_output.file_id 取得文件 ID,随后编辑时复用:

{
  "prompt": "将季节改成冬季",
  "model": "grok-imagine-image-2.0",
  "quality": "low",
  "images": [{ "file_id": "上一次返回的文件 ID" }]
}

存储选项

说明

filename

必填,存储文件名

expires_after

文件有效期,3600–2592000 秒;默认永久保存

public_url

设为 true 创建公开分享链接;默认为私有存储

public_url.expires_after

使用 public_url: { "expires_after": 86400 } 指定公开链接有效期

详见 xAI 存储文档。

环境变量与网络

变量

说明

XAI_API_KEY

API 密钥,优先于 XAIAPI_KEY

XAIAPI_KEY

API 密钥的另一个变量名

XAI_IMAGE_MODEL

默认模型,未设置时为 grok-imagine-image

XAIAPI_BASE_URL

API 基础地址,默认 https://api.x.ai/v1

XAI_TIMEOUT_MS

请求超时毫秒数,默认 180000

HTTPS_PROXY

API 网络代理,优先于 HTTP_PROXY

HTTP_PROXY

API 网络代理,例如 http://127.0.0.1:7890

IMAGE_PROXY_DOMAIN

返回图片的反向代理地址,例如 https://images.example.com

使用 IMAGE_PROXY_DOMAIN 时,反向代理需将路径与查询参数转发到 https://imgen.x.ai。

生成耗时较长时,将 MCP 客户端的工具超时设为 XAI_TIMEOUT_MS 或更长。

开发

npm ci
npm test

使用本地构建时,在 MCP 客户端中配置 node 和 dist/index.js 的绝对路径。

许可证

MIT

Available Tools

2 tools
edit_imageA

Edit images with xAI using ordered URLs, data URIs, local paths, or Files API IDs. Supports up to 3 source images with 1.0 or 5 with 2.0. URLs are temporary unless persisted.

NameRequiredDescriptionDefault
nNoNumber of output images (default: 1)
modelNoOverrides XAI_IMAGE_MODEL (default: grok-imagine-image). Choose grok-imagine-image-2.0 for quality control and up to 5 inputs
imagesNoOrdered sources as {url: URL, data URI, or local path} or {file_id: Files API ID}. Supply either images or image_urls
promptYesDescribe the image to generate or the desired edits
qualityNoImage 2.0 only. Auto uses low for generation and medium for editing; billing follows the served quality
image_urlsNoSource URLs, base64 data URIs, or local paths, in order. Supply either image_urls or images. 1.0 allows 3; 2.0 allows 5
resolutionNoOutput resolution (default: 1k)
aspect_ratioNoGeneration defaults to auto; editing follows the first input. 21:9 and 5:2 require image 2.0
response_formatNourl returns temporary links (default); b64_json returns MCP image content
storage_optionsNoPersist outputs in the Files API; private unless public_url is explicitly enabled

Output Schema

NameRequiredDescription
modelNo
usageNo
imagesYes
qualityNo

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already disclose that this is a non-read-only, non-idempotent, open-world, non-destructive operation. The description adds genuinely useful behavior beyond that: input-count limits tied to model version (3 for 1.0, 5 for 2.0) and the fact that returned URLs are temporary unless persisted via storage_options.

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

Conciseness4/5

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

Two dense sentences with no filler, and the input-source forms and limits are front-loaded. It could be tightened slightly, but every clause carries usable information.

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?

With an output schema present and 100% schema coverage, the description need not explain return values. It covers the key operational constraints (input count per model, temporary URLs). It omits any note on persistence behavior details or quality/response_format interplay, but those are schema-documented.

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 100%, so every parameter is already documented in the schema, including the image_urls vs images alternatives and model-dependent input caps. The description restates the accepted input forms but adds no format or syntax detail beyond the schema, so the baseline 3 applies.

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?

States a specific verb (edit) and resource (images), plus the provider (xAI). It implicitly contrasts with the sibling generate_image, but never names or distinguishes it explicitly, so an agent must infer the generate-vs-edit boundary.

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?

Usage is implied by 'Edit images' and the mention of source inputs, which suggests this is for modifying existing images rather than creating new ones. However, there is no explicit when-to-use, when-not-to-use, or routing to generate_image, so the agent must infer the choice.

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

generate_imageA

Generate images with xAI. Model and quality affect cost. URLs are temporary unless persisted with storage_options. b64_json returns inline image content.

NameRequiredDescriptionDefault
nNoNumber of output images (default: 1)
modelNoOverrides XAI_IMAGE_MODEL (default: grok-imagine-image). Choose grok-imagine-image-2.0 for quality control and up to 5 inputs
promptYesDescribe the image to generate or the desired edits
qualityNoImage 2.0 only. Auto uses low for generation and medium for editing; billing follows the served quality
resolutionNoOutput resolution (default: 1k)
aspect_ratioNoGeneration defaults to auto; editing follows the first input. 21:9 and 5:2 require image 2.0
response_formatNourl returns temporary links (default); b64_json returns MCP image content
storage_optionsNoPersist outputs in the Files API; private unless public_url is explicitly enabled

Output Schema

NameRequiredDescription
modelNo
usageNo
imagesYes
qualityNo

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only declare the safety profile (write, open-world, non-idempotent, non-destructive). The description adds genuinely useful behavior beyond that: cost varies with model/quality, generated URLs are ephemeral unless persisted via storage_options, and b64_json returns inline content. It stops short of noting auth requirements or rate limits.

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?

Four short, front-loaded sentences with no filler. The core action comes first and the cost and output-format caveats follow in order of importance.

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?

An output schema exists, so return values need not be explained, and annotations cover the safety profile. The description is complete for invoking the tool, with the only real gap being the lack of explicit routing versus edit_image.

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 100%, with rich enum docs for model, quality, aspect_ratio, response_format, and storage_options, so the schema carries the parameter burden. The description reinforces the cost and persistence implications of those parameters but adds little syntax or format detail beyond what the schema already states.

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?

States a specific verb and resource ('Generate images with xAI'), which is clear and actionable. It does not, however, explicitly contrast itself with the sibling edit_image, so an agent must infer the generation-vs-editing split from the verb alone.

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 gives conditional guidance on output handling (temporary URLs vs. persisted storage vs. inline b64_json), which implies usage. It never says when to choose this tool over edit_image or when persistence is required, so the when-to-use-vs-alternative guidance is only implied.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv1.1.0
    • Changededit_image18 fields changed
      • changedInput schema / $schema
        Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
      • removedInput schema / additionalProperties
        Removed value: -false
      • changedInput schema / properties / aspect_ratio / description
        Previous value: -"Override the output aspect ratio (default: follows first input image)"New value: +"Generation defaults to auto; editing follows the first input. 21:9 and 5:2 require image 2.0"
      • changedInput schema / properties / aspect_ratio / enum
        Previous value: -[
        -  "1:1",
        -  "16:9",
        -  "9:16",
        -  "4:3",
        -  "3:4",
        -  "3:2",
        -  "2:3",
        -  "2:1",
        -  "1:2",
        -  "19.5:9",
        -  "9:19.5",
        -  "20:9",
        -  "9:20",
        -  "auto"
        -]New value: +[
        +  "1:1",
        +  "16:9",
        +  "9:16",
        +  "4:3",
        +  "3:4",
        +  "3:2",
        +  "2:3",
        +  "2:1",
        +  "1:2",
        +  "19.5:9",
        +  "9:19.5",
        +  "20:9",
        +  "9:20",
        +  "21:9",
        +  "5:2",
        +  "auto"
        +]
      • changedInput schema / properties / image_urls / description
        Previous value: -"Array of source image URLs, base64 data URIs, or local file paths (1-3 images)"New value: +"Source URLs, base64 data URIs, or local paths, in order. Supply either image_urls or images. 1.0 allows 3; 2.0 allows 5"
      • addedInput schema / properties / image_urls / items / minLength
        Added value: +1
      • changedInput schema / properties / image_urls / maxItems
        Previous value: -3New value: +5
      • addedInput schema / properties / images
        Added value: +{
        +  "description": "Ordered sources as {url: URL, data URI, or local path} or {file_id: Files API ID}. Supply either images or image_urls",
        +  "items": {
        +    "anyOf": [
        +      {
        +        "additionalProperties": false,
        +        "properties": {
        +          "url": {
        +            "minLength": 1,
        +            "type": "string"
        +          }
        +        },
        +        "required": [
        +          "url"
        +        ],
        +        "type": "object"
        +      },
        +      {
        +        "additionalProperties": false,
        +        "properties": {
        +          "file_id": {
        +            "minLength": 1,
        +            "type": "string"
        +          }
        +        },
        +        "required": [
        +          "file_id"
        +        ],
        +        "type": "object"
        +      }
        +    ]
        +  },
        +  "maxItems": 5,
        +  "minItems": 1,
        +  "type": "array"
        +}
      • addedInput schema / properties / model
        Added value: +{
        +  "description": "Overrides XAI_IMAGE_MODEL (default: grok-imagine-image). Choose grok-imagine-image-2.0 for quality control and up to 5 inputs",
        +  "enum": [
        +    "grok-imagine-image",
        +    "grok-imagine-image-2.0"
        +  ],
        +  "type": "string"
        +}
      • changedInput schema / properties / n / description
        Previous value: -"Number of images to generate (1-10, default 1)"New value: +"Number of output images (default: 1)"
      • changedInput schema / properties / prompt / description
        Previous value: -"Text description of the desired edits"New value: +"Describe the image to generate or the desired edits"
      • addedInput schema / properties / prompt / minLength
        Added value: +1
      • addedInput schema / properties / quality
        Added value: +{
        +  "description": "Image 2.0 only. Auto uses low for generation and medium for editing; billing follows the served quality",
        +  "enum": [
        +    "low",
        +    "medium",
        +    "auto"
        +  ],
        +  "type": "string"
        +}
      • changedInput schema / properties / resolution / description
        Previous value: -"Resolution of the output image (default: 1k)"New value: +"Output resolution (default: 1k)"
      • addedInput schema / properties / response_format
        Added value: +{
        +  "description": "url returns temporary links (default); b64_json returns MCP image content",
        +  "enum": [
        +    "url",
        +    "b64_json"
        +  ],
        +  "type": "string"
        +}
      • addedInput schema / properties / storage_options
        Added value: +{
        +  "description": "Persist outputs in the Files API; private unless public_url is explicitly enabled",
        +  "properties": {
        +    "expires_after": {
        +      "description": "File lifetime in seconds; omitted means permanent storage",
        +      "maximum": 2592000,
        +      "minimum": 3600,
        +      "type": "integer"
        +    },
        +    "filename": {
        +      "description": "Filename for the stored image, e.g. landscape.jpg",
        +      "minLength": 1,
        +      "type": "string"
        +    },
        +    "public_url": {
        +      "anyOf": [
        +        {
        +          "type": "boolean"
        +        },
        +        {
        +          "properties": {
        +            "expires_after": {
        +              "maximum": 2592000,
        +              "minimum": 3600,
        +              "type": "integer"
        +            }
        +          },
        +          "type": "object"
        +        }
        +      ],
        +      "description": "Explicitly create a public link; omitted means private storage"
        +    }
        +  },
        +  "required": [
        +    "filename"
        +  ],
        +  "type": "object"
        +}
      • changedInput schema / required
        Previous value: -[
        -  "prompt",
        -  "image_urls"
        -]New value: +[
        +  "prompt"
        +]
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "$schema": "https://json-schema.org/draft/2020-12/schema",
        +  "additionalProperties": false,
        +  "properties": {
        +    "images": {
        +      "items": {
        +        "additionalProperties": false,
        +        "properties": {
        +          "file_output": {
        +            "anyOf": [
        +              {
        +                "additionalProperties": false,
        +                "properties": {
        +                  "expires_at": {
        +                    "type": "number"
        +                  },
        +                  "file_id": {
        +                    "minLength": 1,
        +                    "type": "string"
        +                  },
        +                  "filename": {
        +                    "type": "string"
        +                  },
        +                  "public_url": {
        +                    "type": "string"
        +                  },
        +                  "public_url_error": {
        +                    "type": "string"
        +                  },
        +                  "public_url_expires_at": {
        +                    "type": "number"
        +                  }
        +                },
        +                "required": [
        +                  "file_id"
        +                ],
        +                "type": "object"
        +              },
        +              {
        +                "type": "null"
        +              }
        +            ]
        +          },
        +          "inline": {
        +            "description": "Image bytes are in the corresponding MCP image content block",
        +            "type": "boolean"
        +          },
        +          "mime_type": {
        +            "anyOf": [
        +              {
        +                "minLength": 1,
        +                "type": "string"
        +              },
        +              {
        +                "type": "null"
        +              }
        +            ]
        +          },
        +          "respect_moderation": {
        +            "type": "boolean"
        +          },
        +          "revised_prompt": {
        +            "type": [
        +              "string",
        +              "null"
        +            ]
        +          },
        +          "url": {
        +            "anyOf": [
        +              {
        +                "minLength": 1,
        +                "type": "string"
        +              },
        +              {
        +                "type": "null"
        +              }
        +            ]
        +          }
        +        },
        +        "type": "object"
        +      },
        +      "minItems": 1,
        +      "type": "array"
        +    },
        +    "model": {
        +      "type": "string"
        +    },
        +    "quality": {
        +      "type": [
        +        "string",
        +        "null"
        +      ]
        +    },
        +    "usage": {
        +      "additionalProperties": {},
        +      "propertyNames": {
        +        "type": "string"
        +      },
        +      "type": "object"
        +    }
        +  },
        +  "required": [
        +    "images"
        +  ],
        +  "type": "object"
        +}
    • Changedgenerate_image13 fields changed
      • changedInput schema / $schema
        Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
      • removedInput schema / additionalProperties
        Removed value: -false
      • changedInput schema / properties / aspect_ratio / description
        Previous value: -"Aspect ratio of the generated image (default: auto)"New value: +"Generation defaults to auto; editing follows the first input. 21:9 and 5:2 require image 2.0"
      • changedInput schema / properties / aspect_ratio / enum
        Previous value: -[
        -  "1:1",
        -  "16:9",
        -  "9:16",
        -  "4:3",
        -  "3:4",
        -  "3:2",
        -  "2:3",
        -  "2:1",
        -  "1:2",
        -  "19.5:9",
        -  "9:19.5",
        -  "20:9",
        -  "9:20",
        -  "auto"
        -]New value: +[
        +  "1:1",
        +  "16:9",
        +  "9:16",
        +  "4:3",
        +  "3:4",
        +  "3:2",
        +  "2:3",
        +  "2:1",
        +  "1:2",
        +  "19.5:9",
        +  "9:19.5",
        +  "20:9",
        +  "9:20",
        +  "21:9",
        +  "5:2",
        +  "auto"
        +]
      • addedInput schema / properties / model
        Added value: +{
        +  "description": "Overrides XAI_IMAGE_MODEL (default: grok-imagine-image). Choose grok-imagine-image-2.0 for quality control and up to 5 inputs",
        +  "enum": [
        +    "grok-imagine-image",
        +    "grok-imagine-image-2.0"
        +  ],
        +  "type": "string"
        +}
      • changedInput schema / properties / n / description
        Previous value: -"Number of images to generate (1-10, default 1)"New value: +"Number of output images (default: 1)"
      • changedInput schema / properties / prompt / description
        Previous value: -"Text description of the image to generate"New value: +"Describe the image to generate or the desired edits"
      • addedInput schema / properties / prompt / minLength
        Added value: +1
      • addedInput schema / properties / quality
        Added value: +{
        +  "description": "Image 2.0 only. Auto uses low for generation and medium for editing; billing follows the served quality",
        +  "enum": [
        +    "low",
        +    "medium",
        +    "auto"
        +  ],
        +  "type": "string"
        +}
      • changedInput schema / properties / resolution / description
        Previous value: -"Resolution of the generated image (default: 1k)"New value: +"Output resolution (default: 1k)"
      • addedInput schema / properties / response_format
        Added value: +{
        +  "description": "url returns temporary links (default); b64_json returns MCP image content",
        +  "enum": [
        +    "url",
        +    "b64_json"
        +  ],
        +  "type": "string"
        +}
      • addedInput schema / properties / storage_options
        Added value: +{
        +  "description": "Persist outputs in the Files API; private unless public_url is explicitly enabled",
        +  "properties": {
        +    "expires_after": {
        +      "description": "File lifetime in seconds; omitted means permanent storage",
        +      "maximum": 2592000,
        +      "minimum": 3600,
        +      "type": "integer"
        +    },
        +    "filename": {
        +      "description": "Filename for the stored image, e.g. landscape.jpg",
        +      "minLength": 1,
        +      "type": "string"
        +    },
        +    "public_url": {
        +      "anyOf": [
        +        {
        +          "type": "boolean"
        +        },
        +        {
        +          "properties": {
        +            "expires_after": {
        +              "maximum": 2592000,
        +              "minimum": 3600,
        +              "type": "integer"
        +            }
        +          },
        +          "type": "object"
        +        }
        +      ],
        +      "description": "Explicitly create a public link; omitted means private storage"
        +    }
        +  },
        +  "required": [
        +    "filename"
        +  ],
        +  "type": "object"
        +}
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "$schema": "https://json-schema.org/draft/2020-12/schema",
        +  "additionalProperties": false,
        +  "properties": {
        +    "images": {
        +      "items": {
        +        "additionalProperties": false,
        +        "properties": {
        +          "file_output": {
        +            "anyOf": [
        +              {
        +                "additionalProperties": false,
        +                "properties": {
        +                  "expires_at": {
        +                    "type": "number"
        +                  },
        +                  "file_id": {
        +                    "minLength": 1,
        +                    "type": "string"
        +                  },
        +                  "filename": {
        +                    "type": "string"
        +                  },
        +                  "public_url": {
        +                    "type": "string"
        +                  },
        +                  "public_url_error": {
        +                    "type": "string"
        +                  },
        +                  "public_url_expires_at": {
        +                    "type": "number"
        +                  }
        +                },
        +                "required": [
        +                  "file_id"
        +                ],
        +                "type": "object"
        +              },
        +              {
        +                "type": "null"
        +              }
        +            ]
        +          },
        +          "inline": {
        +            "description": "Image bytes are in the corresponding MCP image content block",
        +            "type": "boolean"
        +          },
        +          "mime_type": {
        +            "anyOf": [
        +              {
        +                "minLength": 1,
        +                "type": "string"
        +              },
        +              {
        +                "type": "null"
        +              }
        +            ]
        +          },
        +          "respect_moderation": {
        +            "type": "boolean"
        +          },
        +          "revised_prompt": {
        +            "type": [
        +              "string",
        +              "null"
        +            ]
        +          },
        +          "url": {
        +            "anyOf": [
        +              {
        +                "minLength": 1,
        +                "type": "string"
        +              },
        +              {
        +                "type": "null"
        +              }
        +            ]
        +          }
        +        },
        +        "type": "object"
        +      },
        +      "minItems": 1,
        +      "type": "array"
        +    },
        +    "model": {
        +      "type": "string"
        +    },
        +    "quality": {
        +      "type": [
        +        "string",
        +        "null"
        +      ]
        +    },
        +    "usage": {
        +      "additionalProperties": {},
        +      "propertyNames": {
        +        "type": "string"
        +      },
        +      "type": "object"
        +    }
        +  },
        +  "required": [
        +    "images"
        +  ],
        +  "type": "object"
        +}
  2. 2 tool updatesv1.0.0
    • First observededit_image
    • First observedgenerate_image

TDQS

A3.9/5.0

Scored across 2 tools

Disambiguation5/5

generate_image creates new images, while edit_image modifies existing images using source inputs. The two tools target distinct actions with clearly different parameters and use cases, leaving no ambiguity.

Naming Consistency5/5

Both tools follow a consistent snake_case verb_noun pattern: generate_image and edit_image. This is predictable and easy to parse.

Tool Count3/5

Only 2 tools are provided, which feels thin for an image generation/editing service. While they cover the core operations, additional tools like listing models or retrieving image details would make the set feel more complete.

Completeness4/5

The core create and edit operations are present, covering the main lifecycle for image generation. Minor gaps exist, such as no tool for listing available models or managing stored images, but agents can work around these using external means.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers