Skip to main content
Glama
PNX89
by PNX89

QUOTEZ

エージェントのための市場データ。設定ではなく、設計によって読み取り専用。

CI Python License: MIT

MetaTrader 5の市場データを、LLMエージェントが呼び出せる型付きの読み取り専用ツールとして公開するMCPサーバーです。Python 3.11以降、ランタイム依存関係は1つ、stdioトランスポートを使用。バッジは3.13で止まっていますが、これは分類子がそこまでだからです。CIは3.14のレグもアドバイザリとして実行しており、3.14が十分に安定して「期待」ではなく「約束」になったところでバッジに加わります。

エージェントは、与えられたツールの質に左右されます。市場データでは、ずさんなツールが実際の損害を引き起こします。モデルはツールが返したものをそのまま事実として受け止めるため、単位もタイムゾーンも出所もないペイロードは、誰かが行動を起こすかもしれない価格についての自信に満ちた文章になります。QUOTEZは、テキストの塊ではなく生成された出力スキーマで応答し、UTCを標準とし、すべてのペイロードにsyntheticフラグを付け、コード内に書き込みパスはありません。

これは、損害を起こせないように構築された1つのツールです。これは、エージェント全体がツールを信頼できるかどうかという大きな問題よりも、より小さく、検証可能な問いです。その大きな問題はQUELLZが扱います。

範囲と制限

  • 読み取り専用:order_send、order_check、symbol_select、その他いかなる書き込みもありません。

  • ライブMetaTraderデータにはWindowsと実行中のターミナルが必要です。ホイールはwin_amd64のみです。

  • デフォルトのソースは生成されたデータを再生し、すべてのペイロードにsynthetic: trueとラベル付けします。

  • 時刻はUTCで、各バーはその開始時点(間隔の左端)でラベル付けされます。

Related MCP server: ibkr-mcp

エージェントセッションの例

実際の出力であり、貼り付けではありません。uv run python examples/agent_session.pyで再生成してください。tests/test_readme.pyは、このブロックがそのコマンドの標準出力とバイト単位で一致することをアサートします。再生価格は生成されたものであり、いかなる市場から記録されたものではありません。

QUOTEZ over an in-memory MCP client, source=replay.
Every price below is generated. This repository bundles no real market data.

>>> list_symbols(group="*FX*")
{
  "source": "replay",
  "synthetic": true,
  "count": 2,
  "symbols": [
    {"name": "SYNTH_FX_ALPHA", "description": "Synthetic FX pair Alpha", "digits": 5, "point": 1e-05},
    {"name": "SYNTH_FX_BETA", "description": "Synthetic FX pair Beta", "digits": 3, "point": 0.001}
  ]
}

>>> get_quote(symbol="SYNTH_FX_ALPHA")
{
  "symbol": "SYNTH_FX_ALPHA",
  "time": "2026-06-12T13:59:00Z",
  "bid": 1.08044,
  "ask": 1.08056,
  "spread_points": 12,
  "source": "replay",
  "synthetic": true
}

>>> get_bars(symbol="SYNTH_FX_ALPHA", timeframe="H1", count=5)
{
  "symbol": "SYNTH_FX_ALPHA",
  "timeframe": "H1",
  "source": "replay",
  "synthetic": true,
  "count": 5,
  "bars": [
    {"time": "2026-06-12T08:00:00Z", "open": 1.07985, "high": 1.08231, "low": 1.07978, "close": 1.08125, "tick_volume": 4257, "spread": null},
    {"time": "2026-06-12T09:00:00Z", "open": 1.08125, "high": 1.0844, "low": 1.08113, "close": 1.08302, "tick_volume": 2501, "spread": null},
    {"time": "2026-06-12T10:00:00Z", "open": 1.08302, "high": 1.08439, "low": 1.08298, "close": 1.08368, "tick_volume": 1643, "spread": null},
    {"time": "2026-06-12T11:00:00Z", "open": 1.08368, "high": 1.08395, "low": 1.08036, "close": 1.08097, "tick_volume": 1570, "spread": null},
    {"time": "2026-06-12T12:00:00Z", "open": 1.08097, "high": 1.08284, "low": 1.08084, "close": 1.08159, "tick_volume": 2589, "spread": null}
  ]
}

>>> symbol_info(symbol="SYNTH_FX_ALPHA")
{
  "name": "SYNTH_FX_ALPHA",
  "description": "Synthetic FX pair Alpha",
  "digits": 5,
  "point": 1e-05,
  "spread": 12,
  "spread_float": true,
  "trade_stops_level": 10,
  "trade_freeze_level": 0,
  "trade_tick_value": 1.0,
  "trade_tick_size": 1e-05,
  "trade_contract_size": 100000.0,
  "volume_min": 0.01,
  "volume_max": 100.0,
  "volume_step": 0.01,
  "currency_base": "SYA",
  "currency_profit": "SYN",
  "currency_margin": "SYA",
  "source": "replay",
  "synthetic": true
}

A symbol that does not exist, to show what the model actually sees:

>>> get_quote(symbol="NOT_A_SYMBOL")
is_error: true
Error executing tool get_quote: Symbol 'NOT_A_SYMBOL' is not available on this server.

クイックスタート

1つのコマンド、設定不要、MetaTraderのインストールも不要:

uvx --from git+https://github.com/PNX89/QUOTEZ quotez --source replay

QUOTEZはPyPIに公開されていないため、git形式がインストール方法です。@main、タグ、またはコミットを追加して参照を固定します(uvの依存関係ドキュメント参照)。その後、ハングしているように見えます。これは、標準出力がJSON-RPCのワイヤであり、ホストがそれを駆動するためです。ホストなしで動作を確認するには、リポジトリをクローンしてサンプルセッションを実行します。これは、インプロセスクライアントから同じサーバーを駆動します:

git clone https://github.com/PNX89/QUOTEZ && cd QUOTEZ
uv run python examples/agent_session.py

