Skip to main content
Glama

An MCP server that gives Claude (or any MCP client) the ability to generate images, edit them, fix garbled text, and create videos — all through natural language.

How it works

pixel-surgeon-mcp is a multi-provider image generation server. You can use any combination of providers and switch between them per-request:

Gemini (Google) — balanced

Google's image generation pipeline uses a two-stage approach: Gemini 3.1 Pro reasons about your prompt, then Gemini 3.1 Flash Image renders the pixels. Supports 9 aspect ratios at 512/1K/2K/4K resolution. Best price/performance ratio, with a free tier available.

OpenAI GPT Image 2 — highest quality

OpenAI's latest image model with dramatically improved text rendering and visual fidelity. Supports flexible resolutions — pixel-surgeon maps your chosen size and aspect ratio to the optimal pixel dimensions automatically. Quality levels: medium (fast) and high (print-ready). Excellent for infographics, diagrams, and text-heavy images where other models struggle. Slower and more expensive.

Grok Imagine (xAI) — fastest

xAI's Aurora-powered image model. Fastest generation speed and lowest cost. Supports 7 aspect ratios at fixed resolutions (~1K). Good for rapid prototyping and iteration.

Veo 3 (Video)

For video, the server calls Veo 3 with async polling — generating both video and ambient audio. Supports 16:9 and 9:16 at 5s or 8s duration.

Region repair

AI image models struggle with text-heavy images. The fix tools solve this by sending smaller regions to the provider, then stitching the results back with histogram-matched compositing for seamless blending.

Related MCP server: Nano Banana MCP Server

Tools

Tool

Description

generate_image

Text-to-image generation (single image)

generate_images

Parallel batch generation (1-8 images)

generate_video

Text-to-video via Veo 3 with audio (5s or 8s)

edit_image

Edit an existing image with natural language instructions

fix_image

Grid-based tile repair for garbled text (2x2, 3x3, etc.)

fix_region

Targeted region repair with automatic aspect ratio snapping

interactive_fix

Browser-based crop UI with multi-shot selection

list_images

List generated images and videos

save_image

Import an external image into the workspace

remove_background

Remove image background (alpha channel transparency)

Models

Model

Provider

Resolution

Best for

gemini-3.1-flash-image

Google

512 / 1K / 2K / 4K

General image generation, photo-realistic scenes

gemini-2.5-flash-image

Google

1K max (free tier)

Quick drafts, prototyping

gpt-image-2

OpenAI

Flexible (up to 4K)

Text-heavy images, infographics, diagrams, typography

gpt-image-1

OpenAI

3 fixed sizes

Legacy support

grok-imagine

xAI

Fixed (~1K per ratio)

Fast iteration, lowest cost

Force a specific model per-call via the model tool parameter, or set DEFAULT_IMAGE_MODEL env var.

Gemini automatic fallback

If a Gemini generation call fails with a billing / prepay error, the server automatically retries on the free-tier gemini-2.5-flash-image model. The viewer shows a yellow banner when this happens. Free-tier limits: 1K max resolution, 10 RPM, 500 RPD.

Style presets

All generation and edit tools support an optional style parameter:

neo-brutalist

Magazine editorial, bold typography, halftone textures. Cream, black, and terracotta palette.

duval-software-infographic

Duval Software's signature retro-futurist infographic style. 1960s Space Age meets 1980s arcade. Cathode blue, amber, and salmon palette. Great for diagrams and system overviews.

fractal-arcade

Dithered fractals, Sierpinski patterns, low-poly. CRT retro, Amiga/EGA palette.

clean-tech-infographic

Technical diagrams, system flows, data pipelines. Dark navy, cyan, and electric blue.

Setup

Get your API key(s)

You need at least one provider API key. You can use any combination for maximum flexibility.

Google (Gemini + Veo 3)

  1. Go to Google AI Studio

  2. Sign in with your Google account

  3. Click Create API Key and copy it

Prepayment required. Gemini 3.1 Flash Image and Veo 3 require billing and prepaid credits. The free-tier fallback (2.5 Flash) has limited resolution and rate limits. See Google AI pricing.

