Skip to main content
Glama

Fix AI PNG background

fix_ai_png
Read-only

Fix an AI-generated PNG for use in a game: removes a fake transparent background (the grey and white checkerboard painted into the pixels) or a flat background colour, cleans the coloured fringe around edges, deletes stray specks and trims to the content. Also cleans the edges of images that already have real transparency.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "fix_ai_png"
  }
}

Input Schema

NameRequiredDescriptionDefault
padNoTransparent pixels to add around the result.
nameNoShort name for the output files.
forceNoRemove the border colour even when no background was detected.
frameNotrim to the content, keep the original size, or trim and pad to a square.trim
image_urlNoPublic http(s) URL of a PNG image, up to about 128×128 pixels.
toleranceNoHow far a colour can be from the background and still be removed. Default 34 for a checkerboard, 40 for a solid colour.
image_base64NoThe PNG file as base64 (a data: URL also works). Use instead of image_url.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior3/5

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

The annotations declare readOnlyHint=true and openWorldHint=true, and the description is consistent with a non-mutating image transform, adding useful detail on exactly what is edited (pixels, fringe, specks, bounds). However, it never says that the operation produces new output files (only the 'name' schema field hints at this) and says nothing about the result format or cost, which matters for a tool with no output schema.

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, front-loaded with the primary action and then the secondary edge-cleaning case; no filler. The long clause stacking four operations is slightly harder to scan but every element carries information.

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?

For a 7-parameter, all-optional transform with no output schema, the definition explains inputs' intent well but leaves the return shape unspecified: an agent cannot tell whether it receives image data, a URL, or written file names. That gap is significant precisely because no output schema exists to fill it.

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, including tolerance defaults, frame enum values, and the image_url vs image_base64 choice. The description adds no parameter-level meaning beyond the schema, which is the expected baseline when the schema does the heavy lifting.

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 states a specific verb and resource ('Fix an AI-generated PNG') and enumerates the concrete operations: removing baked-in checkerboard or flat backgrounds, defringe, speck removal, trimming. It does not name or distinguish itself from the closely related sibling fix_pixel_art, so an agent cannot fully tell which of the two image-repair tools to pick from the description alone.

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?

It gives a clear precondition for use: the image has a fake transparent background (painted checkerboard), a flat background colour, coloured fringing, specks, or needs trimming. It also implicitly excludes clean images by describing what it addresses. It never names an alternative tool or says when to skip it, so exclusion guidance is missing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources