Skip to main content
Glama

Check Spend Approval

alterlab_approval
Read-onlyIdempotent

Check the status of a spend approval raised when a batch or crawl is estimated above the key's approval_above_usd threshold. Use after alterlab_batch or alterlab_crawl returned status pending_approval with an approval_id: show the approval_url to your human, poll this tool (about every 30 seconds) until status is approved, then resubmit the identical request with approval_id. Status is pending, approved, denied or consumed. An API key cannot approve its own spend. Free.

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": {
      "approval_id": "<approval_id>"
    },
    "name": "alterlab_approval"
  }
}

Input Schema

NameRequiredDescriptionDefault
approval_idYesapproval_id from the pending_approval response

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: it enumerates the full status space (pending, approved, denied, consumed), tells the agent to show approval_url to a human, specifies polling frequency, and explains what to do on approval. The self-approval restriction and the 'Free' cost note are behavioral facts the annotations cannot convey.

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?

One tight paragraph, front-loaded with purpose and followed by the operational sequence in execution order (check, show URL, poll, resubmit). No sentence is redundant with the schema or the annotations.

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?

The tool is simple (one required parameter, no output schema) but workflow-dependent, and the description closes every loop an agent needs: the originating condition, the enumerated status values that substitute for an output schema, the polling interval, and the exact next call. Nothing material is left to inference.

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% and the single approval_id parameter is already described, so the structured data does most of the work. The description still adds provenance the schema lacks: the ID must come from a pending_approval response and must be carried forward unchanged into the resubmitted request.

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 ('Check the status of a spend approval') and immediately scopes it to approvals raised when a batch or crawl exceeds the key's approval_above_usd threshold, which clearly separates it from the batch/crawl siblings that create the work.

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?

Gives an explicit trigger ('after alterlab_batch or alterlab_crawl returned status pending_approval with an approval_id'), an explicit cadence (poll about every 30 seconds), an explicit completion condition, and the exact follow-up action (resubmit the identical request with approval_id). It also states the constraint that an API key cannot approve its own spend, which directs the agent to surface the approval_url to a human.

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.