OpenAI (GPT Image 2)

  1. Go to OpenAI API

  2. Sign in or create an account

  3. Click Create new secret key and copy it

  4. Ensure you have API credits — image generation is billed per request

GPT Image 2 excels at text rendering, infographics, and diagrams. If you primarily need text-heavy images, this is the provider to use.

xAI (Grok Imagine)

  1. Go to xAI Console

  2. Sign in or create an account

  3. Create an API key and copy it

Grok Imagine is the fastest and cheapest provider. Great for rapid iteration and prototyping. Fixed output resolutions (~1K) with no size control.

Quick start (npx)

No install needed — run directly with npx. Pass whichever API keys you have:

npx pixel-surgeon-mcp

Claude Code CLI

claude mcp add pixel-surgeon \
  -e GOOGLE_API_KEY=your-google-key \
  -e OPENAI_API_KEY=your-openai-key \
  -e XAI_API_KEY=your-xai-key \
  -- npx pixel-surgeon-mcp

Claude Desktop / MCP client config

{
  "mcpServers": {
    "pixel-surgeon": {
      "command": "npx",
      "args": ["pixel-surgeon-mcp"],
      "env": {
        "GOOGLE_API_KEY": "your-google-api-key",
        "OPENAI_API_KEY": "your-openai-api-key",
        "XAI_API_KEY": "your-xai-api-key"
      }
    }
  }
}

Install from source

If you prefer a local clone:

git clone https://github.com/j-east/pixel-surgeon-mcp.git
cd pixel-surgeon-mcp
npm install
npm run build

Image output

Generated images are saved to ~/Pictures/pixel-surgeon/. A local browser viewer auto-launches on first use for full-resolution previews with model selection, respin controls, and search.

Development

npm run dev    # tsx watch mode
npm run build  # compile TypeScript
npm run start  # run compiled server

Key implementation details

  • Aspect ratio snapping — crops are adjusted to the nearest Gemini-supported ratio while preserving center point

  • Histogram matching — per-channel RGB normalization ensures composited regions blend seamlessly

  • Human-in-the-loopinteractive_fix opens a browser crop UI, blocks via Promise until the user submits, fires parallel Gemini calls, and lets the user pick the best result

  • MCP size limits — full-resolution images are saved to disk; downsampled versions (< 950KB) are returned in MCP responses

Contributing

PRs are welcome! We're especially looking for:

New style presets

Add entries to the STYLE_PRESETS object in src/index.ts. Your PR should include:

  • The preset definition (name, prompt prefix, default aspect ratio)

  • 2-3 example images generated with the preset (drop them in your PR description)

  • A short description of the visual style for the README table

Model adapters

The server currently supports Gemini, OpenAI, Grok Imagine, and Veo 3. We'd love adapters for other image/video generation APIs — Stable Diffusion, Flux, etc. If you're interested in adding one, open an issue first so we can align on the interface.

Built by Duval Software

pixel-surgeon-mcp is maintained by John Evans, part of the engineering team at Duval Software — a software engineering firm in Jacksonville Beach, FL building AI-powered tools and custom integrations. If you need MCP servers, AI pipelines, or production tooling built, get in touch.

License

MIT

Available Tools

11 tools
edit_imageA