Windowsで、すでに実行中でログイン済みのターミナルに対して:

uvx --from "quotez[mt5] @ git+https://github.com/PNX89/QUOTEZ" quotez --source mt5

コンソールスクリプトはフラグを受け取る唯一のエントリポイントであり、フラグは環境変数より優先されます。mcp run src/quotez/server.pyも、モジュールレベルのmcpグローバルを通じてこのサーバーを提供しますが、何も転送しないため、そのパスは変数を読み取ります。

フラグ

環境変数

デフォルト

意味

--source

QUOTEZ_SOURCE

replay

replayはバンドルされた生成ファイルを読み取り、mt5はライブターミナルを読み取る

--symbols

QUOTEZ_SYMBOLS

空

カンマ区切りのホワイトリスト、大文字小文字を区別しない。空の場合はソースが持つすべてを公開

--max-bars

QUOTEZ_MAX_BARS

1000

1回の呼び出しで返せる最大バー数、1〜5000

--log-level

QUOTEZ_LOG_LEVEL

INFO

ログレベル。ログは常に標準エラー出力に記録される(標準出力はワイヤのため)

ホストに接続する

ホスト間で設定キーが一致しておらず、mcpServersとserversを間違えることが、サーバーが表示されない一般的な原因です。

ホスト

ファイル

キー

Claude Desktop

macOSでは~/Library/Application Support/Claude/claude_desktop_config.json、Windowsでは%APPDATA%\Claude\claude_desktop_config.json

mcpServers

Cursor

.cursor/mcp.json

mcpServers

VS Code

.vscode/mcp.json

servers、さらにcommandの横に"type": "stdio"を追加

Claude Code

ファイルなし、CLIを使用

claude mcp add quotez -- uv tool run --from git+https://github.com/PNX89/QUOTEZ quotez --source replay

{
  "mcpServers": {
    "quotez": {
      "command": "/absolute/path/to/uv",
      "args": ["tool", "run", "--from", "git+https://github.com/PNX89/QUOTEZ",
               "quotez", "--source", "replay"]
    }
  }
}

commandはwhich uvの絶対パスでなければなりません。 ホストはほぼ空のPATHでサーバーを起動するため、ベアのuvはサーバーが静かに接続に失敗する最も一般的な理由です。

ツール

8つのツールがこの順序で登録されています。これはtools/listが返す順序であり、クライアントはそのリストをキャッシュするため、順序は意図的に固定されています。1つのリソースsymbols://listが、application/jsonと同じ計測器ユニバースを提供します。

ツール

引数

戻り値

アクセス

再生ソース

MetaTraderソース

list_symbols

group オプション、MetaTraderグループ構文

SymbolList

読み取り

4つの生成された計測器

symbols_get(group=...)

get_quote

symbol

Quote

読み取り

最後に保存されたバーから派生

symbol_info_tick

get_bars

symbol、timeframe、count(1〜5000、--max-barsで上限)

BarSeries

読み取り

M1をローカルでロールアップ

copy_rates_from_pos

get_bars_range

symbol、timeframe、start、end

BarSeries

読み取り

M1をローカルでロールアップ

copy_rates_range

symbol_info

symbol

SymbolSpec

読み取り

symbols.jsonから

symbol_info

get_account

なし

Account

読み取り

プレースホルダー数値、synthetic: true

account_info、ログインマスク

list_positions

なし

PositionList

読み取り

常に空

positions_get

list_orders

なし

OrderList

読み取り

常に空

orders_get

list_symbolsは、独自の構文を発明するのではなく、MetaTrader独自のグループフィルター構文を受け取ります:パターンの先頭と末尾での*ワイルドカード、カンマ区切りの条件、否定のための!。包含は除外の前に来なければならないため、"*, !*USD*"はUSD計測器以外のすべて、"!*USD*, *"はすべてに一致します。Mt5Sourceは文字列をsymbols_getに渡します。再生ソースは同じ構文をquotez.groupsで実行するため、両方ともフィルターに対して同じように応答します。

すべてのツールはPydanticモデルを返すため、SDKは戻り値のアノテーションからoutputSchemaを導出し、structuredContentを埋め、サーバーから送信される前にペイロードを検証します。BaseModelはラップされずに使用されるため、get_barsは{"result": ...}ではなく、barsキーを持つオブジェクトを返します。

仕組み

flowchart LR
    host["MCP host<br/>Claude Desktop, Cursor, VS Code"]
    server["quotez.server<br/>8 tools, 1 resource"]
    proto["MarketDataSource<br/>Protocol"]
    replay["ReplaySource<br/>bundled CSVs, any OS"]
    mt5["Mt5Source<br/>Windows only, lazy import"]
    term["MetaTrader 5 terminal"]
    host -- "JSON-RPC over stdio" --> server
    server --> proto
    proto --> replay
    proto --> mt5
    mt5 -- "read calls only" --> term

MarketDataSourceは、サーバー全体が書かれている継ぎ目です。その上にあるものはMetaTrader5をインポートせず、Mt5Sourceはモジュールインポート時ではなく、ファーストユース時にプライベートヘルパー内で拡張機能を解決するため、import quotezはホイールが存在しない場所でも動作します。これにより、ReplaySourceがモックではなく第一級の実装となる理由です。ツール層は両者を区別できないため、スイート全体がターミナルをインストールせずに実際のコードパスを実行します。

バンドルデータは、4つの生成された計測器(SYNTH_FX_ALPHA、SYNTH_FX_BETA、SYNTH_IDX_GAMMA、SYNTH_MTL_DELTA)、それぞれ3600のM1バー、2026-06-01から2026-06-12までの平日08:00から14:00 UTC、その中に9回のセッション中断(8回は夜間、1回は週末をまたぐ)を含みます。ギャップのないシリーズは集計バグを隠すからです。scripts/generate_replay_data.pyは、シードされたrandom.Randomからファイルを一度生成し、出力はコミットされています。CSVはimportlib.resourcesを通じて読み取られ、Path(__file__).parentは使用されません。後者はチェックアウトでは動作しますが、uvxが実行するzipインストールでは壊れます。

ツールとリソースは同じものではない

ツールはモデルが呼び出すことを決定するものです。リソースはアプリケーションがロードすることを決定するものです。get_barsはモデル駆動型です。推論の途中でシンボル、タイムフレーム、カウントを選択します。symbols://listはアプリケーション駆動型です。ホストはモデルが何かを決定する前に、一度だけユニバースをコンテキストに固定します。そのため、これはlist_symbolsの偶発的な重複ではありません。list_symbolsはモデルが意図的に実行するフィルタリング検索です。

明らかな次のリソースであるbars://{symbol}/{timeframe}は意図的に構築されていません。同じデータに対してget_barsを複製するものであり、プレースホルダー付きのURIはリソーステンプレートとなり、resources/listをresources/templates/listに分離し、多くのホストでうまく表示されないか、まったく表示されません。テストでは、リソーステンプレートが登録されていないことをアサートします。

タイムフレーム集計

再生ソースは1つのベースタイムフレームであるM1を保存し、quotez.aggregateがM5、M15、M30、H1、H4、D1をロールアップします。1つの保存コピー、1つのロールアップ、単独でテスト可能。これは、その障害モードが静かであるため重要です。間違った集計は、永遠に妥当な数値を返し、決してエラーを発生させません。

MetaTraderソースは何もロールアップしません。ターミナルはすでにすべての期間を保持しているため、直接タイムフレームが要求されます。M1から再導出すると遅くなり、オペレーターが開いているチャートと一致しなくなります。したがって、2つのソースは、D1、H4、およびspreadについて、同じ呼び出しに対してわずかに異なる回答を返します。これは「制限事項」で説明されており、ユーザーが発見するために残されているわけではありません。

ロールアップの不変条件(それぞれがテスト名です):

  1. M1 が唯一の基本時間枠です。それより粗いものはすべて派生です。

  2. バケットは壁時計であり、エポック秒の床除算によって計算され、N 行ごとに位置的にグループ化されることはありません。

  3. ターゲットは 60 秒の整数倍です。それ以外は InvalidRequest を発生させます。

  4. OHLC は、最初の始値、最大高値、最小安値、最後の終値です。

  5. tick_volume は合計されます。spread は合計されません。これはクォートの時点のプロパティであるため、集約されたバーは null を報告します。

  6. バーは UTC で左端のラベルが付けられます。

  7. 不完全な末尾のバケットは、部分的なバーとして出力されるのではなく、ドロップされます。バケットは、そのバケットの終了時点以降のバーが入力に含まれている場合にのみ出力されます。

  8. 空の入力は空のリストを返します。

不変条件 2 はテストによって正当性が証明されます。位置的なグループ化は、ギャップのない系列では壁時計のバケットと一致しますが、穴がある瞬間に不一致が生じます。360 バーのセッションを 4 つずつグループ化すると、金曜日の終値と月曜日の始値が 1 つのバーに入り、4 時間足と呼ばれます。不変条件 7 はそのペアです。セッションの終了はデータが尽きることと同じイベントではないからです。

安全性の設計

この主張は構造的なものであり、設定可能なものではありません。このコードベースには書き込みパスはありません。 src/quotez/ のどこにも order_send、order_check、symbol_select、MarketWatch の変更、ファイルの書き込みはありません。書き込みを有効にする設定はありません。有効にするものがないからです。

2 つのテストがそれを維持しており、2 つ目のテストが意味のあるものです。1 つ目は、パッケージ内でそれら 3 つの MetaTrader 呼び出しを grep します。これは安価で、すべてのファイルをカバーし、実行時に組み立てられた名前によって満たされます。2 つ目は mt5source.py の AST をウォークし、代わりに肯定的なプロパティをアサートします。つまり、このパッケージがターミナルモジュールから読み取る属性のセットは、独自の docstring で名前が付けられた読み取り呼び出しと 7 つの時間枠定数だけであり、getattr を介して到達されるものや、2 番目の変数に再バインドされるものはありません。_mt5() は MetaTrader5 モジュール全体を返すため、数百の属性のうち 3 つの名前がないだけでは、それ自体ではほとんど証明になりません。5 つの意図的に壊されたスニペットがそのウォークに対してチェックされているため、ウォーク自体は失敗すべきときに失敗することがわかっています。

すべてのツールは ToolAnnotations(read_only_hint=True, open_world_hint=False) で宣言されています。その宣言はクライアントに対する礼儀に過ぎません。MCP 仕様は、信頼できるサーバーからのものでない限り、クライアントはツールアノテーションを信頼されていないものとして扱うよう指示しています。read_only_hint=True はツールを説明するものであり、クライアントを制約するものではなく、レビュー担当者が確認できるプロパティは、フラグの存在ではなく、呼び出しの欠如です。仕様自身の ツールのセキュリティに関する考慮事項 にマッピングされ、このサーバーが満たさない要件も含みます。

仕様要件

QUOTEZ

場所

すべてのツール入力を検証する

はい

型ヒント、Literal 時間枠、count の Field(ge=1, le=5000)、およびハンドラー内のランタイムチェックから派生した JSON スキーマ

適切なアクセス制御を実装する

はい

シンボルホワイトリストは、すべてのツールとリソースに適用され、ゲッターのみではありません

ツール呼び出しをレート制限する

いいえ

実装されておらず、制限事項に記載されています。stdio サーバーは正確に 1 つのホストの子プロセスであるため、ホストがレート制限を所有します

ツール出力をサニタイズする

はい

アカウントログインは最後の 4 桁にマスクされ、ブローカー、サーバー、アカウント所有者の名前は決して返されず、synthetic はすべてのペイロードの必須フィールドです

ブロックされたシンボルは、タイプミスが受けるメッセージ「シンボル 'X' はこのサーバーでは利用できません。」とともに SymbolNotFound として報告されます。明確な「許可されていません」は、オペレーターが公開しないことを選択したインストゥルメントのディスカバリーオラクルにホワイトリストを変えてしまいます。

エラーは 2 つのチャネルのいずれかを取ります。よりスマートなモデルが失敗を回避できたかどうかによって選択されます。スペルミスのシンボルは回避できた可能性があるため、SymbolNotFound と InvalidRequest は通常の例外であり、モデルが読み取って再試行できるツールエラーになります。実行されていないターミナルは回避できなかったため、SourceUnavailable は MCPError、つまり結果がまったくないプロトコルエラーとして発生します。ここではエラー文字列は返されません。返される文字列は is_error=False を保持し、成功した回答として読み取られます。テストはすべてのツールを不正な入力で呼び出し、フラグをアサートします。

設計上の決定

mcp>=2.0.0,<3 と MCPServer、v1 ピンと FastMCP ではありません。 SDK はまだ移行していない人のために mcp>=1.28,<2 を提供していますが、v1 時代のサーバーは 3 秒でそれとわかります。from mcp.server.fastmcp import FastMCP。 移行ガイド に名前の変更があります。低レベルの Server は代替手段でしたが、戻り値を自動ラップしなくなったため、8 つのツールに対して JSON スキーマを手書きすることを意味しました。

型付けされた Pydantic の戻り値、テキストブロブではありません。 ほとんどの公開 MCP サーバーは散文を返し、モデルに解析を任せます。ここでは戻り値のアノテーションが出力スキーマであるため、型付けはコストがかからず、ペイロードがサーバーを離れる前に検証を購入します。

2 つのバーツール、オプションの引数を持つ 1 つではありません。 JSON スキーマは相互排他性を表現できないため、単一の get_bars(count or start..end) は「これらのいずれか、ただし両方ではない」という制約を散文としてモデルに押し付けることになります。2 つのツールは 2 つの完全に有効なスキーマを持ち、「両方指定、どちらも指定なし」のエラークラスは存在しなくなります。

生成されたデータ、実際のフィードではありません。 ライセンス上の決定であり、好みではありません。MetaTrader のエクスポートはブローカーのライセンス供与されたフィードであり、インデックスおよび株式 CFD の場合、原資産は取引所のライセンス供与を受けています。Yahoo のヘルプページは制限を明確に述べており、Yahoo Finance に表示または提供される情報を再配布してはなりません。また、その デベロッパー API 利用規約 は、アクセスの販売またはサブライセンスを個別に制限しています。HistData の FAQ は再配布権を一切付与しておらず、データは保証なしで提供されることのみを述べており、沈黙はライセンスではありません。それらのいずれかを MIT リポジトリにコミットすることは、再ライセンスする権利のないデータを再ライセンスすることになります。

標準ライブラリ、pandas や numpy ではありません。 バンドルされた CSV スケールでは、csv と datetime とデータクラスで十分であり、ツリーは監査可能なままです。ただし、そのツリーは正直に名前を付ける価値があります。mcp 2.x は 1 つの直接依存関係であり、anyio、httpx2、jsonschema、mcp-types、opentelemetry-api、pydantic、pyjwt(crypto エクストラ付き)、python-multipart、sse-starlette、starlette、typing-extensions、typing-inspection、uvicorn、さらに Windows では pywin32 を引き込みます。crypto エクストラは、背後に cryptography、cffi、pycparser をもたらします。これは v1 よりも大きなフットプリントであり、テストはコミットされた uv.lock を読み取り、このリストがそれと一致しなくなった場合に失敗します。これはツリーに名前を付けるために存在する段落が、ツリーの大部分に名前を付けなければ何の価値もないからです。

run_backtest ツールはありません。 バックテストは計算量が無制限であり、MarketDataSource よりもはるかに多くのものを必要とし、QUACKZ を複製することになります。そのため、このペアは 2 つの焦点を絞ったプロジェクトではなく、2 つの半プロジェクトとして読まれることになります。同じ理由で、ここでのガードレールはドメインローカルです。入力検証、制限付きクエリ、固定されたインストゥルメントユニバース、副作用なし。一般的なエージェントガードレールは QUELLZ に属し、5 回再発明されるべきではありません。

