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. Clients that cannot send _meta may pass payment_method ('points' or 'onchain'), invoice_id, signature and (for on-chain) tx_hash as arguments instead. 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
tx_hashNoBase mainnet USDC transfer hash for on-chain settlement.
rem_modeNoBackground removal model engineRMBG-1.4
signatureNoEIP-191 signature over challengeToSign by payer_address.
invoice_idNoinvoiceId from the payment-required response.
payer_addressYesPayer wallet for invoice creation and redemption
add_backgroundNoOptional background replacement color ('none' for transparent PNG)none
payment_methodNoSettlement rail. 'points' spends membership points; 'onchain' verifies tx_hash.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / invoice_id
      Added value: +{
      +  "description": "invoiceId from the payment-required response.",
      +  "type": "string"
      +}
    • addedInput schema / properties / payment_method
      Added value: +{
      +  "description": "Settlement rail. 'points' spends membership points; 'onchain' verifies tx_hash.",
      +  "enum": [
      +    "points",
      +    "onchain"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / signature
      Added value: +{
      +  "description": "EIP-191 signature over challengeToSign by payer_address.",
      +  "type": "string"
      +}
    • addedInput schema / properties / tx_hash
      Added value: +{
      +  "description": "Base mainnet USDC transfer hash for on-chain settlement.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so richly: it discloses the local PyTorch model, output format, the 0.01 USDC x402 charge, accepted settlement rails, redemption mechanics, and specific error behavior including 503 admission unavailability and 409 uncertain outcomes that must not be retried. This gives an agent strong operational context beyond what structured fields provide.

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 description is front-loaded with purpose and output before payment details, and most sentences earn their place in a genuinely complex payment flow. It is dense and could be structured more cleanly, but it avoids irrelevant filler.

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 an 8-parameter tool with no output schema and complex x402 payment behavior, the description covers output format, payment rails, redemption, and error handling sufficiently to call the tool correctly. Minor operational details such as image size limits or processing time are absent, but the core calling and payment semantics are complete.

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 baseline is 3, but the description adds meaningful semantics for the payment parameters by explaining when clients must pass payment_method, invoice_id, signature, and tx_hash as arguments instead of via _meta, and how redemption works. It also clarifies payer_address usage, adding value beyond the schema descriptions.

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 states a specific verb and resource: "image background removal" using RMBG-1.4, with a clear output of transparent RGBA PNG Base64. It is immediately distinguishable from the listed sibling tools, which are unrelated to image processing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the one-click background-removal purpose and the payment instructions, but there is no explicit when-to-use or when-not-to-use guidance versus any alternative image tool. The payment-route alternatives are explained, yet tool-selection guidance remains implicit.

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