Skip to main content
Glama

Request Spend Approval

ledger_request_approval

Ask your workspace owner for a one-shot spend exception before a ledger_track that the cap would refuse.

Creates a pending permit for exactly amount_cents on the given service. The owner (a human, or a supervisor agent holding the workspace_key) approves or denies it with ledger_approval_decide. An APPROVED permit is consumed by the next ledger_track for this agent whose amount fits inside it — the budget cap itself does not change. Permits expire after 1 hour undecided. Poll with ledger_approvals to see the decision.

Claiming a brand-new agent_id requires workspace_key; otherwise pass the agent's agent_secret.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNowhy, one line — shown to the approver
serviceYeswhat the money is for (e.g. "openai:gpt-5 batch eval")
agent_idYesthe agent asking for the exception
agent_secretNothe agent's own secret (either this or workspace_key)
amount_centsYesthe spend to be approved, in cents
workspace_keyNothe owning workspace's key (either this or agent_secret)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations (which only say non-readOnly, non-idempotent, non-destructive), the description discloses the one-shot consumption rule, the 1-hour expiry, that the budget cap is unchanged, and the approval/authorization model (owner human or supervisor with workspace_key). This is exactly the behavioral context annotations cannot carry.

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 the lifecycle, then auth. Nearly every sentence carries distinct load, though the auth sentence could sit earlier and the density is high for a single paragraph.

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 non-idempotent mutating tool with a 6-param schema (100% documented) and an output schema present, the description covers everything needed: trigger, artifact semantics, expiry, consumption, decision path, and auth. Return values are correctly left to the output schema.

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; the description adds real meaning by clarifying that the permit is for 'exactly amount_cents' (no partial fit) and by disambiguating the two auth parameters: workspace_key is for claiming a brand-new agent_id, otherwise pass agent_secret. That resolves a choice the schema only lists as 'either this or workspace_key'.

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+resource ('Ask your workspace owner for a one-shot spend exception') and precisely scopes the artifact created: a pending permit for exactly amount_cents on a given service. It also names the triggering context (a ledger_track the cap would refuse), so it is unmistakable against siblings like ledger_track and ledger_set_budget.

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 when ('before a ledger_track that the cap would refuse') and routes to the relevant siblings by role: ledger_approval_decide for the decision, ledger_approvals to poll. It also distinguishes the budget-raising alternative implicitly by noting the cap itself does not change.

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.