Skip to main content
Glama

call_endpoint

Calls x402-protected APIs and handles HTTP 402 payment negotiation automatically. Auto-approves payments under the configured threshold and requests confirmation before higher payments execute.

Instructions

Make a paid API call to an x402-protected endpoint. Handles 402 payment negotiation automatically. Payments under the auto-approve threshold (default $0.05) execute silently. Payments over the threshold return a preview — call again with confirmed: true after user approves. Use discover_endpoints first to find the right URL if you don't know it.

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": "call_endpoint"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesThe full URL of the x402 endpoint to call
bodyNoJSON request body (for POST/PUT)
methodNoHTTP method (default: POST)
headersNoAdditional HTTP headers
confirmedNoSet to true after user confirms a payment that exceeded the auto-approve threshold
prefer_escrowNoPrefer escrow payment if available (default: false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.14

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose important behavior: silent execution below the auto-approve threshold (default $0.05) and a preview/confirmation gate above it. It omits other material traits an agent needs — that spending real funds is irreversible, what the preview response contains, what happens on payment failure, and that DELETE is a supported, potentially destructive method. Useful but incomplete for a money-moving tool.

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?

Four tight sentences, front-loaded with the core purpose, then the payment gating rules, then the discovery hint. No filler; the only slight redundancy is restating the 402 negotiation after already implying it in 'paid API call'.

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 6-parameter tool with no output schema, it covers the essential interaction pattern (pay, preview, confirm) and the discovery path. What remains missing is response shape and failure/irreversibility semantics, but the critical decision flow an agent needs to invoke it correctly is present.

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 the baseline is 3. The description reinforces the meaning of 'confirmed' through the approval loop, but that semantic is already stated in the schema field description, and it adds nothing about prefer_escrow, headers, or body handling beyond the schema.

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 first sentence gives a specific verb and resource ('paid API call to an x402-protected endpoint') plus the key mechanic (automatic 402 negotiation), so an agent knows exactly what this does. Differentiation from siblings is partial: it names discover_endpoints for URL lookup but never contrasts with the similarly named query_endpoint, leaving ambiguity about which one issues the paid call.

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 prescribes a concrete workflow: use discover_endpoints first if the URL is unknown, and re-invoke with confirmed: true after user approval when a payment exceeds the threshold. It does not state when-not to use this tool (e.g., non-x402 endpoints, or read-only queries better served by query_endpoint), so exclusions are absent but the positive guidance is clear.

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