Skip to main content
Glama

Check a trade against every Canton venue at that time

check_trade
Read-onlyIdempotent

Was a trade well executed? Give the token sold and bought, the amount sold, the amount received, the time (ISO such as 2026-10-27T18:05:00Z, or unix seconds) and optionally the venue. The trade is priced again on every venue from the pool reserves and order books read at the five-minute ticks either side of it (archive since 27 Oct 2026), by the same code as quote(), after network fees. Returns the venue that returned the most, how far the trade fell short of it in basis points (at the reading least favourable to that), and with venue given, how much of the gap was the choice of venue and how much the fill itself. Nothing is executed or stored.

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": {
      "sell": "<sell>",
      "buy": "<buy>",
      "amount_in": "<amount_in>",
      "amount_out": "<amount_out>",
      "time": "<time>"
    },
    "name": "check_trade"
  }
}

Input Schema

NameRequiredDescriptionDefault
buyYesSymbol of the token bought, e.g. USDCx
sellYesSymbol of the token sold, e.g. CC
timeYesWhen the trade ran: ISO 8601 such as 2026-10-27T18:05:00Z, or unix seconds; the archive starts 27 Oct 2026 21:01 UTC
venueNoOptional: the venue it ran on, e.g. cantex, tradecraft, oneswap, temple, rocky, kora or poolparty
amount_inYesHow much of the sold token went in, in its own units
amount_outYesHow much of the bought token came back, in its own units

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / venue / description
      Previous value: -"Optional: the venue it ran on, e.g. cantex, tradecraft, oneswap, temple, rocky or poolparty"New value: +"Optional: the venue it ran on, e.g. cantex, tradecraft, oneswap, temple, rocky, kora or poolparty"
  2. Changed6 schema fields changed
    • addedInput schema / properties / amount_in / description
      Added value: +"How much of the sold token went in, in its own units"
    • addedInput schema / properties / amount_out / description
      Added value: +"How much of the bought token came back, in its own units"
    • addedInput schema / properties / buy / description
      Added value: +"Symbol of the token bought, e.g. USDCx"
    • addedInput schema / properties / sell / description
      Added value: +"Symbol of the token sold, e.g. CC"
    • addedInput schema / properties / time / description
      Added value: +"When the trade ran: ISO 8601 such as 2026-10-27T18:05:00Z, or unix seconds; the archive starts 27 Oct 2026 21:01 UTC"
    • addedInput schema / properties / venue / description
      Added value: +"Optional: the venue it ran on, e.g. cantex, tradecraft, oneswap, temple, rocky or poolparty"
  3. First observed

TDQS

A3.9/5.0
Behavior3/5

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

The annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so 'nothing is executed or stored' largely restates them. Still, the description adds real context beyond the annotations: the archive starts 27 Oct 2026, pricing uses five-minute ticks either side of the trade and post-network-fee quotes, and results are compared at the least favourable reading. It does not cover latency, cost, or coverage limits across venues.

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 description is front-loaded with the core question, then flows through inputs, then method, then outputs. That is dense but efficient. Its methodology and output sentences are long nested clauses, so it could be split for readability, but no sentence is 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?

With no output schema, the description must explain results, and it does: the best venue, the shortfall in basis points, and the venue-vs-fill attribution. It covers inputs, archive start, and the pricing method, leaving only error and edge-case behavior (e.g., trades outside the archive window) unspecified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so field meanings (sell, buy, amount_in, amount_out, time, venue) and examples are fully documented in the schema. The description restates the time formats and adds only that supplying venue changes the output breakdown, which is marginal beyond the schema. Baseline 3 is appropriate when the schema carries the parameter burden.

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 ('check a trade' for execution quality) and frames the tool's purpose with a crisp question: 'Was a trade well executed?' The reference to pricing 'by the same code as quote()' tells an agent how this differs from the live-quote sibling without needing its schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The opening question makes the use case clear: post-trade analysis rather than live quoting. It also implies the split behavior of the optional venue argument ('with venue given, how much of the gap was the choice of venue'). It does not explicitly state when not to use it or name quote() as the alternative for forward-looking pricing, so it falls short of a 5.

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.