A module for interacting with the XTB API
XTB MCP server has 23 tools with basic descriptions and Zod schemas for most parameters. However, critical gaps undermine quality: (1) Many descriptions are generic or lack actionable context (e.g., 'Returns information about account currency and account leverage' for getCurrentUserData). (2) Parameters using z.any() (getChartLastRequest, getChartRangeRequest, tradeTransaction) have zero schema specificity, LLMs cannot validate inputs. (3) No error handling guidance, recovery hints, or output schema documentation. (4) No tool annotations (readOnlyHint, destructiveHint) despite clear risk levels. (5) Naming is verb-first but lacks clarity on distinctions (e.g., getTradeStatus vs tradeTransactionStatus both return transaction status). (6) No pagination support despite tools returning arrays (getNews, getTrades, getTradesHistory, getSymbol). (7) Destructive tool (executeCommand) has minimal description and no confirmation pattern. Average tool description ~80 chars (below 194-char baseline); many parameters lack descriptions entirely.
Executes a command on the server.
Returns an array of all symbols available for the user.
Returns calendar with market events.
Returns chart info, from start date to the current time.
Returns chart info with data between given start and end dates.
Returns calculation of commission and rate of exchange.
z.any() schemas for getChartLastRequest, getChartRangeRequest, tradeTransaction eliminate input validation. LLMs cannot infer valid structure; no type safety.
Destructive tool (executeCommand) lacks confirmation pattern, error guidance, and detailed description. Risk: agent executes unintended commands without safeguards.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint) despite clear risk levels declared in metadata. Clients cannot distinguish safe from dangerous tools.
Array-returning tools (getNews, getTrades, getTradesHistory, getAllSymbols) lack pagination (limit, offset, cursor) and result count. Large datasets will exhaust context.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 49 | 2026-07-28+ | v2 |
Returns information about account currency and account leverage.
Returns various account indicators.
Returns expected margin for given instrument and volume.
Returns news from trading server which were sent within specified period of time.
Calculates estimated profit for given deal data.
Returns current time on trading server.
Returns information about the symbol available for the user.
Returns array of current quotations for given symbols, only quotations that changed from given timestamp are returned.
Returns an array of trades listed in the `orders` argument.
Returns current transaction status.
Returns an array of user's trades.
Returns an array of user's trades which were closed within specified period of time.
Returns quotes and trading times.
Returns the current API version.
Regularly calling this function is enough to refresh the internal state of all the components in the system.
Starts a trade transaction.
Returns current transaction status.
Duplicate/confusing tool names: getTradeStatus vs tradeTransactionStatus both return transaction status. LLMs will conflate them and waste reasoning cycles.