Skip to main content
Glama

Last Price

settle_purchase

Close the reservation an allowed check_purchase gave you, once: outcome paid when the purchase went through (send amount when you paid less than reserved; never more), or failed when it did not, which gives the amount back to today's budget. When you cannot tell (the payment timed out or the answer was unreadable), send outcome unknown: the amount stays held, failed is then refused, and reconcile_purchase closes it once you know. A reservation is never released by time alone, so always settle it. Needs a Last Price credential with price compute scope. Needs a claimed workspace: a sandbox key from self-registration is refused (403) until a person claims the workspace.

Input Schema

NameRequiredDescriptionDefault
noteNoOptional: an order or transaction reference, or why it failed or what you saw.
amountNoWith paid: what you actually paid, if less than reserved.
pay_toNoWith paid, when check_purchase named pay_to (then required): the account the money went to. Another account keeps the amount held as unknown, with code payee_changed, for the owner to reconcile with reconcile_purchase. A retry cannot clear the hold.
outcomeYespaid: the purchase went through. failed: it did not. unknown: you cannot tell yet.
reservation_idYesreservation.id from check_purchase.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / pay_to
      Added value: +{
      +  "description": "With paid, when check_purchase named pay_to (then required): the account the money went to. Another account keeps the amount held as unknown, with code payee_changed, for the owner to reconcile with reconcile_purchase. A retry cannot clear the hold.",
      +  "maxLength": 200,
      +  "minLength": 1,
      +  "type": "string"
      +}
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only supply readOnlyHint=false, destructiveHint=false and idempotentHint=false; the description goes well beyond by disclosing the hold semantics (unknown keeps the amount held, failed is then refused), that a reservation is never released by time alone, that a changed payee yields code payee_changed and that a retry cannot clear the hold. It also surfaces two hard prerequisites the annotations do not: a Last Price credential with price compute scope, and a claimed workspace where a self-registration sandbox key gets 403.

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 and outcome branching before prerequisites, and every sentence carries operational weight — no filler. It is dense with nested clauses and prerequisite sentences stacked at the end, but nothing is expendable.

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 mutation with no output schema, the description covers what is needed to call it safely: allowed outcome values and their consequences, hold behavior, the reconciling fallback, credential scope requirements, and the 403 workspace-claim gate. An agent has enough to call it correctly or to know it must escalate.

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, and the description earns above that by clarifying amount semantics ('send amount when you paid less than reserved; never more') and by reinforcing pay_to's conditional requirement tied to what check_purchase returned. The marginal gain is modest because the pay_to property description already carries the payee_changed and retry details, and note is left entirely to the schema.

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 — 'close the reservation an allowed check_purchase gave you' — and explicitly scopes it to one use ('once'). It names its originating sibling (check_purchase) and the follow-up sibling (reconcile_purchase), so an agent can place it in the purchase lifecycle without opening any 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?

Gives explicit when-to-use branches: outcome paid when the purchase went through, failed when it did not, unknown when the result is unreadable or the payment timed out. It also states the consequence that selects the alternative — 'failed is then refused, and reconcile_purchase closes it once you know' — which is a genuine when-not rule with a named alternative.

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