Skip to main content
Glama

edit_image

Edit an existing image using a text prompt. Choose from Gemini, OpenAI, or Grok models to apply edits, resizing, and style presets.

Instructions

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.

Input Schema

TableJSON 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.
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.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/j-east/pixel-surgeon-mcp'

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