制限事項

  • ライブの MetaTrader パスを実行する継続的インテグレーションランナーはありません、どこにも。非 Windows ホイールはなく、ターミナルやブローカーアカウントを持つランナーもありません。Windows ジョブは、拡張機能がインポートされることと、Mt5Source が欠落したターミナルを正常に報告することを証明し、それだけです。Mt5Source のフィールドマッピングは、ここで最もテストされていないコードであり、フェイクモジュールテストでカバーされています。

  • MetaTrader5 は Windows 専用であり、ソース配布を公開していないため、pip install quotez[mt5] は macOS と Linux では設計上何も行いません。テストは、環境マーカーがその状態を維持することをアサートします。

  • initialize() は、ターミナルがまだ実行されていない場合に起動し、操作全体はその timeout 引数によって制限され、デフォルトは 60000 ミリ秒と文書化されています。ページは起動自体の数値を示していないため、60 秒を測定された起動時間としてではなく、呼び出しの上限として扱ってください。QUOTEZ は、サーバーの有効期間中に 1 回接続を開くのであって、呼び出しごとではないため、そのコストは、最初のツール呼び出しをハングさせているように見せる代わりに、起動時に発生します。

  • 2 つのソースは、D1 または H4 バケットがどこから始まるかについて一致しません。 リプレイロールアップはエポック秒で床除算されるため、D1 は UTC 00:00 に、H4 は UTC 00、04、08、12、16、20 に開きます。MetaTrader ターミナルは、D1 と H4 をブローカーのサーバー日に合わせます。これは通常 UTC+2 または UTC+3 です。そのため、同じ get_bars(symbol, "D1") は、設定されたソースに応じて、異なる開始時間と異なる OHLC を持つローソク足を返します。ここでは、オペレーター自身のチャートと一致しないバーは、文書化されたオフセットよりも悪いため、ターミナルの M1 をリサンプリングしてそれを隠すことはしません。

  • 同じ理由で、spread は M1 より上のすべてのリプレイバーでは null であり、すべての MetaTrader バーでは設定されています。ロールアップは意図的にそれをクリアします。ターミナルはすべての時間枠で独自の値を報告し、QUOTEZ はソースが与えたデータを破棄するのではなく、それを通過させます。

  • copy_rates_from_pos と copy_rates_range は、ターミナルの「チャートの最大バー数」設定によって暗黙的に制限されるため、サーバー自身の上限内のリクエストでも、まだ短く返ってくることがあり、MetaTrader API のどこにもそのことは書かれていません。

  • get_bars はターミナルがまだ構築中のバーをスキップするため、その最新のバーは常に確定しています。get_bars_range はそうではありません。境界は呼び出し元のものであり、現在の間隔内の end はその間隔の部分的なバーを返します。

  • symbol_info() は不明なシンボルに対して None を返します。エラー時に symbols_get() も同様です。ここではすべての呼び出しサイトでチェックしていますが、それがラップされている API の形状です。

  • MetaTrader はバーとティックの時間を UTC でシフトなしで保存しますが、ナイーブな Python datetime はローカルゾーンに対して解決します。copy_rates_range のドキュメント はそのように述べています。すべての送信タイムスタンプは tz=UTC で構築され、ナイーブな入力は拒否されますが、これが系列全体を 1 時間静かにシフトさせる罠です。

  • レート制限はありません。stdio サーバーは 1 つのホストの子プロセスであり、ホストがそれを所有します。

  • リプレイデータはサンプル規模で生成されています。4 つのインストゥルメント、3600 の M1 バー、10 取引日。ツールをデモンストレーションし、集約を実行しますが、研究データセットでもマーケットでもありません。

  • バージョン 0.1.0 は読み取り専用かつ stdio のみであり、プロンプト機能、SSE やストリーミング可能な HTTP トランスポート、OAuth はありません。

なぜこれを構築したのか

私はインデックスデータでウォークフォワード分析を実行し、FXと金属の部分についてはMetaTraderターミナルを常備しているため、この両方の要素はすでに私のデスクにありました。これを書くきっかけとなったのは、エージェントが型の不適切なツールから数字を取得し、単位もタイムゾーンも出典も示さずにあたかも事実であるかのように言い換えるのを目撃したことです。市場データにおいてこれは表面的な問題ではありません。終値でラベル付けされたバーではなく始値だったり、タイムスタンプが気付かれずにローカルタイムに変換されたりすると、一見正しく見える答えが1時間ずれてしまいます。そのため、これは主にデータの出所とツールが主張できる内容に関する決定であり、その周りに小さな集計コードをラップしたものです。

Development

uv sync --dev
uv run pytest
uv run ruff check .
uv run ruff format --check .
uv run mypy

251テスト、ネットワーク不要、数秒で処理完了、macOS、Linux、Windowsで同一の結果。この数値は実際のコレクション実行に基づいて主張されています。なぜなら、READMEに書かれた数字は誰も更新しないからです。

License

MIT。 LICENSE を参照。

Q...Zツールセットの一部。自らを告知しない障害に対する5つのツール:

  • QUACKZ — 200のうちから選ばれたために良く見えるだけのバックテストをデフレートします。

  • QUOTEZ(本ツール) — エージェントが読めるが行動できない市場データ。

  • QUELLZ — プロンプトインジェクションの封じ込めがユーティリティと攻撃率の両方に与えるコストを測定します。

  • QUIDZ — 二重に送金されそうになった送金を拒否します。

  • QUESTZ — スクレイパーが形状の変わったページからCSVを書き出す前に停止します。

Available Tools

8 tools
get_accountGet account stateA
Read-only

Return the connected account's balance, equity, margin and leverage.

The login is masked to its last four digits and the broker, server and account holder names are never returned. On the replay source these figures are invented placeholders describing no real account: the payload carries synthetic=true, the currency is SYN and the login is ****0000. Do not restate them as a real balance.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
equityYesBalance plus floating profit and loss.
marginYesMargin currently in use.
sourceYesData source that produced these figures.
balanceYesBalance, excluding floating profit and loss.
currencyYesAccount deposit currency.
leverageYesAccount leverage, for example 100 for 1:100.
syntheticYesTrue when the figures are generated. The replay source always sets this, and its balance and equity are invented placeholders that describe no real account.
margin_freeYesMargin available for new positions.
login_maskedYesAccount login masked to its last four digits. The full login is never returned.
margin_levelYesEquity divided by margin, as a percentage.

TDQS

A4.5/5.0
Behavior5/5

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

The description discloses key behavioral traits beyond annotations: login masking, omission of broker/server/account holder names, and synthetic data indicators on replay. This adds significant value over the readOnlyHint and openWorldHint annotations.

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 three sentences long, front-loaded with the main purpose, and every sentence adds essential information. There is no redundancy or wasted language.

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?

Given the tool has no parameters and an output schema exists, the description adequately covers the return values and adds critical context about data masking and synthetic mode. It is complete for an agent to understand and invoke the tool correctly.

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?

The tool has no parameters and schema coverage is 100%, so the baseline is 3. The description does not add meaning to any parameters because there are none to explain; it appropriately focuses on the tool's output and behavior.

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 description clearly states the verb 'Return' and the specific resource 'connected account's balance, equity, margin and leverage'. This distinguishes it from sibling tools like list_symbols, get_quote, and get_bars, which operate on different data.

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 description provides clear context about when the tool returns synthetic data on the replay source and warns against restating it as real. It does not explicitly contrast with siblings, but the context is sufficient for an agent to understand when to use this tool.

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

get_barsGet recent barsA
Read-only

Return the most recent OHLCV bars for a symbol, oldest first.