Edit an existing image. Supports Gemini and OpenAI models — pass the model param to choose. Provide the filename of an image in /root/Pictures/pixel-surgeon (use list_images to see available files, or save_image to import one first). The MCP reads the file directly — do NOT pass base64 image data.

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYesText prompt describing the edits to make to the image
filenameYesFilename of the source image in /root/Pictures/pixel-surgeon (e.g. "2026-03-17T17-47-31-152Z_59f735df.png")
aspect_ratioNoAspect ratio for the output image1:1
image_sizeNoOutput image resolution1K
styleNoOptional style preset to apply. When set, the style's prompt prefix is prepended and its default aspect ratio is used (unless you explicitly set one). Available styles: • neo-brutalist — Neo-brutalist minimalist magazine editorial. Bold oversized typography, cream/black/terracotta palette, halftone textures, visible grid lines, asymmetric layout. Think Emigre meets Swiss brutalism. • retro-futuristic-arcade — Retro-futurist infographic style. 1960s Space Age optimism meets 1980s arcade aesthetics. Cathode blue, warm amber, salmon red, warm green palette. CRT scanlines, atomic-age geometry, pixel-grid accents. Great for diagrams, system overviews, and technical illustrations. • fractal-arcade — Geometric dithered fractal style. All shading via dithering patterns and geometric cross-hatch grids — no smooth gradients. Fractal backgrounds (Sierpinski, hexagonal tessellations, recursive diamonds), low-poly faceted subjects, retro CRT palette. • duval-software-infographic — Duval Software's clean technical infographic for architecture diagrams, system flows, and data pipelines. Dark navy background, cyan/electric blue glowing connection lines, geometric nodes, professional and precise.
modelNoModel to use. Available: 'gemini-3.1-flash-image' (Gemini 3.1 Flash Image), 'gemini-2.5-flash-image' (Gemini 2.5 Flash Image), 'gpt-image-1' (GPT Image 1 (OpenAI)), 'gpt-image-2' (GPT Image 2 (OpenAI)), 'grok-imagine' (Grok Imagine (xAI)). Default: 'gpt-image-2'. Set DEFAULT_IMAGE_MODEL env var to change the default. Provider tradeoffs: grok-imagine is fastest and cheapest; gemini is mid-quality with the best price/performance ratio (free tier available); gpt-image-2 is highest quality but slower and more expensive. Gemini models fall back to free tier on billing errors. OpenAI requires OPENAI_API_KEY. Grok requires XAI_API_KEY.

TDQS

A4.6/5.0
Behavior5/5

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

No annotations, but description compensates fully: discloses file reading mechanism, model choices with tradeoffs, default model, env var override, fallback behavior, and required API keys.

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?

Front-loaded with main action. Each sentence adds value. Slightly long due to model and style details, but all are informative. No redundancy.

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

Completeness5/5

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

Given 6 parameters (4 with enums), no output schema, and complex model/style options, description covers all necessary context: prerequisites, model behavior, key usage notes. Complete for agent invocation.

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?

Schema coverage 100%. Description adds value: explains model param with detailed tradeoffs, style param with presets described, and clarifies default behavior for aspect_ratio when style is set.

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?

Clearly states 'Edit an existing image', verb+resource. Distinguishes from siblings like generate_image (create new) and fix_image. Provides model options and prerequisites.

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?

Explicitly mentions prerequisites (use list_images or save_image first) and model tradeoffs. Implicitly separates from generation tools. No explicit when-not-to-use, but context is clear.

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

fix_imageA

Fix an image that has glitched or garbled text by splitting it into tiles, re-rendering each tile, and stitching them back together. This works because smaller sections have less text for the model to handle at once. Use this when a generated image has text artifacts or overloaded text regions.

ParametersJSON Schema
NameRequiredDescriptionDefault
filenameYesFilename of the source image in /root/Pictures/pixel-surgeon
promptNoInstructions for fixing each tileClean up and fix any garbled, glitched, or distorted text in this image tile. Preserve the style, colors, and layout exactly but make all text crisp and legible.
gridNoHow to split the image: cols x rows2x2
image_sizeNoResolution for each tile1K
modelNoModel to use. Available: 'gemini-3.1-flash-image' (Gemini 3.1 Flash Image), 'gemini-2.5-flash-image' (Gemini 2.5 Flash Image), 'gpt-image-1' (GPT Image 1 (OpenAI)), 'gpt-image-2' (GPT Image 2 (OpenAI)), 'grok-imagine' (Grok Imagine (xAI)). Default: 'gpt-image-2'. Set DEFAULT_IMAGE_MODEL env var to change the default. Provider tradeoffs: grok-imagine is fastest and cheapest; gemini is mid-quality with the best price/performance ratio (free tier available); gpt-image-2 is highest quality but slower and more expensive. Gemini models fall back to free tier on billing errors. OpenAI requires OPENAI_API_KEY. Grok requires XAI_API_KEY.

TDQS

A4/5.0
Behavior3/5

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

No annotations provided, so description carries full burden. It explains the tiling process and why smaller sections help, but does not disclose failure modes, authentication requirements, or what happens to the original file.

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?

