Skip to main content
Glama

removeBackground

Remove the background from a single image, returning the subject isolated on a transparent background. Supply the source image (URL or base64); optionally set crop to trim the result to the content, and creative_edit (default true) for higher-quality output that may not match the input pixel-for-pixel - set it false when the subject must stay pixel-identical, e.g. an existing sprite you will animate. The job result is a single image result with a url (not an array). The image is uploaded and validated, and an image larger than 15MB is rejected with HTTP 400. Credits are held when the job is accepted and refunded if it fails or is cancelled. Use removeBackground for this dedicated cutout task; editImage can also remove backgrounds via a prompt but is better for broader edits, while createImage and generateWithStyle produce new images rather than process an existing one. Pass an optional request_id to tag the result so you can retrieve it later via listGenerations (type image). Async generation job: returns {id, status} - poll getApiJob (job and credit contract: see the server instructions).

Credits: This endpoint consumes 0.5 credits per result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestBodyYesPayload for removing the background of an image

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / requestBody / properties / request_id / description
      Previous value: -"Optional client-provided identifier, unique per request. Re-sending the same request_id returns the existing job instead of generating again. Also usable with the results endpoint."New value: +"Optional client-provided identifier, unique per request. Re-sending the same request_id returns the existing job instead of generating again. Also usable as the request_id filter of listGenerations."
  2. Changed4 schema fields changed
    • removedInput schema / properties / requestBody / properties / creative_edit / default
      Removed value: -true
    • changedInput schema / properties / requestBody / properties / creative_edit / description
      Previous value: -"Higher quality results but the image will not be exactly the same as the input."New value: +"Higher quality results but the image will not be exactly the same as the input. Default: true."
    • removedInput schema / properties / requestBody / properties / crop / default
      Removed value: -false
    • changedInput schema / properties / requestBody / properties / crop / description
      Previous value: -"Whether to crop/trim the result to fit the content."New value: +"Whether to crop/trim the result to fit the content. Default: false."
  3. Changed1 schema field changed
    • changedInput schema / properties / requestBody / properties / request_id / description
      Previous value: -"Optional client-provided identifier for this request. Use this to retrieve results later via the results endpoint."New value: +"Optional client-provided identifier, unique per request. Re-sending the same request_id returns the existing job instead of generating again. Also usable with the results endpoint."
  4. Changed1 schema field changed
    • addedInput schema / properties / requestBody / properties / request_id
      Added value: +{
      +  "description": "Optional client-provided identifier for this request. Use this to retrieve results later via the results endpoint.",
      +  "type": "string"
      +}
  5. Added

TDQS

A5/5.0
Behavior5/5

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

With no annotations or output schema, the description carries the full burden and fully delivers. It discloses async job behavior, polling via getApiJob, the single-image URL result, upload validation, a 15MB HTTP 400 rejection, credit holding/refunding, and the 0.5 credits per result cost. There is no contradiction with any annotation.

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 long but every sentence earns its place: purpose, parameter guidance, output shape, error behavior, credit handling, sibling routing, and async polling. It is front-loaded with the core purpose and structured so an agent can quickly extract the key call semantics.

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 tool with nested requestBody, async execution, no output schema, and no annotations, this description covers all essential operational details: how to supply the image, what the result looks like, how to retrieve it, failure behavior, and cost. Nothing critical for correct invocation is left unspecified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although the schema already documents all parameters at 100% coverage, the description adds meaningful guidance beyond the schema: creative_edit's pixel-identity tradeoff, request_id's role in retrieving results via listGenerations, and crop's trimming behavior. This gives the agent practical decision-making information rather than just schema repetition.

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 opens with a specific verb and resource: 'Remove the background from a single image, returning the subject isolated on a transparent background.' It also explicitly contrasts this tool with editImage, createImage, and generateWithStyle, so an agent can distinguish it from relevant siblings without guessing.

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?

It says 'Use removeBackground for this dedicated cutout task' and names editImage as the alternative for broader edits, plus createImage/generateWithStyle as generation-only tools. It also gives a concrete condition: set creative_edit false when the subject must stay pixel-identical, e.g., an existing sprite.

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.