Times are UTC and label each bar's OPEN, the left edge of the interval it covers. count is capped by the server (see the server instructions for the current limit); ask for a coarser timeframe rather than more bars. The bar that is still forming is never returned, so the newest bar is always a closed one; call get_quote for the current price. An unknown or unavailable symbol returns a tool error naming the symbol; call list_symbols first if unsure. On the replay source the prices are generated, not recorded from any market.

ParametersJSON Schema
NameRequiredDescriptionDefault
countNoHow many of the most recent bars to return, newest last.
symbolYesInstrument name exactly as list_symbols spells it.
timeframeYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
barsYesThe bars, oldest first.
countYesNumber of bars returned.
sourceYesData source that produced these bars.
symbolYesSymbol these bars belong to.
syntheticYesTrue when the prices are generated, not observed.
timeframeYesTimeframe of each bar.

TDQS

A4.9/5.0
Behavior5/5

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

The description discloses critical behavioral traits beyond annotations: bars are in UTC labeling the open, the newest bar is always closed (never returns forming bar), the server caps count, and on replay source prices are generated (not recorded). The readOnlyHint annotation is consistent with the read-only nature described, and no contradiction exists.

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 concise (5 sentences) and front-loaded: first sentence states the core purpose and ordering. Every sentence adds distinct value (timezone, counting strategy, bar state, error handling, data source). No wasted words.

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?

Given the tool has 3 parameters, an output schema (present), and annotations (readOnlyHint, openWorldHint), the description covers all necessary context: purpose, parameters, error handling, alternatives, and data source behavior. The output schema likely describes return format, so no need to explain return values. Complete for a moderately complex tool.

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 67% (only 2 of 3 parameters have descriptions). The description adds value: clarifies that 'count' is capped by server ('ask for a coarser timeframe rather than more bars'), that 'symbol' must match list_symbols spelling, and that 'timeframe' is the interval length. The description compensates for the missing schema description on 'timeframe' by listing enum values contextually (M1, M5, etc.) and implying the left-edge labeling. However, it doesn't explain the 'timeframe' enum beyond listing intervals, so a 4 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?

The description clearly states the tool returns 'the most recent OHLCV bars for a symbol, oldest first'. It identifies the specific verb (return), resource (OHLCV bars), and ordering (oldest first), distinguishing it from siblings like get_quote (current price) and get_bars_range (range-based).

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?

The description provides explicit guidance: when to use alternatives ('call get_quote for the current price'), when to call list_symbols first ('call list_symbols first if unsure'), how to handle timeframes ('ask for a coarser timeframe rather than more bars'), and error handling ('An unknown or unavailable symbol returns a tool error naming the symbol'). It also notes the 'count' cap and server limit.

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

get_bars_rangeGet bars in a date rangeA
Read-only

Return the OHLCV bars whose open time falls in [start, end), oldest first.

Both bounds must carry a UTC offset, for example 2026-06-01T08:00:00Z. start is inclusive and end is exclusive, so consecutive ranges tile without repeating a bar. The number of bars the range spans is capped by the same limit that applies to get_bars, so a wide window at a fine timeframe returns a tool error asking for a coarser one rather than a truncated answer. Unlike get_bars, an end that reaches into the interval currently forming can return that bar, because the bounds are yours; stop end at a closed interval if that matters. On the replay source the prices are generated, not recorded from any market.

ParametersJSON Schema
NameRequiredDescriptionDefault
endYesExclusive, ISO 8601, UTC.
startYesInclusive, ISO 8601, UTC.
symbolYesInstrument name exactly as list_symbols spells it.
timeframeYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
barsYesThe bars, oldest first.
countYesNumber of bars returned.
sourceYesData source that produced these bars.
symbolYesSymbol these bars belong to.
syntheticYesTrue when the prices are generated, not observed.
timeframeYesTimeframe of each bar.

TDQS

A4.7/5.0
Behavior5/5

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

The description goes well beyond the readOnlyHint annotation, explaining the inclusive/exclusive bounds, UTC offset requirement, tiling behavior, error on exceeding limits, the nuance with forming bars, and the synthetic nature of replay data. This gives the agent a full behavioral model.

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 front-loaded with the core purpose, and every subsequent sentence adds essential behavioral or usage detail. It is concise given the complexity, with no redundant wording.

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?

The description covers not only the basic operation but also edge cases like limit-caused errors, the difference from get_bars, data source caveat, and formatting requirements. Given the output schema exists, return values need no explanation, and the description is fully sufficient for an agent to invoke the tool correctly.

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?

The schema already covers 75% of parameters with descriptions, but the description adds critical semantics for start/end (inclusive/exclusive, UTC offset, example format) and clarifies the meaning of range-related behavior beyond the schema. Timeframe is only an enum, but the values are self-explanatory.

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 description clearly states the tool returns OHLCV bars within a half-open date range, ordered oldest first. The title 'Get bars in a date range' plus the explicit interval notation [start, end) distinguishes it from its sibling get_bars.

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 description references get_bars multiple times, noting the same limit applies and highlighting a key difference regarding forming bars. This provides clear comparative context, though it does not include a direct 'use this when' statement or explicit when-not-to-use guidance.

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

get_quoteGet a quoteA
Read-only

Return the latest bid, ask and spread in points for one instrument.

The time is UTC. On the replay source it is the last stored bar's open time rather than the current clock, so the answer is reproducible and is NOT a live market price. An unknown or unavailable symbol returns a tool error naming the symbol; call list_symbols if unsure.

ParametersJSON Schema
NameRequiredDescriptionDefault
symbolYesInstrument name exactly as list_symbols spells it.

Output Schema

ParametersJSON Schema
NameRequiredDescription
askYesBest ask price.
bidYesBest bid price.
timeYesQuote time in UTC. On the replay source this is the last stored bar's open time, never the wall clock.
sourceYesData source that produced this quote.
symbolYesSymbol this quote belongs to.
syntheticYesTrue when the price is generated, not observed.
spread_pointsYesAsk minus bid, expressed in points.

