Skip to main content
Glama

Remove Image Background

remove_image_background

Remove the background from a completed mascot, mascot pose, or standalone composition so it can sit cleanly inside UI layouts.

Use before embedding generated assets on cards, dashboards, modals, colored sections, transparent overlays, empty states, success/error pages, or app surfaces where a rectangular background would look unpolished.

Do not use before the source generation has a completed imageUrl. Do not use when the rectangular/full-bleed background is intentional, such as a hero illustration that fills its whole frame.

Background removal is asynchronous. This tool returns imageUrl and assetUrl immediately; they serve a frontend placeholder while pending and redirect to the transparent image when ready. Poll get_generation_status until completed before downloading the final image.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "canvasId": "<canvasId>"
    },
    "name": "remove_image_background"
  }
}

Input Schema

NameRequiredDescriptionDefault
canvasIdYesCanvas id for the completed mascot, mascot pose, or composition. Use canvasId returned by the creation tool or get_generated_asset.
workspaceNoOptional workspace id or slug from list_workspaces. Defaults to the user's personal workspace. Use the same workspace for every call in a workflow, because generations, mascots, and palettes belong to one workspace.
revisionIdNoOptional revision id to remove the background from. Omit to use the current completed revision.

Output Schema

NameRequiredDescriptionDefault
statusYesCurrent async state. If pending, poll get_generation_status. If completed, call get_generated_asset.
assetUrlNoEmbeddable asset URL for the generation, matching imageUrl for images and videoUrl for animations. It can be used immediately while polling continues.
canvasIdNoUnderlying SVG App canvas id when the generation produced an image. Kept for UI integration and background removal.
imageUrlNoEmbeddable image URL. It is returned immediately, serves a frontend placeholder while pending, and redirects to the final image when ready.
mimeTypeNoMIME type of the final asset when known, for example image/png or video/mp4.
videoUrlNoEmbeddable video URL for animation generations. It is returned immediately, serves a frontend placeholder video while pending, and redirects to the final transparent WebM video when ready.
nextActionYesThe exact next MCP action the model/client should take for this generation.
animationIdNoUnderlying SVG App video generation id when the generation produced an animation.
resourceUriNoOptional MCP resource URI for clients that explicitly choose to read resources. Do not rely on resources for polling.
generationIdYesPass this exact id to get_generation_status until status is completed. The returned asset URL can be used immediately.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only say it is a non-read-only, non-destructive, non-idempotent open-world call. The description goes well beyond that by disclosing that the operation is asynchronous, that the returned URLs act as placeholders that redirect once processing finishes, and that polling is required before download — exactly the behavior an agent would otherwise get wrong.

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?

Well front-loaded: purpose first, then usage context, then exclusions, then async caveat. Four short paragraphs, each earning its place, though the UI-surface enumeration is longer than strictly necessary.

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?

An output schema exists, so return values need not be explained, yet the description still clarifies the placeholder-then-redirect semantics that the schema alone would not convey. Combined with the prerequisite and async polling guidance, an agent has everything needed to call and follow up correctly.

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 all three parameters are already documented in the schema, and the description mostly references them implicitly via the "completed imageUrl" prerequisite. It adds no new detail on revisionId selection or workspace scoping beyond what the schema states, so baseline 3 applies.

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?

States a specific verb and resource ("Remove the background") scoped to three asset kinds: completed mascot, mascot pose, or standalone composition. That scope plus the UI-embedding rationale makes it unmistakable versus siblings like vectorize_image or generate_composition.

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?

Gives explicit positive triggers (cards, dashboards, modals, overlays, empty states) and explicit negative triggers (no completed imageUrl yet, or when a full-bleed hero background is intentional). It also names the follow-up tool, get_generation_status, for polling.

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.