Skip to main content
Glama

Record a trade

record_trade
DestructiveIdempotent

Records a trade the user agreed to: pass the dealId from check_trade (preferred; then list each card's confirmed value in the same order) or the cards themselves, the value the user confirmed for EVERY line (the total for that line's quantity), and any cash in or out. An outgoing card bought through Deal Desk can be given by its purchase dealId. Show the user every value and the cash and pass confirm true after they confirm or edit each one. Outgoing cards leave the collection at their value; incoming cards join it with their value as cost (slab certNumber when visible). All or nothing: if one card can't be recorded nothing is, and the message names it. Trade values are estimates, kept apart from cash profit. If the result has alerts, show them to the user before anything else.

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": {
      "confirm": "<confirm>"
    },
    "name": "record_trade"
  }
}

Input Schema

NameRequiredDescriptionDefault
cashInNoCash the user received in USD.
dealIdNoThe dealId from check_trade.
cashOutNoCash the user paid in USD.
confirmYesTrue once the user said yes to every value and the cash; never set it before that.
incomingNo
outgoingNo
idempotencyKeyNoA unique key for this record (any short text you make up once); a retry with the same key never records twice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, and the description goes well beyond them: outgoing cards leave the collection at their value, incoming cards join with value as cost, slab certNumber is captured, the operation is all-or-nothing with a message naming the failing card, and trade values are kept apart from cash profit as estimates. That is the kind of consequence disclosure an agent needs before committing a destructive write.

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 verb and the input recipe, and every sentence carries a distinct operational rule (ordering, confirmation gate, atomicity, alerts). It is a single dense paragraph, though, so the confirmation gate and the alert-ordering rule are easy to skim past; a light structural break would help without cutting content.

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?

For a 7-parameter destructive mutation with no output schema, the description covers failure semantics, collection side effects, and the alert-surfacing rule, which is most of what an agent needs. Remaining gaps—the exact success response shape and idempotencyKey retry semantics—are handled or partially handled by the schema rather than the description.

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 71%, so baseline would be 3, but the description adds real meaning: value is the confirmed total for a line's quantity, incoming values must follow check_trade's card order, outgoing lines may instead be a Deal Desk purchase dealId, and confirm is a post-user-approval flag only. The idempotencyKey retry behavior and per-line card/grader fields are left 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 ('Records a trade') and immediately scopes it to a trade 'the user agreed to', which separates it from the exploratory check_trade sibling that feeds it a dealId. An agent can tell what this writes and where its inputs come from without opening the 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 an explicit preferred path (dealId from check_trade, with values listed in the same order) and a fallback (pass the cards themselves), plus a prerequisite gate: pass confirm=true only after the user confirms or edits each value and the cash. It also orders later steps (show alerts before anything else), 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