TDQS

A4.5/5.0
Behavior5/5

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

The description discloses crucial behavior beyond the annotations: 'On the replay source it is the last stored bar's open time rather than the current clock, so the answer is reproducible and is NOT a live market price.' It also details error handling for unknown symbols. This adds significant context for an agent deciding whether to trust the result as live.

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 two short sentences plus a crucial behavioral note. Every sentence adds value, and the key action ('Return...') is front-loaded. No redundant or vague language. It is concise without omitting necessary information.

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?

Given the tool's simplicity (one required parameter, no nested types) and the existence of an output schema (not shown but indicated in context signals), the description adequately covers the return value, time source, error behavior, and a pointer to list_symbols. It is complete for an agent to use correctly.

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?

The input schema has 100% coverage for its single parameter 'symbol', with description 'Instrument name exactly as list_symbols spells it.' The tool description does not add new semantic meaning; it only repeats the schema's point about exact spelling. Baseline 3 is appropriate when schema already fully documents the parameter.

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 description clearly states 'Return the latest bid, ask and spread in points for one instrument.' The verb 'return' and resource 'quote for one instrument' are specific. It implicitly distinguishes from sibling tools like get_bars (historical bars) and list_symbols (listing symbols).

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 description provides explicit guidance: 'An unknown or unavailable symbol returns a tool error naming the symbol; call list_symbols if unsure.' This tells the agent when to use list_symbols instead. It does not explicitly state when not to use this tool (e.g., for historical prices use get_bars), but the sibling context and the mention of 'latest' imply the appropriate use case.

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

list_ordersList pending ordersA
Read-only

Return every pending order, with its type, volumes and trigger price.

Read only: this server can place, modify and cancel nothing. On the replay source the list is always empty and the payload carries synthetic=true.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
countYesNumber of pending orders.
ordersYesThe pending orders.
sourceYesData source that produced this list.
syntheticYesTrue when the orders are generated, not real.

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already mark readOnlyHint=true. The description reinforces this with 'this server can place, modify and cancel nothing' and adds critical context about the replay source (list always empty, synthetic flag). This goes beyond what annotations provide, though it does not cover all possible behavioral traits (e.g., rate limits, auth needs).

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 three sentences, each earning its place: purpose, read-only assertion, and replay-specific behavior. No unnecessary words, front-loaded with the core action.

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?

The tool has no parameters and an output schema exists. The description covers return fields and a key behavioral detail about replay sources, making it fully adequate for the low complexity of this tool.

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?

With zero parameters and 100% schema coverage, the description need not add parameter-level meaning. It correctly describes the output fields but not parameter semantics; baseline 3 is appropriate as the schema carries the full load.

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 description clearly states the verb 'Return' and the resource 'every pending order', and specifies the data included (type, volumes, trigger price). It differentiates from sibling tools which deal with symbols, quotes, bars, account, and positions, leaving no ambiguity about what this tool does.

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

Usage Guidelines3/5

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

The description implies usage for retrieving pending orders and includes the read-only note, but does not explicitly say when to use this tool over alternatives like list_positions. It lacks mentions of conditions under which the tool should or should not be used, nor does it reference sibling tools for comparison.

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

list_positionsList open positionsA
Read-only

Return every open position, with entry price, current price and floating profit.

Read only: this server can open, modify and close nothing. On the replay source the list is always empty and the payload carries synthetic=true.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
countYesNumber of open positions.
sourceYesData source that produced this list.
positionsYesThe open positions.
syntheticYesTrue when the positions are generated, not real.

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false. The description adds value beyond annotations by stating the server can 'open, modify and close nothing', and explains the synthetic flag behavior on replay sources. This provides meaningful behavioral context without contradiction.

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 two short sentences, each providing essential information. No filler or redundancy. Perfectly sized for a tool with no parameters and clear purpose.

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?

Given no parameters and an output schema present, the description is largely complete. It explains the tool's purpose, return fields, and special behavior (read-only, synthetic flag on replay). One minor gap: it doesn't mention whether the list is always empty in certain modes beyond replay.

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?

The input schema has no parameters, so the description has no responsibility to document parameters. With 0 parameters and 100% schema coverage, the description adds value by explaining return fields (entry price, current price, floating profit), which aids correct invocation and interpretation.

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 description uses a specific verb ('Return') and resource ('open position'), and lists the fields returned (entry price, current price, floating profit). It clearly distinguishes this tool from siblings like `list_symbols` and `list_orders`.

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 description clarifies that the tool is read-only and explains behavior on replay sources (always empty, payload has synthetic=true). However, it doesn't explicitly state when to use this tool over alternatives like `get_account` or `list_orders`, though the purpose is clear enough.

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

list_symbolsList instrumentsA
Read-only

Return every instrument this server exposes, with its digits and point size.

Call this before anything else: it is the only authoritative list of symbol names, and a name that is not in it produces a tool error everywhere else. The optional group filter uses MetaTrader's own syntax, described in the argument. On the replay source the instruments are generated and the payload carries synthetic=true.

ParametersJSON Schema
NameRequiredDescriptionDefault
groupNoOptional filter. MetaTrader group syntax: '*' wildcards at the start and end of a pattern, several comma separated conditions, and '!' to negate one. Inclusions must come before exclusions, so "*, !*USD*" is everything except the USD instruments while "!*USD*, *" matches everything.

Output Schema

ParametersJSON Schema
NameRequiredDescription
countYesNumber of instruments returned.
sourceYesData source that produced this list.
symbolsYesThe instruments, in source order.
syntheticYesTrue when the instruments are generated, not real.

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true (safe read) and openWorldHint=false (closed set). The description adds value by noting that missing symbols cause errors in other tools, and that replay sources return synthetic=true. This complements the annotations without contradicting them.

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 three sentences with zero wasted words. Each sentence serves a distinct purpose: stating the return value, explaining when to call and consequences, and describing the optional filter. Information is front-loaded with the core purpose first.

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?

