Skip to main content
Glama

Run a tool (paid)

run_tool

Runs one TollNode tool and returns its result: text, data, or links to the files it made. Spends money: the tool's price (see get_tool) is charged only when the call returns a usable result; a refused input, a failure or an empty result costs nothing. Every successful call is charged again, so do not repeat one that worked; send idempotency_key to make a retry safe. Pay from an account balance (API key on the connection) or with x402: the first call answers with the payment requirements as an error result; sign them and call again with the payment in params._meta["x402/payment"]. Account results end with the amount charged and a request id for get_call. The whole request is capped at 4.5 MB: send photos, audio and video as https links, or call upload_file first for anything over about 3 MB and pass its fileUrl.

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": {
      "name": "<name>",
      "input": "<input>"
    },
    "name": "run_tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesThe tool's name from search_tools, e.g. 'weather'.
inputYesThe tool's input fields, exactly as get_tool's inputSchema describes them, e.g. {"action": "current", "location": "Lisbon"}.
idempotency_keyNoOptional, any unique text. Repeating an account call with the same key returns the first successful result without charging again. A call that was refused (rate limit, bad input, low balance) or failed does not use the key up: retrying with the same key is safe and runs the call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / idempotency_key / description
      Previous value: -"Optional, any unique text. Repeating an account call with the same key returns the first result without charging again."New value: +"Optional, any unique text. Repeating an account call with the same key returns the first successful result without charging again. A call that was refused (rate limit, bad input, low balance) or failed does not use the key up: retrying with the same key is safe and runs the call."
  2. Added

TDQS

A4.7/5.0
Behavior4/5

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

Annotations only tell us it is a non-readonly, open-world, non-idempotent, non-destructive call; the description carries the real behavior: charging only on usable results, no charge for refusals or failures, repeat calls charged again, the 4.5 MB request cap, and the full x402 payment handshake. It does not spell out auth failure modes or what 'usable result' means precisely, so it falls just short of exhaustive.

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

Conciseness5/5

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

Front-loaded with what it does and what it costs, then payment mechanics, then the size cap. Dense but every sentence carries operational weight — no restatement of the name or filler.

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

Completeness5/5

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

For a paid, nested-input, no-output-schema tool, the description covers everything an agent needs: cost model, retry safety, payment paths, size limits, and the shape of the response including the charged amount and request id.

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 meaning the schema lacks: where the x402 payment must be placed (params._meta["x402/payment"]), why idempotency_key exists (making retries safe rather than preventing re-charges), and that `name` comes from search_tools while `input` must match get_tool's inputSchema.

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?

States a specific verb and resource ("Runs one TollNode tool") and immediately specifies the return shape: text, data, or links to generated files. It is clearly distinguishable from siblings like get_tool (price lookup), get_call (call record), and search_tools (discovery).

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?

Explicitly routes the agent: see get_tool for price, use upload_file for anything over ~3 MB, use get_call for the request id, and do not repeat a successful call. It also states when a retry is free (refused/failed) versus charged, which is exactly the when/when-not guidance that matters here.

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