Skip to main content
Glama

AI Code Security Gate

Check Agent Spending

spend_check

Authorize-only spend check against the agent's budget (no recording). Costs 1¢ per attempt.

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": {
      "agent_id": "<agent_id>",
      "amount_cents": "<amount_cents>"
    },
    "name": "spend_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
reasonNo
api_keyNo
agent_idYes
amount_centsYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior4/5

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

The description adds real information beyond the annotations: it costs 1¢ per attempt and it does not record anything. The per-attempt cost is especially valuable given idempotentHint=false, since retries are billed. It does not explain the authorization outcome (approve/deny signaling) or the role of api_key.

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?

Two short sentences, zero filler, with the core scope stated first and the cost caveat immediately after. Nothing could be removed without losing meaning.

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

Completeness3/5

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

An output schema exists, so return values need not be described. Still, a 4-parameter authorization tool with no parameter documentation and no mention of denial behavior or credential handling leaves notable gaps for an agent trying to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden, yet it explains none of the four parameters. In particular api_key (auth credential?) and reason (audit/justification?) are undocumented in both places.

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?

The description names a specific verb and resource ('spend check against the agent's budget') and scopes it with 'authorize-only ... (no recording)', which implicitly separates it from the sibling spend_record. It stops short of naming the alternative, so differentiation requires a small inference.

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?

'Authorize-only' and 'no recording' imply the use case: check whether a spend would be allowed without committing it. However, there is no explicit statement of when to call this versus spend_record, no preconditions, and no guidance on what to do with a denial.

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.