Skip to main content
Glama

Call a paid API

call

Call one of the discovered endpoints and pay for it from the user's balance. This is the only tool here that spends anything. quote the same request first to read the real price off the endpoint's HTTP-402 challenge, then repeat it here with max_amount_usd set to that quote — always send it, so a repriced endpoint cannot charge more than the price you read. Calls above $10 are refused; max_amount_usd can tighten that ceiling further. Charged only when the endpoint delivers: a rejection before the call and an upstream error are free. A successful call is charged even when its answer is empty or useless; no refund follows, so rate the endpoint down with a report and check balance if a paid response looks wrong. An async job is one purchase: polling its task id to a terminal status belongs to the submit, approved or not, and counts toward the task budget. Poll its status URL with this tool too: the job belongs to the wallet that paid for it, so a direct request is refused. Polls can be charged: poll at the documented cadence, or every 20 seconds past the typical completion time. After 30 polls, stop and tell the user the job is still running. Resubmitting buys it twice.

Input Schema

NameRequiredDescriptionDefault
urlYesendpoint URL, exactly as `discover` returned it
bodyNorequest body, sent as JSON: pass the object itself, e.g. {"prompt": "a cat"}, not a JSON-encoded string
modelNoyour own model id, e.g. claude-opus-5. It changes nothing about the call, and tells us which models the catalog serves. Skip it if you are not sure.
methodNoHTTP method (default GET)
dry_runNoquote the real price without paying, same as `quote`
headersNoextra request headers, no auth headers needed
max_amount_usdNoyour spend ceiling for this call, in USD. Always send it on a paid call: set it to the price `quote` returned, so a repriced endpoint is refused rather than charged

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / dry_run / description
      Previous value: -"quote the real price without paying"New value: +"quote the real price without paying, same as `quote`"
    • changedInput schema / properties / max_amount_usd / description
      Previous value: -"your own spend ceiling for this call, in USD"New value: +"your spend ceiling for this call, in USD. Always send it on a paid call: set it to the price `quote` returned, so a repriced endpoint is refused rather than charged"
  2. Changed1 schema field changed
    • addedInput schema / properties / model
      Added value: +{
      +  "description": "your own model id, e.g. claude-opus-5. It changes nothing about the call, and tells us which models the catalog serves. Skip it if you are not sure.",
      +  "type": "string"
      +}
  3. Changed2 schema fields changed
    • changedInput schema / properties / body / description
      Previous value: -"request body, sent as JSON — pass the object itself, e.g. {\"prompt\": \"a cat\"}, not a JSON-encoded string"New value: +"request body, sent as JSON: pass the object itself, e.g. {\"prompt\": \"a cat\"}, not a JSON-encoded string"
    • changedInput schema / properties / headers / description
      Previous value: -"extra request headers — no auth headers needed"New value: +"extra request headers, no auth headers needed"
  4. Changed2 schema fields changed
    • removedInput schema / properties / context
      Removed value: -{
      -  "description": "Explain why you are calling this tool and how it fits into the user's overall goal. This parameter is used for analytics and user intent tracking. YOU MUST provide 15-25 words (count carefully). NEVER use first person ('I', 'we', 'you') - maintain third-person perspective. NEVER include sensitive information such as credentials, passwords, or personal data. Example (20 words): \"Searching across the organization's repositories to find all open issues related to performance complaints and latency issues for team prioritization.\"",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "url",
      -  "context"
      -]New value: +[
      +  "url"
      +]
  5. Changed2 schema fields changed
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "Explain why you are calling this tool and how it fits into the user's overall goal. This parameter is used for analytics and user intent tracking. YOU MUST provide 15-25 words (count carefully). NEVER use first person ('I', 'we', 'you') - maintain third-person perspective. NEVER include sensitive information such as credentials, passwords, or personal data. Example (20 words): \"Searching across the organization's repositories to find all open issues related to performance complaints and latency issues for team prioritization.\"",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "url"
      -]New value: +[
      +  "url",
      +  "context"
      +]
  6. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only say non-readonly, open-world, non-idempotent; the description carries the real cost model: $10 hard ceiling, max_amount_usd as a tightening cap, free on pre-call rejection or upstream error, charged even for empty/useless answers, no refunds. Async-job ownership (wallet-bound, direct requests refused) is context no annotation could convey.

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-loaded with purpose, then a dense chain of constraints where nearly every sentence adds a distinct rule (ceiling, free failures, no refunds, async ownership, poll cadence). It is long and unsegmented relative to typical descriptions, but the payment complexity justifies most of the length; bullets would improve scanability.

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?

Covers the hard parts — spend ceiling, failure billing, async job lifecycle, polling budget — for a 7-param open-world tool. The one gap is that with no output schema, the description never says what a successful call returns (the endpoint's raw response/body), which an agent must infer.

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 real semantics for `max_amount_usd` (set it to the quoted price, always send it so repricing fails closed) and ties `url` to the discover output. The remaining params (method, headers, model, dry_run) are left to the schema.

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?

Specific verb+resource: 'Call one of the discovered endpoints and pay for it from the user's balance,' and it immediately separates itself from siblings ('the only tool here that spends anything'). It also names `quote`, `balance`, and a report/rate action, so an agent can route between tools without opening schemas.

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

Usage Guidelines5/5

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

Explicit sequencing: quote first, then repeat with max_amount_usd set to that quote; always send it. Polling rules are spelled out (documented cadence, every 20s past typical completion, stop after 30 polls), plus the exclusion 'resubmitting buys it twice.' This is when/when-not/alternatives at full strength.

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