Skip to main content
Glama

Run an API

run_api
Destructive

Execute an API by API slug with a normalized input payload. Every input schema is strict: unknown fields are rejected, not ignored, and field names can differ between related APIs. Inputs must conform to the endpoint's schema, not its description. Published latency p50/p95/p99 and sample counts describe observed successful requests; p99 is an observation, not a maximum or a client timeout guarantee. Requires a valid AnyAPI key as a Bearer token. Charges the USD wallet. Some failed wallet-funded requests incur processing charges passed through at cost, with no markup; the error message shows the amount charged. Results can be large. fields keeps selected keys, max_items caps returned rows, and summary returns an outline; these controls reduce response size without changing the charge.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jqNooptional: a jq expression to reshape the result; its output replaces 'output' (multiple outputs collect into an array). Example: '.data | {title, description, md: .markdown[:3500]}'. Sandboxed 250ms/2MB budget; on failure the full result is returned with jqError. Does not change cost
inputYesnormalized input payload matching the API input schema
fieldsNooptional: keep only these keys on each result item - each row of the result list, or the data object itself for an API that returns one record (dotted paths like 'author.name' descend into nested objects). Shrinks the response without changing cost
sku_idYesthe API SKU slug to execute
contextYesBrief purpose of this tool call within the requested task, used for analytics and user-intent tracking.
summaryNooptional: return only a structural outline (top-level keys, item counts, and per-field byte sizes) instead of the full data. Does not change cost
max_itemsNooptional: cap the number of result items returned; a _truncated note reports how many were withheld. An API that returns one record is not trimmed. Does not change cost

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hintNooptional result caveat. 'large_result:' identifies a large response; fields/max_items/summary reduce response size without changing cost. 'paging_unavailable:' means the source cannot return a nextCursor, so the result may be incomplete and cannot be paged further; requireFields ["nextCursor"] restricts execution to sources that support pagination and may cost more per request. 'malformed_query:' means X interpreted adjacent bare words as ANDed and OR as having higher precedence, so a multi-word alternative is not a phrase; the result reflects that interpretation, and the hint includes a corrected query. 'date_adjusted:' means an input date was outside the platform's accepted range, so execution used the nearest accepted date named in the hint
errorNosafe AnyAPI failure code when durable work failed
itemsYesnumber of result rows returned; an API that returns one record counts it as one row. For per-result APIs the per-item cost is charged against this; for input-priced APIs (perItemUnit != result) the charge is per submitted input, independent of this count
outputYesnormalized output payload
sourceNothe source that served this request; its id is accepted by 'source' for preference or 'ignoreSources' for exclusion. Absent when no source identity applies
statusNodurable request status: queued, running, succeeded, failed, or expired
costUsdYesamount charged to the wallet in USD
jqErrorNopresent only when a jq expression failed; output then holds the full unshaped result and this explains why the reshape did not apply
providerYesthe provider serving the request (AnyAPI)
replayedYestrue when this response replays an identical earlier call (same API, same input) from the last few minutes instead of running again: nothing new was executed and costUsd restates the original charge, it was NOT charged a second time
resultIdNoopaque handle to the full result, cached ~15 min; identifies the paid result available for free reshaping without another execution or charge. Absent when the result was too large to cache
requestIdNodurable request identifier for stored status and result retrieval without repeating the paid provider dispatch
nextActionNostored-request retrieval coordinates and polling interval present while durable work is pending
serviceOutcomeNoend-to-end AnyAPI service outcome when known
settlementStateNopayment settlement state when known; independent of durable request status

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / context / description
      Previous value: -"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.\""New value: +"Brief purpose of this tool call within the requested task, used for analytics and user-intent tracking."
  2. Changed7 schema fields changed
    • changedOutput schema / properties / hint / description
      Previous value: -"optional nudge. 'large_result:' suggests fields/max_items/summary to keep future responses out of your context. 'paging_unavailable:' means this result came from a source that cannot return a nextCursor, so it may be INCOMPLETE and you cannot page further - re-run with requireFields [\"nextCursor\"] (may cost more per request) if you need the full list. 'malformed_query:' means X read your search query differently than it looks (adjacent bare words are ANDed and OR binds tighter, so a multi-word alternative is not a phrase); this result is what X returned for it, and the hint carries the corrected query to send next time. 'date_adjusted:' means a date you sent was outside the range the platform accepts, so the run used the nearest accepted date the hint names"New value: +"optional result caveat. 'large_result:' identifies a large response; fields/max_items/summary reduce response size without changing cost. 'paging_unavailable:' means the source cannot return a nextCursor, so the result may be incomplete and cannot be paged further; requireFields [\"nextCursor\"] restricts execution to sources that support pagination and may cost more per request. 'malformed_query:' means X interpreted adjacent bare words as ANDed and OR as having higher precedence, so a multi-word alternative is not a phrase; the result reflects that interpretation, and the hint includes a corrected query. 'date_adjusted:' means an input date was outside the platform's accepted range, so execution used the nearest accepted date named in the hint"
    • changedOutput schema / properties / nextAction / description
      Previous value: -"machine-actionable resume instruction present while durable work is pending"New value: +"stored-request retrieval coordinates and polling interval present while durable work is pending"
    • changedOutput schema / properties / nextAction / properties / requestId / description
      Previous value: -"request_id argument for the next tool call"New value: +"durable request identifier for stored-request retrieval"
    • changedOutput schema / properties / nextAction / properties / tool / description
      Previous value: -"MCP tool to call next"New value: +"MCP tool name for stored-request retrieval"
    • changedOutput schema / properties / requestId / description
      Previous value: -"durable request identifier; pass it to get_request to resume without repeating the paid POST"New value: +"durable request identifier for stored status and result retrieval without repeating the paid provider dispatch"
    • changedOutput schema / properties / resultId / description
      Previous value: -"opaque handle to the full result, cached ~15 min; pass it to read_result to dig deeper for free (no re-run, no charge). Absent when the result was too large to cache"New value: +"opaque handle to the full result, cached ~15 min; identifies the paid result available for free reshaping without another execution or charge. Absent when the result was too large to cache"
    • changedOutput schema / properties / source / description
      Previous value: -"the source that served this run: pass its id back in 'source' to prefer it again, or in 'ignoreSources' to avoid it. Absent when no source identity applies"New value: +"the source that served this request; its id is accepted by 'source' for preference or 'ignoreSources' for exclusion. Absent when no source identity applies"
  3. Changed1 schema field changed
    • changedOutput schema / properties / hint / description
      Previous value: -"optional nudge. 'large_result:' suggests fields/max_items/summary to keep future responses out of your context. 'paging_unavailable:' means this result came from a source that cannot return a nextCursor, so it may be INCOMPLETE and you cannot page further - re-run with requireFields [\"nextCursor\"] (may cost more per request) if you need the full list. 'malformed_query:' means X read your search query differently than it looks (adjacent bare words are ANDed and OR binds tighter, so a multi-word alternative is not a phrase); this result is what X returned for it, and the hint carries the corrected query to send next time"New value: +"optional nudge. 'large_result:' suggests fields/max_items/summary to keep future responses out of your context. 'paging_unavailable:' means this result came from a source that cannot return a nextCursor, so it may be INCOMPLETE and you cannot page further - re-run with requireFields [\"nextCursor\"] (may cost more per request) if you need the full list. 'malformed_query:' means X read your search query differently than it looks (adjacent bare words are ANDed and OR binds tighter, so a multi-word alternative is not a phrase); this result is what X returned for it, and the hint carries the corrected query to send next time. 'date_adjusted:' means a date you sent was outside the range the platform accepts, so the run used the nearest accepted date the hint names"
  4. Changed1 schema field changed
    • changedOutput schema / properties / hint / description
      Previous value: -"optional nudge. 'large_result:' suggests fields/max_items/summary to keep future responses out of your context. 'paging_unavailable:' means this result came from a source that cannot return a nextCursor, so it may be INCOMPLETE and you cannot page further - re-run with requireFields [\"nextCursor\"] (may cost more per request) if you need the full list"New value: +"optional nudge. 'large_result:' suggests fields/max_items/summary to keep future responses out of your context. 'paging_unavailable:' means this result came from a source that cannot return a nextCursor, so it may be INCOMPLETE and you cannot page further - re-run with requireFields [\"nextCursor\"] (may cost more per request) if you need the full list. 'malformed_query:' means X read your search query differently than it looks (adjacent bare words are ANDed and OR binds tighter, so a multi-word alternative is not a phrase); this result is what X returned for it, and the hint carries the corrected query to send next time"
  5. Changed3 schema fields changed
    • changedInput schema / properties / fields / description
      Previous value: -"optional: keep only these keys on each result item (dotted paths like 'author.name' descend into nested objects). Shrinks the response without changing cost"New value: +"optional: keep only these keys on each result item - each row of the result list, or the data object itself for an API that returns one record (dotted paths like 'author.name' descend into nested objects). Shrinks the response without changing cost"
    • changedInput schema / properties / max_items / description
      Previous value: -"optional: cap the number of result items returned; a _truncated note reports how many were withheld. Does not change cost"New value: +"optional: cap the number of result items returned; a _truncated note reports how many were withheld. An API that returns one record is not trimmed. Does not change cost"
    • changedOutput schema / properties / items / description
      Previous value: -"number of result rows returned. For per-result SKUs the per-item cost is charged against this; for input-priced SKUs (perItemUnit != result) the charge is per submitted input, independent of this count"New value: +"number of result rows returned; an API that returns one record counts it as one row. For per-result APIs the per-item cost is charged against this; for input-priced APIs (perItemUnit != result) the charge is per submitted input, independent of this count"
  6. Changed1 schema field changed
    • addedOutput schema / properties / source
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "the source that served this run: pass its id back in 'source' to prefer it again, or in 'ignoreSources' to avoid it. Absent when no source identity applies",
      +  "properties": {
      +    "artworkKey": {
      +      "type": "string"
      +    },
      +    "id": {
      +      "type": "string"
      +    },
      +    "kind": {
      +      "type": "string"
      +    },
      +    "name": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "name",
      +    "kind",
      +    "artworkKey"
      +  ],
      +  "type": [
      +    "null",
      +    "object"
      +  ]
      +}
  7. Changed1 schema field changed
    • changedOutput schema / properties / hint / description
      Previous value: -"optional nudge. 'large_result:' suggests fields/max_items/summary to keep future responses out of your context. 'paging_unavailable:' means this result came from a source that cannot return a nextCursor, so it may be INCOMPLETE and you cannot page further - re-run with requireCursor true (may cost more per request) if you need the full list"New value: +"optional nudge. 'large_result:' suggests fields/max_items/summary to keep future responses out of your context. 'paging_unavailable:' means this result came from a source that cannot return a nextCursor, so it may be INCOMPLETE and you cannot page further - re-run with requireFields [\"nextCursor\"] (may cost more per request) if you need the full list"
  8. Changed12 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • 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: -[
      -  "sku_id",
      -  "input"
      -]New value: +[
      +  "sku_id",
      +  "input",
      +  "context"
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "safe AnyAPI failure code when durable work failed",
      +  "properties": {
      +    "code": {
      +      "description": "safe AnyAPI error code",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code"
      +  ],
      +  "type": [
      +    "null",
      +    "object"
      +  ]
      +}
    • changedOutput schema / properties / hint / description
      Previous value: -"optional nudge, present only on large untrimmed results, suggesting fields/max_items/summary to keep future responses out of your context"New value: +"optional nudge. 'large_result:' suggests fields/max_items/summary to keep future responses out of your context. 'paging_unavailable:' means this result came from a source that cannot return a nextCursor, so it may be INCOMPLETE and you cannot page further - re-run with requireCursor true (may cost more per request) if you need the full list"
    • addedOutput schema / properties / nextAction
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "machine-actionable resume instruction present while durable work is pending",
      +  "properties": {
      +    "requestId": {
      +      "description": "request_id argument for the next tool call",
      +      "type": "string"
      +    },
      +    "retryAfterSeconds": {
      +      "description": "minimum delay before polling again",
      +      "type": "integer"
      +    },
      +    "tool": {
      +      "description": "MCP tool to call next",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "tool",
      +    "requestId",
      +    "retryAfterSeconds"
      +  ],
      +  "type": [
      +    "null",
      +    "object"
      +  ]
      +}
    • addedOutput schema / properties / replayed
      Added value: +{
      +  "description": "true when this response replays an identical earlier call (same API, same input) from the last few minutes instead of running again: nothing new was executed and costUsd restates the original charge, it was NOT charged a second time",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / requestId
      Added value: +{
      +  "description": "durable request identifier; pass it to get_request to resume without repeating the paid POST",
      +  "type": "string"
      +}
    • addedOutput schema / properties / serviceOutcome
      Added value: +{
      +  "description": "end-to-end AnyAPI service outcome when known",
      +  "type": "string"
      +}
    • addedOutput schema / properties / settlementState
      Added value: +{
      +  "description": "payment settlement state when known; independent of durable request status",
      +  "type": "string"
      +}
    • addedOutput schema / properties / status
      Added value: +{
      +  "description": "durable request status: queued, running, succeeded, failed, or expired",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "output",
      -  "provider",
      -  "costUsd",
      -  "items"
      -]New value: +[
      +  "output",
      +  "provider",
      +  "costUsd",
      +  "items",
      +  "replayed"
      +]
  9. Changed4 schema fields changed
    • addedInput schema / properties / jq
      Added value: +{
      +  "description": "optional: a jq expression to reshape the result; its output replaces 'output' (multiple outputs collect into an array). Example: '.data | {title, description, md: .markdown[:3500]}'. Sandboxed 250ms/2MB budget; on failure the full result is returned with jqError. Does not change cost",
      +  "type": "string"
      +}
    • changedInput schema / properties / summary / description
      Previous value: -"optional: return only a structural outline (top-level keys and item counts) instead of the full data. Does not change cost"New value: +"optional: return only a structural outline (top-level keys, item counts, and per-field byte sizes) instead of the full data. Does not change cost"
    • addedOutput schema / properties / jqError
      Added value: +{
      +  "description": "present only when a jq expression failed; output then holds the full unshaped result and this explains why the reshape did not apply",
      +  "type": "string"
      +}
    • addedOutput schema / properties / resultId
      Added value: +{
      +  "description": "opaque handle to the full result, cached ~15 min; pass it to read_result to dig deeper for free (no re-run, no charge). Absent when the result was too large to cache",
      +  "type": "string"
      +}
  10. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Far beyond the annotations, it discloses that the call charges the USD wallet, that some failed wallet-funded requests still incur passed-through processing charges with the amount shown in the error, that results can be large, and that p99 is an observation rather than a timeout guarantee. These are exactly the behaviors an agent cannot infer from destructiveHint/openWorldHint alone.

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 the core action, then cost/auth, then response-size controls. Dense but each sentence carries information; the p50/p95/p99 sentence is the longest and least immediately actionable, but still earns its place given the pricing model.

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, non-idempotent, potentially destructive open-world call, it covers authentication, cost, failure-charge semantics, and response-size mitigation, and an output schema already exists for return values. Nothing an agent needs before invoking 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 100%, so baseline is 3, but the description adds cross-cutting meaning the schema lacks: fields, max_items, and summary shrink the response without changing the charge, which is the key decision criterion for using them. It omits jq's sandbox budget the schema already documents, so it is additive rather than exhaustive.

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?

States a specific verb ('Execute') and resource ('an API by API slug') plus the payload shape, so the agent knows exactly what happens. It is distinguishable from siblings like get_api or list_apis in spirit, but never names quote_api, which is the closest alternative for the same resource, so differentiation is only implicit.

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?

It gives real preconditions: a valid AnyAPI key as Bearer token, inputs must match the endpoint's schema (not its description), and unknown fields are rejected. However it never says when to pick this over quote_api, nor warns that a paid, destructive call should be preceded by a cost check, so routing guidance is only implied.

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