Three sentences front-loading the action, rationale, and use case. Every sentence earns its place with zero redundancy.

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?

No output schema, but the description covers the process and use case adequately for the tool's complexity. Could mention that the tool produces a fixed image, but not essential.

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 coverage is 100% and schema descriptions are very detailed (e.g., model parameter includes provider tradeoffs). The main description adds little beyond repeating the tiling concept, meeting baseline.

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-reource pair ('Fix an image') and explicitly states the method (splitting into tiles, re-rendering). It distinguishes from siblings like edit_image or fix_region by focusing on garbled text and tiling approach.

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?

Directly says 'Use this when a generated image has text artifacts or overloaded text regions.' Clear context but lacks explicit when-not-to-use or alternative tool mentions beyond the implied tiling approach.

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

fix_regionA

Fix a specific region of an image by cropping it out, sending it for repair, and reinserting it. The crop is automatically snapped to the nearest supported aspect ratio. Use this when only part of an image has glitched text or artifacts — more precise than fix_image's grid approach.

ParametersJSON Schema
NameRequiredDescriptionDefault
filenameYesFilename of the source image in /root/Pictures/pixel-surgeon
promptNoInstructions for fixing the selected regionClean up and fix any garbled, glitched, or distorted text in this image region. Preserve the style, colors, and layout exactly but make all text crisp and legible.
xYesLeft edge of region as percentage of image width (0-100)
yYesTop edge of region as percentage of image height (0-100)
widthYesWidth of region as percentage of image width (1-100)
heightYesHeight of region as percentage of image height (1-100)
image_sizeNoResolution for the cropped region1K
modelNoModel to use. Available: 'gemini-3.1-flash-image' (Gemini 3.1 Flash Image), 'gemini-2.5-flash-image' (Gemini 2.5 Flash Image), 'gpt-image-1' (GPT Image 1 (OpenAI)), 'gpt-image-2' (GPT Image 2 (OpenAI)), 'grok-imagine' (Grok Imagine (xAI)). Default: 'gpt-image-2'. Set DEFAULT_IMAGE_MODEL env var to change the default. Provider tradeoffs: grok-imagine is fastest and cheapest; gemini is mid-quality with the best price/performance ratio (free tier available); gpt-image-2 is highest quality but slower and more expensive. Gemini models fall back to free tier on billing errors. OpenAI requires OPENAI_API_KEY. Grok requires XAI_API_KEY.

TDQS

A4.4/5.0
Behavior4/5

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

Discloses cropping and snapping to nearest aspect ratio, and model tradeoffs in parameter description. However, no annotations exist, and it omits details like destructive nature, rate limits, or authentication requirements.

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 plus parameter table; front-loaded with purpose and usage. Every part is informative, no fluff.

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?

Covers purpose, when to use, and key behavioral aspects. Lacks output description and error handling, but sufficient given tool complexity and parameter clarity.

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 covers all parameters with descriptions (100% coverage). The description adds minimal extra beyond schema; model parameter has detailed tradeoffs within schema, so baseline 3.

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?

Clearly states it fixes a region of an image by cropping, repairing, and reinserting. Distinguishes from fix_image's grid approach, saying it's more precise for partial glitches.

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

Usage Guidelines5/5

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

Explicitly advises using it when only part of an image has glitched text or artifacts, and contrasts with fix_image. Provides clear when-to-use and alternative.

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

generate_imageB

