Skip to main content
Glama

Confirm a quoted spend

confirm_spend

Runs what a quote was for, after the user said yes: a tool that spends AI credits first answers with needsConfirmation, the credits and a confirmToken; once the user agrees, call this with that confirmToken (or call the tool again with the same arguments and confirm: true). It runs exactly what was quoted — the same tool and arguments — once, within 30 minutes, for this connection only. Never call it without the user's yes to that quote.

Input Schema

NameRequiredDescriptionDefault
confirmTokenYesThe confirmToken of the quote the user approved (cs_…).
idempotencyKeyNoOptional. A unique id for this action (16-128 chars: letters, digits, _ : . -). If you are unsure whether a call went through (timeout, network error), repeat it with the SAME idempotencyKey and the same arguments: you get the original result and nothing is done twice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Adds substantial context beyond the annotations: the token is single-use, valid for 30 minutes, scoped to this connection, and the execution is verbatim to the quote. What's missing is the failure surface — what happens if the token expired, was already consumed, or the underlying call fails — which matters for a money-spending path even with idempotencyKey documented in the schema.

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?

Two sentences, front-loaded with the flow and ending on the safety prohibition, with zero filler. The first sentence is syntactically dense ('Runs what a quote was for' plus an embedded clause about needsConfirmation) and takes a second read, which costs it the top mark.

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 two-parameter confirmation tool with no output schema, the description supplies everything an agent needs to call it correctly: the precondition, the token source, the alternative invocation path, the expiry window, the single-use scope, and the consent requirement. Return behavior is implied (the quoted tool's result) and the schema's idempotencyKey note covers retry handling.

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 the baseline is 3; the description goes further by explaining the provenance of confirmToken (it comes from the needsConfirmation quote) and by presenting the argument-replay-plus-confirm:true alternative to the token. It does not restate the idempotencyKey contract, but the schema already covers that thoroughly.

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?

Names a specific action (executing exactly the tool+arguments that were quoted) and anchors it to the needsConfirmation/confirmToken handshake, which no sibling tool does. An agent can immediately tell this apart from the spend tool it is confirming: one produces the quote, this one consumes the token.

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 the exact trigger (a prior response returned needsConfirmation with a confirmToken and the user agreed), an explicit alternative route (re-call the original tool with the same arguments plus confirm: true), and a hard prohibition ('Never call it without the user's yes to that quote'). When-to-use, when-not-to-use and the alternative are all stated.

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