pixel-surgeon
v1.1.1AI image and video generation, editing, and region repair via Gemini, OpenAI, and Grok.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_images
List image and video files in the shared pixel-surgeon directory (/home/runner/Pictures/pixel-surgeon). Use this to find images available for editing.
save_image
Copy an image file into the shared pixel-surgeon directory (/home/runner/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.
| Parameter | Type | Description |
|---|---|---|
source_path * | string | Absolute path to the image file to import |
generate_images
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.
| Parameter | Type | Description |
|---|---|---|
prompts * | array | Array of text prompts, one per image to generate (1-8 images) |
aspect_ratio | string | Aspect ratio for all generated images |
image_size | string | Image resolution |
model | string | Model 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)… |
style | string | Optional 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-brut… |
generate_image
Generate a single image. Supports Gemini and OpenAI models — pass the model param to choose. Full-resolution image is viewable in the browser viewer.
| Parameter | Type | Description |
|---|---|---|
prompt * | string | Text prompt describing the image to generate |
aspect_ratio | string | Aspect ratio for the image |
image_size | string | Image resolution |
model | string | Model 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)… |
style | string | Optional 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-brut… |
generate_video
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.
| Parameter | Type | Description |
|---|---|---|
prompt * | string | Text prompt describing the video to generate. Be descriptive about motion, camera angles, lighting, and scene details for best results. |
aspect_ratio | string | Aspect ratio — 16:9 for landscape, 9:16 for portrait/vertical |
duration | string | Video duration in seconds |
edit_image
Edit an existing image. Supports Gemini and OpenAI models — pass the model param to choose. Provide the filename of an image in /home/runner/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.
| Parameter | Type | Description |
|---|---|---|
filename * | string | Filename of the source image in /home/runner/Pictures/pixel-surgeon (e.g. "2026-03-17T17-47-31-152Z_59f735df.png") |
prompt * | string | Text prompt describing the edits to make to the image |
aspect_ratio | string | Aspect ratio for the output image |
image_size | string | Output image resolution |
model | string | Model 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)… |
style | string | Optional 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-brut… |
fix_image
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.
| Parameter | Type | Description |
|---|---|---|
filename * | string | Filename of the source image in /home/runner/Pictures/pixel-surgeon |
grid | string | How to split the image: cols x rows |
image_size | string | Resolution for each tile |
model | string | Model 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)… |
prompt | string | Instructions for fixing each tile |
fix_region
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.
| Parameter | Type | Description |
|---|---|---|
filename * | string | Filename of the source image in /home/runner/Pictures/pixel-surgeon |
height * | number | Height of region as percentage of image height (1-100) |
width * | number | Width of region as percentage of image width (1-100) |
x * | number | Left edge of region as percentage of image width (0-100) |
y * | number | Top edge of region as percentage of image height (0-100) |
image_size | string | Resolution for the cropped region |
model | string | Model 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)… |
prompt | string | Instructions for fixing the selected region |
interactive_fix
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.
| Parameter | Type | Description |
|---|---|---|
filename * | string | Filename of the source image in /home/runner/Pictures/pixel-surgeon |
image_size | string | Resolution for the cropped region |
model | string | Model 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)… |
remove_background
Remove a background color from an image and make it transparent. Outputs a PNG with alpha channel. The image must already exist in /home/runner/Pictures/pixel-surgeon (use save_image to import first).
| Parameter | Type | Description |
|---|---|---|
filename * | string | Filename of the source image in /home/runner/Pictures/pixel-surgeon |
color | string | Target background color as hex (e.g. "#FFFFFF" for white, "#000000" for black, "#FF0000" for red). Default: white. |
threshold | number | How far from the target color a pixel can be and still count as background (0 = exact match only, 30 = default, higher = more aggressive) |
trace_to_svg
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 /home/runner/Pictures/pixel-surgeon (use save_image to import first).
| Parameter | Type | Description |
|---|---|---|
filename * | string | Filename of the source image in /home/runner/Pictures/pixel-surgeon |
invert | boolean | Invert the image before tracing (useful for light-on-dark images) |
threshold | number | Brightness threshold for black/white conversion (0-255). Lower = more black. -1 = auto-detect. Default: auto. |
turdsize | number | Suppress speckles up to this size (in pixels). Default: 2. |