Given the tool's simplicity (1 optional parameter, read-only, closed set), output schema exists, and annotations are clear, the description is fully complete. It covers purpose, usage guidance, parameter behavior, and edge cases (replay vs. live), leaving no gaps for an agent.

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% and already documents the group parameter syntax thoroughly. The description reinforces this by referencing the syntax explanation in the argument description, adding the context of how the filter interacts with the overall tool purpose, which is helpful for an agent.

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 description clearly states the tool returns 'every instrument this server exposes, with its digits and point size'. It uses a specific verb ('Return') and resource ('every instrument'), and distinguishes itself from siblings like get_quote and symbol_info by positioning itself as the authoritative source of symbol names.

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?

Explicitly advises 'Call this before anything else', warns that missing names cause errors elsewhere, explains the optional group filter's syntax, and clarifies behavior differences on replay sources. No alternative tools are needed for this purpose, and it sets clear prerequisites for using other tools.

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

symbol_infoGet contract specificationA
Read-only

Return the contract specification for one instrument.

Digits and point size for rounding prices, current spread, minimum stop distance, tick value and size, contract size, the tradable volume range, and the base, profit and margin currencies. Field names are MetaTrader's own. An unknown or unavailable symbol returns a tool error naming the symbol. On the replay source the instrument is generated and the payload carries synthetic=true.

ParametersJSON Schema
NameRequiredDescriptionDefault
symbolYesInstrument name exactly as list_symbols spells it.

Output Schema

ParametersJSON Schema
NameRequiredDescription
nameYesSymbol name.
pointYesValue of one point, the smallest price step.
digitsYesDecimal places in a quoted price.
sourceYesData source that produced this specification.
spreadYesCurrent spread in points.
syntheticYesTrue when the instrument is generated, not real.
volume_maxYesLargest tradable volume, in lots.
volume_minYesSmallest tradable volume, in lots.
descriptionYesHuman readable instrument name.
volume_stepYesVolume increment, in lots.
spread_floatYesTrue when the broker quotes a floating spread.
currency_baseYesBase currency of the instrument.
currency_marginYesCurrency the margin is charged in.
currency_profitYesCurrency the profit is denominated in.
trade_tick_sizeYesSmallest price change, in price units.
trade_tick_valueYesProfit in the account currency from a one tick move on one lot.
trade_stops_levelYesMinimum distance in points between price and a stop or limit order.
trade_freeze_levelYesDistance in points within which orders are frozen and cannot be changed.
trade_contract_sizeYesUnits of the base asset in one lot.

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the tool is safe to call without side effects. The description adds behavioral context: it lists the exact return fields (digits, spread, tick value, etc.), notes that unknown symbols cause a tool error, and mentions that on replay sources synthetic=true is added. This goes beyond annotations without contradicting them.

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 concise (three sentences) and front-loaded with the purpose. Each sentence adds relevant detail (return fields, naming, edge cases). Slightly verbose in listing fields could be trimmed, but it remains efficient.

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?

Given that there is no output schema but an output schema exists (context says 'Has output schema: true'), the description thoroughly lists return fields and covers the key edge case of unknown symbols. With annotations providing read-only guarantee, and one simple parameter, the description is complete enough for an agent to use correctly.

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?

Even though schema coverage is 100% and the single parameter 'symbol' has a description, the description adds value by indicating that symbol names must match list_symbols exactly and that unknown symbols trigger an error. This aids correct invocation.

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 description clearly states 'Return the contract specification for one instrument,' which identifies the action (return) and the resource (contract specification for one instrument). It distinguishes itself from siblings like 'list_symbols' (which lists symbols, not specifications) and 'get_quote' (which gets quotes) by focusing on static contract details.

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 description implies usage when needing instrument specifications (digits, spread, tick value, etc.) but does not explicitly state when to use this tool versus alternatives. It mentions that an unknown symbol returns a tool error, which is helpful context. No explicit exclusions or alternatives are given, but the context is clear.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 8 tool updatesv0.1.0
    • First observedget_account
    • First observedget_bars
    • First observedget_bars_range
    • First observedget_quote
    • First observedlist_orders
    • First observedlist_positions
    • First observedlist_symbols
    • First observedsymbol_info

TDQS

A4.4/5.0

Scored across 8 tools

Disambiguation5/5

Each tool targets a distinct concern: symbol discovery, current quote, recent bars, ranged bars, contract specs, account summary, positions, and orders. The overlap between get_bars and get_bars_range is clearly delineated by recent-count vs. explicit time range, and descriptions reinforce the boundary.

Naming Consistency4/5

The set mostly follows a clear list_* for enumerations and get_* for single-item or snapshot retrievals. The one deviation is symbol_info, which lacks the get_ prefix, but the overall pattern remains predictable and readable.

Tool Count5/5

Eight tools is well-scoped for a read-only market data and account snapshot server. Each tool contributes a distinct capability without redundancy or bloat, and the count fits comfortably within the ideal range.

Completeness5/5

The surface covers symbol discovery, live quotes, historical bars, contract specifications, account summary, positions, and orders, with explicit read-only constraints explaining why trading mutations are absent. There are no obvious dead ends: list_symbols feeds the symbol-dependent tools, and get_bars/get_bars_range cover both recent and range-based history.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    Exposes a unified AI interface to MetaTrader 5 over the Model Context Protocol, enabling live quotes, historical data, technical indicators, order execution, position management, and headless backtests.
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Read-only MCP server for Interactive Brokers that exposes market data, positions, and account info as MCP tools.
    8
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    A local-first MCP server that bridges AI coding agents with MetaTrader 5 for inspection, market data, MQL5 development, compiling, Strategy Tester review, workspace sync, logs, audit trails, demo trading, and carefully gated live trading.
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Read-only MCP server exposing MetaTrader 5 account and market data alongside Twelve Data quotes and technical indicators, with an LLM analysis layer.
    -