Skip to main content
Glama

image.cut_background

[paid: $0.0005] Remove the background from a photo, returning the subject on transparency (BiRefNet on Cloudflare Images; when that cannot read the image, Bria's background remover runs instead at $0.018). Returns JSON {images:[{url, asset_key, download_url?, width, height}], price, next} plus a preview; images are stored in this workspace, never provider links, and a result with no download_url says why in download_url_unavailable. Refuses: SIMPLER_MEDIA_INPUT_MISSING (pass the url or the asset_key), SIMPLER_MEDIA_FOREIGN_KEY (use this workspace's asset_key), SIMPLER_MEDIA_URL_REFUSED (use https, data:image or an asset_key), SIMPLER_MEDIA_PIN_TOO_LARGE (under 20MB), INSUFFICIENT_CREDITS (add credits). SIMPLER_EDIT_RESULT_UNDELIVERED means the charge was refunded: retry. NEXT: pass images[0].asset_key as image_asset_key to the next image.* tool, or open download_url when the result carries one.

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": "image.cut_background"
  }
}

Input Schema

NameRequiredDescriptionDefault
image_urlNoSource photo: a public https URL, a data:image/...;base64 URL, or the url/url_path of an earlier image result (max 20MB; PNG, JPEG, WebP or GIF; SVG is refused). Pass this or the matching *_asset_key, not both.
request_refNoOptional idempotency key (1-64 chars: letters, digits, . _ : -). Retrying with the same request_ref and the same arguments within 24 hours returns the first result at $0 with replayed: true; the same request_ref with different arguments is refused (SIMPLER_IMAGE_REQUEST_REF_CONFLICT), and so is a retry whose first result was deleted since (SIMPLER_IMAGE_REQUEST_REF_RESULT_DELETED): send a new request_ref to run it again.
preview_formatNoPreview block after the JSON, at most 384px on the long edge and never charged: png, jpeg or none. Left out, a PNG result gets a png preview and a JPEG or WebP result a jpeg one. A result with no preview says why in preview_unavailable.
image_asset_keyNoSource photo, as the asset_key of an earlier image result for this workspace (edit-projects/<tenant>/... or images/<tenant>/...). A key from another workspace is refused (SIMPLER_MEDIA_FOREIGN_KEY).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Discloses pricing ($0.0005, with a $0.018 Bria fallback), provider fallback conditions, that outputs are stored in this workspace rather than provider links, and a full error taxonomy with remediation for each code. This goes far beyond the single readOnlyHint annotation and covers cost, side effects, and failure modes an agent needs.

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-loads the action and price, then uses 'Refuses:' and 'NEXT:' labels to make the dense block scannable. It is long and repeats some schema content (the 20MB limit, the https/data/asset_key input forms), costing it a point, but most sentences carry real information.

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?

There is no output schema, yet the description spells out the return envelope {images:[{url, asset_key, download_url?, width, height}], price, next}, the preview block, and download_url_unavailable / preview_unavailable. Combined with error handling and chaining guidance, an agent has everything needed to call and consume the result.

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 is already 100%, so the dry facts of image_url, image_asset_key, request_ref and preview_format are documented. The description still adds value by tying parameters to failure codes (SIMPLER_MEDIA_INPUT_MISSING, SIMPLER_MEDIA_FOREIGN_KEY, SIMPLER_MEDIA_URL_REFUSED, PIN_TOO_LARGE) and by stating the url/asset_key mutual exclusivity at the call level.

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?

States a specific verb and resource — 'Remove the background from a photo, returning the subject on transparency' — plus the underlying providers. It does not, however, distinguish itself from the obvious sibling image.replace_background (or image.segment_at), so an agent must infer which one to pick.

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?

Gives concrete operational routing: the input-source choice ('pass the url or the asset_key'), the retry rule for SIMPLER_EDIT_RESULT_UNDELIVERED (refunded, retry), and a clear NEXT step chaining images[0].asset_key into the following image.* call. Missing is any statement of when to prefer this over sibling tools such as image.replace_background.

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