Generate a single image. Supports Gemini and OpenAI models — pass the model param to choose. Full-resolution image is viewable in the browser viewer.

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYesText prompt describing the image to generate
aspect_ratioNoAspect ratio for the image1:1
image_sizeNoImage resolution1K
styleNoOptional style preset to apply. When set, the style's prompt prefix is prepended and its default aspect ratio is used (unless you explicitly set one). Available styles: • neo-brutalist — Neo-brutalist minimalist magazine editorial. Bold oversized typography, cream/black/terracotta palette, halftone textures, visible grid lines, asymmetric layout. Think Emigre meets Swiss brutalism. • retro-futuristic-arcade — Retro-futurist infographic style. 1960s Space Age optimism meets 1980s arcade aesthetics. Cathode blue, warm amber, salmon red, warm green palette. CRT scanlines, atomic-age geometry, pixel-grid accents. Great for diagrams, system overviews, and technical illustrations. • fractal-arcade — Geometric dithered fractal style. All shading via dithering patterns and geometric cross-hatch grids — no smooth gradients. Fractal backgrounds (Sierpinski, hexagonal tessellations, recursive diamonds), low-poly faceted subjects, retro CRT palette. • duval-software-infographic — Duval Software's clean technical infographic for architecture diagrams, system flows, and data pipelines. Dark navy background, cyan/electric blue glowing connection lines, geometric nodes, professional and precise.
modelNoModel to use. Available: 'gemini-3.1-flash-image' (Gemini 3.1 Flash Image), 'gemini-2.5-flash-image' (Gemini 2.5 Flash Image), 'gpt-image-1' (GPT Image 1 (OpenAI)), 'gpt-image-2' (GPT Image 2 (OpenAI)), 'grok-imagine' (Grok Imagine (xAI)). Default: 'gpt-image-2'. Set DEFAULT_IMAGE_MODEL env var to change the default. Provider tradeoffs: grok-imagine is fastest and cheapest; gemini is mid-quality with the best price/performance ratio (free tier available); gpt-image-2 is highest quality but slower and more expensive. Gemini models fall back to free tier on billing errors. OpenAI requires OPENAI_API_KEY. Grok requires XAI_API_KEY.

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It mentions the tool generates a single image and results are viewable in the browser viewer, but does not disclose any side effects, permissions, or failure modes. It is adequate but not thorough.

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 main description is three short sentences that efficiently convey purpose, model support, and output availability. The style details are appropriately placed in the parameter schema, keeping the main description clean. No wasted words.

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 lack of annotations and output schema, the description explains what the tool does and model options, but misses behavioral details like return format, error handling, or when to choose this over siblings. Adequate for basic use but not fully complete.

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?

Schema coverage is 100%, so baseline is 3. The description adds significant value by detailing model tradeoffs (speed, quality, cost) and providing extensive style descriptions with examples. This goes beyond the schema's enum labels.

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 clearly states 'Generate a single image' and specifies supported models, but does not explicitly distinguish from the sibling 'generate_images' tool, which likely generates multiple images. The mention of 'single' provides some differentiation, but it could be more explicit.

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?

No guidance on when to use this tool versus alternatives like 'generate_images' or other image tools. Model tradeoffs are described, but that's for choosing a parameter, not for tool selection. The description lacks usage context.

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

generate_imagesA

Generate multiple images in parallel. Supports Gemini and OpenAI models — pass the model param to choose. Returns the generated images and any accompanying text. Full-resolution images are viewable in the browser viewer.

ParametersJSON Schema
NameRequiredDescriptionDefault
promptsYesArray of text prompts, one per image to generate (1-8 images)
aspect_ratioNoAspect ratio for all generated images1:1
image_sizeNoImage resolution1K
styleNoOptional style preset to apply. When set, the style's prompt prefix is prepended and its default aspect ratio is used (unless you explicitly set one). Available styles: • neo-brutalist — Neo-brutalist minimalist magazine editorial. Bold oversized typography, cream/black/terracotta palette, halftone textures, visible grid lines, asymmetric layout. Think Emigre meets Swiss brutalism. • retro-futuristic-arcade — Retro-futurist infographic style. 1960s Space Age optimism meets 1980s arcade aesthetics. Cathode blue, warm amber, salmon red, warm green palette. CRT scanlines, atomic-age geometry, pixel-grid accents. Great for diagrams, system overviews, and technical illustrations. • fractal-arcade — Geometric dithered fractal style. All shading via dithering patterns and geometric cross-hatch grids — no smooth gradients. Fractal backgrounds (Sierpinski, hexagonal tessellations, recursive diamonds), low-poly faceted subjects, retro CRT palette. • duval-software-infographic — Duval Software's clean technical infographic for architecture diagrams, system flows, and data pipelines. Dark navy background, cyan/electric blue glowing connection lines, geometric nodes, professional and precise.
modelNoModel to use. Available: 'gemini-3.1-flash-image' (Gemini 3.1 Flash Image), 'gemini-2.5-flash-image' (Gemini 2.5 Flash Image), 'gpt-image-1' (GPT Image 1 (OpenAI)), 'gpt-image-2' (GPT Image 2 (OpenAI)), 'grok-imagine' (Grok Imagine (xAI)). Default: 'gpt-image-2'. Set DEFAULT_IMAGE_MODEL env var to change the default. Provider tradeoffs: grok-imagine is fastest and cheapest; gemini is mid-quality with the best price/performance ratio (free tier available); gpt-image-2 is highest quality but slower and more expensive. Gemini models fall back to free tier on billing errors. OpenAI requires OPENAI_API_KEY. Grok requires XAI_API_KEY.

