Skip to main content
Glama

Execute API call

execute
Destructive

Call one enabled endpoint by slug with args from its schema; charges credits. Get the slug from search_apis. max_credits caps the charge. Omit idempotency_key; repeats replay (idempotent_replay:true). Long results continue via get_call_result.

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": {
      "slug": "<slug>"
    },
    "name": "execute"
  }
}

Input Schema

NameRequiredDescriptionDefault
argsNoEndpoint args; call describe_api for schema.
slugYesprovider/endpoint slug.
loop_idNoAgent loop ID when policy requires one.
attributionNoSpend attribution: taskId + feature (+ optional appVersion).
max_creditsNoMost credits this call may charge.
approval_tokenNoFrom an approval error; send its idempotency_key.
idempotency_keyNoOmit; resend a returned key to retry.

Output Schema

NameRequiredDescriptionDefault
dataYesRaw provider response.
usd_chargedNoUSD charged (secret-key auth only).
credits_balanceNo
credits_chargedNo
idempotent_replayNoStored replay; no new charge.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / idempotency_key / description
      Previous value: -"Reuse on retry; charges once."New value: +"Omit; resend a returned key to retry."
  2. Changed2 schema fields changed
    • changedInput schema / properties / approval_token / description
      Previous value: -"estimate_cost quote; requires its idempotency_key."New value: +"From an approval error; send its idempotency_key."
    • addedInput schema / properties / max_credits
      Added value: +{
      +  "description": "Most credits this call may charge.",
      +  "type": [
      +    "string",
      +    "number"
      +  ]
      +}
  3. Changed5 schema fields changed
    • changedInput schema / properties / idempotency_key / description
      Previous value: -"Stable exactly-once retry key."New value: +"Reuse on retry; charges once."
    • removedOutput schema / properties / credits_balance / description
      Removed value: -"Remaining credit balance."
    • removedOutput schema / properties / credits_charged / description
      Removed value: -"Credits debited for this call."
    • changedOutput schema / properties / data / description
      Previous value: -"Raw upstream provider response body."New value: +"Raw provider response."
    • changedOutput schema / properties / idempotent_replay / description
      Previous value: -"True when a stored identical call was replayed; no new charge was made."New value: +"Stored replay; no new charge."
  4. Changed1 schema field changed
    • changedInput schema / properties / args / description
      Previous value: -"Endpoint args; schema and example via search_apis or describe_api."New value: +"Endpoint args; call describe_api for schema."
  5. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare destructive/openWorld/not-readOnly; the description adds the costly, charging nature of the call, the max_credits cap, and the truncated-result continuation path. It also reconciles idempotency: the tool is not idempotent by default (consistent with idempotentHint=false), but resending a returned key replays and returns idempotent_replay:true, which is exactly the nuance an agent needs to avoid double-charging.

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?

Four compact clauses compressed into a single dense passage, front-loaded with the core action and cost, then discovery source, then guardrails. No filler sentences and no restatement of the title.

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 7-parameter, costly, open-world mutation tool with an output schema present, the description covers the action, cost model, input source, replay semantics, and result continuation. Return-shape detail is correctly delegated to the output schema, so nothing an agent needs to call this safely is missing.

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 already 100%, so the baseline is 3, but the description still adds real semantics: max_credits caps the charge, idempotency_key should be omitted unless replaying, and slug must come from search_apis. The args object and approval_token flow are only covered in the schema descriptions, which keeps this below a 5.

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?

"Call one enabled endpoint by slug with args from its schema; charges credits" gives a specific verb, resource, input source, and cost consequence in one clause. It also implicitly separates itself from siblings by naming search_apis for slug discovery and get_call_result for continuation, so an agent can route without opening another schema.

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 explicitly routes pre-execution lookup to search_apis and post-execution continuation to get_call_result, and tells the agent to omit idempotency_key rather than generate one. It stops short of stating exclusions such as when not to execute (e.g., missing approval_token, unknown slug), but the main decision points are covered.

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.