Skip to main content
Glama

TakeJournal

group_trades

Read-only

Groups the closed logical trades of the filters by one or two properties and gives each group's trades, wins, losses, win rate, net, average, average win and loss, profit factor, best and worst. For questions such as the win rate after a losing trade, which setup works on Mondays, the best hour, overtrading (trade_of_day).

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": {
      "by": "<by>"
    },
    "name": "group_trades"
  }
}

Input Schema

NameRequiredDescriptionDefault
byYesOne or two properties to group by; two give every combination (e.g. ["weekday", "strategy"]). previous_result: after a win, a loss or a flat trade (the trade opened just before); trade_of_day: 1st, 2nd, 3rd, 4th or later trade of its trading day
toNoLast trading day, YYYY-MM-DD, inclusive
fromNoFirst trading day, YYYY-MM-DD (a futures day runs from 18:00 New York time the evening before)
tagsNoTrades carrying at least one of these tags
marketNoSTRATEGIES = multi-leg option trades, CRYPTO = crypto spot and perpetuals, FOREX = currency pairs, metals and CFDs
accountNoOne account by its alias from list_accounts, e.g. ACC-12, or several comma-separated (ACC-12,ACC-15)
symbolsNoFutures roots or tickers, e.g. ["MES", "AAPL"]
strategyNoA strategy (setup) by its name
checklistNoBy the strategy's checklist: all (every rule followed), broken:N (at most N broken), followed:X (at least X % followed), none (not answered)
account_kindNoAccounts of one or more types, comma-separated: EVAL evaluation, PA funded, LIVE the firm's capital, PERSONAL the trader's own broker or exchange account, PRACTICE a demo, paper or simulated account (e.g. EVAL,PA); REAL every type but practice, EVAL_PA both
account_roleNoAccounts of one or more roles in the copier, comma-separated: MASTER, COPY (a follower), SINGLE; MASTER,COPY = the copy group
exclude_tagsNoLeave out trades carrying any of these tags

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish a safe read-only, closed-world operation, and the description adds real value beyond them by stating the returned metric set (trades, wins, losses, win rate, net, averages, profit factor, best/worst) and that only closed logical trades are grouped. It doesn't discuss ordering of groups, minimum sample sizes, or what happens with empty filter results, which are the remaining behavioral gaps.

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?

Two sentences, front-loaded with the core behavior before the use cases; nothing is redundant. The metric enumeration in the first sentence is long but earns its place since there is no output schema.

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?

For a 12-parameter, output-schema-less aggregation tool, the definition covers what is grouped, what comes back, and typical analytical questions, which is sufficient to call it correctly. It only lacks boundary information versus get_statistics and any note on result ordering or handling of sparse groups.

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 example questions map analytical intents onto specific `by` enum values (previous_result, weekday, hour, trade_of_day), which genuinely clarifies how to parameterize the call. It still adds nothing about the filter parameters (from/to, account, checklist), which the schema already documents well.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Uses a specific verb and resource ("groups the closed logical trades ... by one or two properties") and enumerates the resulting aggregates, so the agent knows exactly what the tool produces. It never names or contrasts itself with the sibling get_statistics, so a caller must infer the boundary between grouped breakdowns and overall statistics.

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 four example questions (win rate after a losing trade, setups on Mondays, best hour, overtrading) give concrete, actionable contexts for choosing this tool. There are no explicit exclusions or named alternatives, so when-not-to-use guidance is absent.

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