TDQS

A3.6/5.0
Behavior3/5

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

The description reveals parallel execution and that full-resolution images are viewable, but with no annotations provided, it fails to disclose authentication requirements, rate limits, error behavior, or side effects.

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 concise sentences, front-loaded with the core function. Every sentence adds relevant information without redundancy or filler.

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

Completeness2/5

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

Despite no output schema, the description only vaguely says 'Returns the generated images and any accompanying text', omitting details like output format (URLs, base64), number of images, or any concurrency limits. This incompleteness hampers agent understanding.

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?

With 100% schema description coverage, the schema already documents all parameters. The tool description adds minimal value beyond 'pass the model param to choose', which is a high-level remark. Baseline 3 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 clearly states the tool generates multiple images in parallel, distinguishes it from the sibling 'generate_image' tool, and specifies supported models. The verb 'Generate' and resource 'multiple images' are explicit.

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 implies use when multiple images are needed via 'Generate multiple images in parallel', but does not explicitly state when to use this tool versus alternatives like 'generate_image', nor provides when-not-to-use guidance.

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

generate_videoA

Generate a video using Google's Veo 3. Returns an MP4 video file. Video generation takes 1-3 minutes — the tool will poll until complete. Veo 3 generates both video and ambient audio. Videos are saved to the shared directory and viewable in the browser viewer.

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYesText prompt describing the video to generate. Be descriptive about motion, camera angles, lighting, and scene details for best results.
aspect_ratioNoAspect ratio — 16:9 for landscape, 9:16 for portrait/vertical16:9
durationNoVideo duration in seconds8

TDQS

A4/5.0
Behavior4/5

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

Without annotations, the description reveals key behaviors: polling (1-3 minute generation), output format (MP4), ambient audio generation, and storage/viewing (shared directory, browser viewer). This is transparent, though it omits potential error scenarios or limitations.

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 four sentences, each adding value: purpose, time/polling, audio, storage. No unnecessary words, and the most critical info is front-loaded.

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?

The description covers output format, timing, and storage, which is fairly complete for a generation tool with no output schema. However, it lacks mention of file size limits, quality options, or error handling.

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 coverage is 100%, and the description adds minimal value beyond the schema's parameter descriptions. The prompt advice is already in the schema, and aspect ratio/duration enums are clear. The baseline score of 3 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 clearly states the tool generates a video using Google's Veo 3, returns an MP4 file, and distinguishes itself from sibling image tools (e.g., generate_images) by mentioning video-specific features like ambient audio and polling.

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 implies the tool is for video generation, but it does not explicitly state when not to use it or provide alternatives among sibling tools. The context of sibling tools suggests image generation tools are separate, but the description lacks direct guidance.

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

interactive_fixA

Opens an image in a browser-based crop tool where the user can draw a rectangle around the region to fix, add notes/instructions, and submit. The tool waits for the user's selection, then sends the cropped region for repair and composites it back into the original image. Best for precise, user-guided fixes.

