Skip to main content
Glama

Last Price

settle_session_draw

Say what happened to a call you drew for with draw_session_spend. outcome failed: the payment did not go through, so the draw goes back to the session. outcome unknown: you cannot tell (a timeout, an unreadable answer), so the draw keeps counting until it is reconciled. Then, from what you checked, outcome paid (amount when less than drawn) or not paid, each with a note. Not paid gives budget back, so only the workspace's owner may send it: a workspace-wide key with routing write scope, never an agent's own key. 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
noteNoWhat you saw or checked. Required to reconcile.
amountNoWith paid: what was actually paid, if less than drawn.
draw_idYesdraw.id from draw_session_spend.
outcomeYesfailed or unknown to report the call; paid or not paid to reconcile one reported unknown.
session_idYesreservation.id from open_spend_session.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Goes far beyond the annotations, which only say non-read-only, non-destructive, non-idempotent. The description discloses the budget-return side effect of not_paid, the authorization scope required (routing write scope, never an agent's own key), the Last Price credential with price compute scope, and the 403 refusal for unclaimed sandbox workspaces — exactly the kind of behavioral context an agent needs.

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?

The purpose and the outcome branches are front-loaded, and every sentence carries operational meaning (side effects, permissions, preconditions). It is dense run-on prose with several clauses chained together, which costs a little readability, but nothing is redundant filler.

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

Completeness4/5

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

No output schema exists, and the description covers outcome branches, side effects, permissions, and workspace preconditions, so an agent can invoke it correctly. It does not describe the response shape or what happens on idempotent retries, which is a minor residual gap for a mutation tool.

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 still adds value by explaining the semantics of the outcome values and their sequencing and clarifying that amount applies to paid when less than drawn. It does not add syntax details for session_id/draw_id, but the schema already handles those.

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 ('say what happened to a call you drew') and anchors it to the sibling that creates the draw (draw_session_spend). It also distinguishes the two phases of the tool (reporting vs reconciling), so an agent knows exactly what this does relative to its siblings.

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?

Explicitly maps each outcome value to a situation: failed and unknown for reporting, paid/not paid for reconciling a previously reported unknown. It also states who may call it for the not-paid case (workspace owner with a workspace-wide routing-write key) and the credential/workspace prerequisites, leaving little to inference.

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