Skip to main content
Glama

Check my own trades

compare_trades

Checks a trader's own trades against a run's rule, on the price history this server holds: for each trade, in their order, whether the rule would have taken it and, if not, why (already in a trade, no entry signal that day, no bar that day). Use it when the trader lists trades they made and asks which the rule took. Takes a run (run_id) and the trades, each {side, entry, exit?}; answers in words, never prices. It re-runs the run's code, so it counts as a run on the run's symbol.

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": {
      "trades": "<trades>"
    },
    "name": "compare_trades"
  }
}

Input Schema

NameRequiredDescriptionDefault
run_idNoA run_id run_backtest or run_held_out_test returned: the run whose code is checked against the trades.
tradesYesThe trader's own trades, in their order, each stamp exactly as the trader wrote it.
versionNo
study_idNoA study's id; with `version`, one of its runs.
time_zoneNoThe clock the trader says their times are on ("UTC+2", "New York", "Europe/Prague"). Left out: the clock the run's trade list is on (ET for stocks and ETFs, UTC otherwise).

Output Schema

NameRequiredDescriptionDefault
noteNo
clockNoOn bars shorter than a day: the clock every time of the answer is on (your time_zone as you stated it, else ET for stocks and ETFs, UTC otherwise).
countsNo
marketNo
reasonNo
run_idNo
statusYes
tradesNo
messageNo
summaryNo
versionNo
study_idNo
runs_left_todayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare this is not read-only and not idempotent, so the agent knows it has side effects. The description adds real value beyond that: it re-runs the run's code and therefore consumes a run on the run's symbol, and it returns words never prices. However, it does not say anything about what happens to prior run state, whether the re-run is recorded, or any limits on how often it can be invoked – gaps that matter for a non-idempotent, side-effecting tool.

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, then the trigger, then parameters, then the side-effect caveat – a sensible order. The first sentence is long and packs a parenthetical list of failure reasons, but every clause carries information; no 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?

Output schema exists, so return values need not be explained, and the description still notes the answer is in words rather than prices. It also discloses the run-consumption side effect, which is the main non-obvious behavioral fact. Minor incompleteness: the interaction between run_id and the study_id/version alternative pair is left to the schema, and the re-run's effect on the run's recorded state is not stated.

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 80%, so the schema already documents run_id, trades, study_id, version and time_zone. The description adds meaning by summarizing the trade shape ({side, entry, exit?}) and by noting exits are optional, but leaves the version/study_id/time_zone selector entirely to the schema. Baseline 3 is appropriate.

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 ('checks a trader's own trades against a run's rule') and enumerates the outcome categories (taken, or why not: already in a trade, no entry signal, no bar). An agent can tell this apart from get_result or run_backtest from the description alone.

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?

Explicit trigger is given: 'Use it when the trader lists trades they made and asks which the rule took.' It does not name a sibling as the wrong alternative, but the condition that selects this tool is unambiguous.

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