Skip to main content
Glama
FxSocket MCP

FxSocket MCP

Official

Get closed trades

get_trade_history
Read-onlyIdempotent

Retrieves closed trades with per-account stats: trade count, wins, losses, win rate, net profit, best and worst trade, plus a per-symbol breakdown over a chosen window.

Instructions

Closed positions (one row per round trip) on one or more accounts, with per-account stats: trade count, wins, losses, win rate, net profit after commission and swap, best and worst trade, and a per-symbol breakdown. Defaults to the last 7 days; the window can be up to 366 days. Lists at most 300 trades across all accounts, newest first; the stats always cover the whole window. Each trade has its open and close price and time and the stop-loss and take-profit it closed with (sl, tp; 0 = not set, and always 0 on cTrader). For positions that are still open, use get_open_positions.

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
toNoEnd of the window (a bare date includes that whole day). Defaults to now. Date (YYYY-MM-DD) or ISO-8601 datetime, in the broker's server time.
fromNoStart of the window. Date (YYYY-MM-DD) or ISO-8601 datetime, in the broker's server time.
symbolNoOnly this instrument. Matches broker suffixes too, so EURUSD also matches EURUSD.sd and EURUSDm.
account_idsNoAccount ids from list_accounts. Omit to read every account this key can see.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description still adds real behavior: truncation at 300 trades while stats cover the entire window, newest-first ordering, and the sl/tp convention (0 = not set, always 0 on cTrader). The one gap is that it doesn't say how truncation interacts with per-symbol breakdowns, but overall this is well beyond annotation coverage.

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-loads what the tool returns, then window defaults, then limits, then field semantics, then the alternative. Dense but every sentence carries payload; the sl/tp parenthetical is compact rather than wasteful.

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?

No output schema exists, yet the description describes the return shape (per-account stats, per-symbol breakdown, per-trade price/time/sl/tp) and the truncation and ordering rules. Nothing an agent needs to call this correctly is missing.

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, but the description adds meaning the schema lacks: the implicit 7-day default for the start of the window, and the fact that omitting account_ids reads every visible account. Symbol suffix matching is repeated from the schema, but the defaulting behavior is genuinely new information.

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 granularity ('Closed positions (one row per round trip) on one or more accounts') plus the aggregate payload (per-account stats and per-symbol breakdown). The final sentence explicitly routes still-open positions to get_open_positions, so the sibling boundary is unambiguous.

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 the default window (last 7 days), the maximum window (366 days), the result cap (300 trades across all accounts, newest first) and names the alternative tool for open positions. An agent knows both when to call this and when to call the sibling instead.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.