ParametersJSON Schema
NameRequiredDescriptionDefault
filenameYesFilename of the source image in /root/Pictures/pixel-surgeon
image_sizeNoResolution for the cropped region1K
modelNoModel to use. Available: 'gemini-3.1-flash-image' (Gemini 3.1 Flash Image), 'gemini-2.5-flash-image' (Gemini 2.5 Flash Image), 'gpt-image-1' (GPT Image 1 (OpenAI)), 'gpt-image-2' (GPT Image 2 (OpenAI)), 'grok-imagine' (Grok Imagine (xAI)). Default: 'gpt-image-2'. Set DEFAULT_IMAGE_MODEL env var to change the default. Provider tradeoffs: grok-imagine is fastest and cheapest; gemini is mid-quality with the best price/performance ratio (free tier available); gpt-image-2 is highest quality but slower and more expensive. Gemini models fall back to free tier on billing errors. OpenAI requires OPENAI_API_KEY. Grok requires XAI_API_KEY.

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It explains the interactive workflow (opens browser tool, awaits user input, crops, repairs, composites), but lacks details on blocking behavior, timeout, or what happens if no selection is made. The core behavior is described, but some edge cases are missing.

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?

Three sentences: first states the primary action, second explains the process, third provides usage guidance. No redundant information. Well-structured and front-loaded.

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?

The description covers the interactive process and the compositing outcome. However, it does not explicitly state what the tool returns (e.g., the final image path or object). Given the complexity and absence of output schema, a brief mention of return value would improve completeness.

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 coverage is 100%, so the description does not need to add much. It does not elaborate on parameters beyond what the schema already provides. The model parameter has extensive enum descriptions in the schema itself. Description adds little new meaning, so baseline score of 3 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 clearly specifies the action: opens a browser-based crop tool, waits for user to draw a rectangle, then repairs and composites. It distinguishes itself from sibling tools like 'fix_image' by emphasizing interactive, user-guided precision.

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 states 'Best for precise, user-guided fixes' which implies when to use, but it does not explicitly mention when not to use or provide direct comparisons to sibling tools like 'fix_region' or 'fix_image'. The usage guidance is implied rather than explicit.

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

list_imagesA

List image and video files in the shared pixel-surgeon directory (/root/Pictures/pixel-surgeon). Use this to find images available for editing.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.3/5.0
Behavior3/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 discloses the directory and purpose, but does not mention any behavioral traits like sorting, filtering, or read-only nature. Slightly lacking for a zero-annotation tool.

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 concise sentences with no wasted words. The information is front-loaded and every sentence adds value.

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

Completeness5/5

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

Given the tool's simplicity (no parameters, no output schema), the description is complete enough. It explains what the tool does and its intended use, fitting the context of sibling tools.

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 tool has zero parameters, so schema covers everything. The description adds the directory path and purpose, adding value beyond the empty schema. Baseline for 0 params is 4.

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 clearly states the tool lists image and video files in a specific directory, using the verb 'list' and specifying the resource. It differentiates from sibling tools which are editing/generation operations.

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 says 'Use this to find images available for editing,' implying usage before editing tools. While it doesn't explicitly state when not to use, the sibling context provides sufficient differentiation.

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

remove_backgroundA

Remove a background color from an image and make it transparent. Outputs a PNG with alpha channel. The image must already exist in /root/Pictures/pixel-surgeon (use save_image to import first).

ParametersJSON Schema
NameRequiredDescriptionDefault
filenameYesFilename of the source image in /root/Pictures/pixel-surgeon
colorNoTarget background color as hex (e.g. "#FFFFFF" for white, "#000000" for black, "#FF0000" for red). Default: white.#FFFFFF
thresholdNoHow far from the target color a pixel can be and still count as background (0 = exact match only, 30 = default, higher = more aggressive)

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description must carry the full burden. It discloses the output format (PNG with alpha) and the prerequisite file location, but lacks detail on behavior when the target color is not present or the effect of the threshold parameter beyond the schema.

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 extremely concise with two sentences, front-loading the purpose and output format in the first sentence and the usage prerequisite in the second. No unnecessary words.

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?

For a tool with 3 parameters, no output schema, and no annotations, the description covers the core functionality, output, and a key prerequisite. Minor gaps exist (e.g., handling of missing color, edge cases), but it is largely complete for the task.

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 coverage is 100%, so the baseline is 3. The description adds no parameter-specific details beyond what the schema provides; all parameters are already described in the schema with defaults and ranges.

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 clearly states the tool's purpose: remove a background color and make it transparent, outputting a PNG with alpha channel. It distinctly differentiates from sibling tools like edit_image or fix_image, which do not specialize in background removal.

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 states that the image must already exist in a specific directory and recommends using save_image first, providing clear contextual guidance. However, it does not mention when not to use this tool or alternatives.

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

