Skip to main content
Glama

A2A Gateway — Base Token Guard & x402 Settlement

remove_image_background

One-click high-precision image background removal powered by local native PyTorch RMBG-1.4 model. Outputs clean transparent RGBA PNG (Base64). Completely standalone, zero ComfyUI dependency. Charges 0.01 USDC via x402 on Base Mainnet or eligible points. Supply payer_address. For redemption pass invoice_id and signature in _meta.x402/payment, with tx_hash for on-chain payment or method=points where supported. Settlement errors set isError and _meta.x402/payment-error.status_code; 503 indicates admission unavailable, while a 409 uncertain outcome must not be automatically retried.

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": {
      "image": "<image>",
      "payer_address": "<payer_address>"
    },
    "name": "remove_image_background"
  }
}

Input Schema

NameRequiredDescriptionDefault
imageYesImage data as Base64 string (data:image/png;base64,...) or public HTTP/HTTPS image URL
rem_modeNoBackground removal model engineRMBG-1.4
payer_addressYesPayer wallet for invoice creation and redemption
add_backgroundNoOptional background replacement color ('none' for transparent PNG)none

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations at all, the description carries the full burden and does so well: it discloses the paid x402 settlement model, the two payment paths (on-chain tx_hash vs method=points), the fact that it is standalone with zero ComfyUI dependency, and precise failure semantics (isError plus _meta.x402/payment-error.status_code, 503 = admission unavailable, 409 = uncertain and non-retryable). This is exactly the kind of behavior an agent cannot infer from schema alone.

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?

The purpose and output format are front-loaded, and the remaining sentences are dense with non-redundant payment and error semantics rather than filler. It is a long block rather than cleanly separated into purpose / payment / errors sections, which costs it a point on structure but not on substance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a paid, mutation-like media tool with no annotations and no output schema, the definition covers the gaps that matter: cost, payment flow, output format, and error handling. Minor omissions remain, such as input size limits or latency expectations, but nothing required to invoke it correctly is missing.

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 100%, so the schema already documents image, rem_mode, payer_address, and add_background, which sets a baseline of 3. The description goes beyond that by explaining how payer_address participates in invoice creation and redemption and by documenting redemption fields (invoice_id, signature, tx_hash, method=points) that do not appear in the input schema at all.

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 opens with a specific verb+resource ('image background removal') and names the exact engine (local native PyTorch RMBG-1.4) plus the output form (transparent RGBA PNG as Base64). It does not explicitly differentiate against a sibling, but the sibling set (token safety, code audit, MEV routing) is entirely unrelated in domain, so the function is unmistakable.

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 clear operational context: a fee of 0.01 USDC is charged, payer_address must be supplied, and redemption requires invoice_id plus signature. It also states a genuine exclusion — a 409 uncertain outcome must not be automatically retried. It stops short of stating prerequisites such as supported image formats or when to prefer another removal path, so it is not fully exhaustive.

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