Skip to main content
Glama

Confirm a quoted spend

confirm_spend
DestructiveIdempotent

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.

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": {
      "confirmToken": "<confirmToken>"
    },
    "name": "confirm_spend"
  }
}

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?

Annotations already declare destructiveHint=true, openWorldHint=true, and idempotentHint=true; the description adds genuine context beyond them: the call is single-use, bound to a 30-minute window, scoped to this connection, and executes exactly the previously quoted arguments. It does not say what happens when a token has expired or already been consumed, nor what the result object contains, so it stops just short of full disclosure for a destructive operation.

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?

Three compact sentences, front-loaded with the precondition (user said yes) before the mechanics and the safety warning. The opening clause "Runs what a quote was for" is slightly convoluted phrasing, but no sentence is wasted.

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?

With two parameters, full schema coverage, annotations covering the safety profile, and no output schema required, the description supplies everything an agent needs: the trigger condition, the token source, the fallback path, and the single-use/expiry semantics.

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 both parameters are already documented, making 3 the baseline. The description adds meaning the schema does not: the confirmToken comes from the needsConfirmation response of the earlier spend call and authorizes that exact quote, and the confirm:true replay path is an accepted substitute.

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?

The description names a specific action (execute exactly the tool+arguments that were quoted) and explains the round-trip: a spending tool returns needsConfirmation plus a confirmToken, and this tool replays that call after the user approves. That distinguishes it sharply from the original spend tool and from unrelated siblings, without opening either schema.

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?

It states when to call it (after the user says yes to the specific quote), the alternative path (call the original tool again with the same arguments and confirm: true), and an explicit prohibition ("Never call it without the user's yes to that quote"). Constraints on the invocation window (30 minutes) and scope (once, this connection only) further disambiguate appropriate use.

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