save_imageA

Copy an image file into the shared pixel-surgeon directory (/root/Pictures/pixel-surgeon) so it can be used with edit_image. Use this when the user wants to edit an image that exists elsewhere on their filesystem.

ParametersJSON Schema
NameRequiredDescriptionDefault
source_pathYesAbsolute path to the image file to import

TDQS

A4.1/5.0
Behavior3/5

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

No annotations provided; description discloses the copy operation but lacks details on permissions, side effects, or limitations. Adequate for a simple non-destructive action.

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 with no wasted words. Front-loaded with the action and purpose, then usage condition.

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

Completeness5/5

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

For a simple tool with one parameter and no output schema, the description covers purpose, usage, and parameter sufficiently.

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 covers the parameter with a description ('Absolute path to the image file to import'); the tool description does not add further meaning. Baseline 3 due to high schema coverage.

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 clearly states the action ('Copy an image file') and the specific resource (shared pixel-surgeon directory), and distinguishes from sibling tools by indicating this is a prerequisite for editing.

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?

Explicitly says when to use this tool: 'when the user wants to edit an image that exists elsewhere on their filesystem.' While it doesn't say when not to use it or list alternatives, the context is clear.

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

trace_to_svgA

Convert a raster image to SVG using potrace vectorization. Best for line art, diagrams, logos, and high-contrast images. The image must already exist in /root/Pictures/pixel-surgeon (use save_image to import first).

ParametersJSON Schema
NameRequiredDescriptionDefault
filenameYesFilename of the source image in /root/Pictures/pixel-surgeon
thresholdNoBrightness threshold for black/white conversion (0-255). Lower = more black. -1 = auto-detect. Default: auto.
invertNoInvert the image before tracing (useful for light-on-dark images)
turdsizeNoSuppress speckles up to this size (in pixels). Default: 2.

TDQS

A3.7/5.0
Behavior3/5

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

No annotations provided, so description carries full burden. It explains the underlying technique (potrace) and mentions key parameters, but does not disclose output details (e.g., file path, name convention) or limitations (e.g., unsupported image types).

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 concise sentences: one describing the action and ideal usage, one providing a critical prerequisite. No wasted words.

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?

No output schema is provided, and the description does not specify what the output is (e.g., saved SVG file path). For a conversion tool, this is a notable gap, but the description is otherwise sufficient for basic use.

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 coverage is 100% and schema descriptions fully document each parameter. The description adds no additional semantics beyond what the schema provides, so a baseline score of 3 is appropriate.

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?

Clearly states the tool converts a raster image to SVG using potrace, and specifies best use cases (line art, diagrams, logos, high-contrast images). However, it does not explicitly differentiate from sibling tools like save_image or edit_image.

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?

Provides context on when the tool is best used (line art, etc.) and includes a essential prerequisite: the image must exist in /root/Pictures/pixel-surgeon via save_image. Lacks explicit 'when not to use' instructions.

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. Dates show when Glama detected each change.

  1. 11 tool updatesv1.1.1
    • First observededit_image
    • First observedfix_image
    • First observedfix_region
    • First observedgenerate_image
    • First observedgenerate_images
    • First observedgenerate_video
    • First observedinteractive_fix
    • First observedlist_images
    • First observedremove_background
    • First observedsave_image
    • First observedtrace_to_svg

TDQS

A4.1/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: generate vs edit vs fix vs background removal vs vectorization. The three fix tools are differentiated by scope (whole image, automatic region, interactive region). No ambiguity.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (e.g., generate_image, remove_background, trace_to_svg). No mixed conventions or vague verbs.

Tool Count5/5

11 tools cover the core image manipulation workflow: import, list, generate, edit, fix, background removal, vectorization, video generation. Well-scoped without being overwhelming.

Completeness4/5

Covers major AI-driven image operations. Lacks a dedicated manual crop tool (fix_region's automatic snapping may not suffice) and non-AI utilities like resize or filter, but the set is strong for its domain.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

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/j-east/pixel-surgeon-mcp'

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