Skip to main content
Glama
machine-utility-foundry

machine-utility-foundry

safe_x402_request

Call external x402 paid APIs on Base Mainnet USDC with automatic counterparty honeypot screening, bait-and-switch defense, gasless settlement, and post-payment slashing for failed merchant responses.

Instructions

[Universal Safe x402 Gateway] Call ANY external https:// x402 paid API on Base Mainnet USDC with automatic Foundry Ed25519 counterparty honeypot screening, split-horizon bait-and-switch defense, EIP-3009 gasless USDC settlement, and automatic on-chain post-payment slashing if the merchant returns 5xx/broken data.

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": {
      "url": "<url>"
    },
    "name": "safe_x402_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesPublic https:// URL of the external x402 API endpoint to invoke.
bodyNoOptional JSON object or string request body for POST calls.
maxUsdNoMaximum USD price allowed for this call (capped by local MAX_PAYMENT_USD).
methodNoHTTP method (default: 'GET', or 'POST' when `body` is provided).
headersNoOptional extra HTTP request headers.
skipOracleForMicroUsdBelowNoOptional USD threshold below which the $0.005 Foundry pre-check is skipped (default 0 = always verify).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations only say openWorldHint=true and readOnlyHint=false; the description adds the material facts that money is spent (USDC on Base), that settlement is gasless via EIP-3009, and that there is automatic honeypot screening and post-payment slashing on 5xx/broken data. What it omits is the failure path an agent most needs: whether a failed or slashed call still debits the wallet, and how refunds or partial payments are handled.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler sentences, but it is a dense stack of jargon ('split-horizon bait-and-switch defense', 'Foundry Ed25519 counterparty honeypot screening') that consumes attention without resolving the operational questions. Compressing the defensive features would free space for payment-outcome semantics.

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

Completeness3/5

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

Six parameters, 100% schema coverage, and no output schema, so the description should say what comes back — HTTP response body, payment receipt, cost charged, slashing result. It describes the guard machinery but not the return contract, leaving a real gap for a tool that moves funds.

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 description coverage is 100%, so every parameter including maxUsd and skipOracleForMicroUsdBelow is already documented in the schema. The description adds no parameter-level meaning — it never mentions maxUsd, the oracle skip threshold, or method/body interaction, so baseline 3 applies.

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?

Names a specific verb and resource: 'Call ANY external https:// x402 paid API on Base Mainnet USDC'. The gateway framing distinguishes it from planning rivals such as plan_safe_x402_failover_route or recommend_x402_api, though it never names a sibling to route away from explicitly.

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 'Call ANY external x402 paid API' — this is the tool that actually executes and pays. There is no explicit when-not guidance (budget exhaustion, untrusted counterparties, previewing first) and no reference to the planning or recommendation siblings an agent typically consults before spending.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.