Skip to main content
Glama

Get Trade History

get_trade_history
Read-onlyIdempotent

Recent FILLS as the broker reports them: the broker's own side (buy/sell) for each order, fill price, quantity, and entry_or_exit from the broker's open/close flag. Use this — not activity notices — to establish what actually happened (e.g. whether a ticket was closed and in which direction). If journal_side_mismatch is true, Gogi's journal disagrees with the broker: report the broker's side. Label accounts by display_label.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_trade_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoLook-back window in days (1-30, default 7).
limitNoMax fills returned, newest first (1-50, default 20).
symbolNoOptional symbol filter (e.g. XAUUSD).
broker_account_idNoOptional account_ref from list_brokers; omit for all enabled accounts.

Output Schema

NameRequiredDescriptionDefault
errorNo
fillsNo
errorsNo
messageNo
successNo

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?

Annotations already establish read-only, idempotent, non-destructive behavior, but the description adds important context beyond them: the data is broker-reported, includes provenance details, and tells the agent to trust the broker side on journal mismatch. It also explains account labeling via display_label.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded, immediately stating what the tool returns. Every sentence carries operational value: source of truth, conflict handling, and account labeling.

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?

With annotations covering safety, full schema descriptions, and an output schema, the description supplies the remaining decision-critical context: broker provenance, mismatch handling, and display guidance. Nothing essential for correct invocation appears to be missing.

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 description coverage is 100%, so the input schema already documents days, limit, symbol, and broker_account_id. The description does not add parameter-specific semantics beyond what the schema provides, so the baseline applies.

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 resource and verb: recent broker-reported fills, including side, fill price, quantity, and entry_or_exit. It clearly distinguishes this from activity notices as a source of truth, so an agent can tell what the tool returns and why it differs from other records.

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 usage guidance: use this, not activity notices, to establish what actually happened. It also specifies behavior when journal_side_mismatch is true, giving the agent a concrete conflict-resolution rule rather than leaving interpretation open.

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