Skip to main content
Glama
FxSocket MCP

FxSocket MCP

Official

Get price history

get_price_history
Read-onlyIdempotent

Fetch OHLC candlestick price history for a broker symbol and timeframe, returning recent bars or a specified date window from an account.

Instructions

OHLC candles for one symbol from this account's broker. Returns the most recent limit bars (default 100, max 500) in the window; omit from/to for the latest bars. A window spanning more than 20000 bars is refused (narrow it or pick a larger timeframe). For the current price only, use get_quotes.

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": {
      "account_id": "<account_id>",
      "symbol": "<symbol>",
      "timeframe": "<timeframe>"
    },
    "name": "get_price_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoEnd of the window. 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.
limitNo
symbolYesExact broker symbol name (see search_symbols).
timeframeYesBar size, M1 to MN1. The same nine on MT4, MT5 and cTrader.
account_idYesAn account_id from list_accounts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive semantics, so the description rightly spends its words elsewhere: the default and maximum bar count, the omitted-window behavior, and a hard refusal threshold of 20000 bars that is not encoded in the schema. It stops short of saying what a refused window looks like (error vs empty result) or whether the newest bar may be partially formed.

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?

Four short sentences, front-loaded with the return shape and then the operational constraints, with zero filler. The limit default/max parenthetical mildly duplicates the schema but is defensible for fast scanning.

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 6 parameters, 83% schema coverage, and no output schema, the description does what is needed: states the return shape, default and cap on bars, window-size limit, and the alternative for a single price. Minor gaps remain around partial bars, error surface on refusal, and broker-time-zone implications of omitted bounds.

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 83%, so the schema already documents from/to formats, the timeframe enum, symbol lookup, and account_id provenance. The description adds only a little beyond that: omitting both bounds returns the latest bars, and the limit default/max restates schema values. A 3 baseline is appropriate given how much the schema already carries.

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?

The first sentence names a specific verb+resource ('OHLC candles for one symbol from this account's broker') with clear scope, and the closing sentence distinguishes it from get_quotes. An agent can tell exactly what data this returns 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?

It states the default path ('omit from/to for the latest bars') and routes the agent to an explicit alternative ('For the current price only, use get_quotes'). It also gives remedial guidance for the oversized-window failure ('narrow it or pick a larger timeframe').

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