Skip to main content
Glama

Close Trade

close_trade
Destructive

[JOURNAL] Close a journal trade by trade_id (from log_trade or get_journal). Optionally exit_price (defaults to live price) and note (exit reasoning). n0brains resolves the outcome from real candles over the held window: return %, R multiple vs your initial stop, MAE/MFE (worst drawdown / best unrealized gain while open), and whether your stop or target level actually traded. HISTORICAL backfill: pass closed_at (epoch seconds of the real exit) + explicit exit_price. Pro.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
trade_idYes
closed_atNo
exit_priceNo

TDQS

A4.4/5.0
Behavior4/5

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

Beyond the destructiveHint annotation, the description discloses what happens after closing: 'n0brains resolves the outcome from real candles over the held window' including return %, R multiple, MAE/MFE, and whether stop/target traded. It also explains the default behavior of exit_price and the requirements for historical backfill, adding meaningful behavioral context.

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 compact and front-loaded, with the primary action first. It packs substantial information (modes, metrics, defaults) into a few sentences. The trailing 'Pro.' is somewhat cryptic and adds little, preventing a perfect score.

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 the lack of an output schema, the description explains what the tool computes and returns (return %, R, MAE/MFE, stop/target trade), covering the essential behavioral outcomes. It does not explicitly describe the response format or error handling, but for a destructive close operation with clear modes, it is sufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description provides meaning for all four parameters: trade_id (source), exit_price (defaults to live price), note (exit reasoning), and closed_at (epoch seconds for historical backfill). Since the schema has no descriptions (0% coverage), the description fully compensates by explaining each parameter's purpose and usage.

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 action ('Close a journal trade by trade_id'), specifies the resource ('journal trade'), and indicates where the trade_id comes from ('from log_trade or get_journal'). This distinguishes it from sibling tools like 'void_trade' or 'amend_trade' by the verb 'close' and the detailed outcome resolution.

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 gives explicit usage context: normal journal closing with optional exit_price and note, plus a separate historical backfill mode requiring closed_at and explicit exit_price. It does not explicitly name alternative tools or exclusions, but the two-mode breakdown provides clear when-to-use guidance.

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.

TDQS

A4/5.0
Disambiguation4/5

Most tools have clearly distinct purposes with detailed descriptions, but there are clusters of similar concepts (e.g., get_liquidity_map vs get_liquidation_map, get_state vs get_state_brief, multiple signal-related tools) that could cause misselection despite thorough documentation.

Naming Consistency5/5

All tools follow a consistent lowercase verb_noun pattern, predominantly get_* nouns, with only a few non-get verbs like list_signals, rank_trades, log_trade, etc., but the style is uniform.

Tool Count2/5

With 52 tools, the surface is extremely heavy for an agent to navigate. While the server's scope is broad, the count far exceeds the typical 3-15 range and falls into the 'too many' category.

Completeness4/5

The tool set covers the full lifecycle for journaling, signals, market analysis, and proof, with no major dead ends. Minor gaps exist, such as no dedicated get_trade_by_id (workaround via get_journal) and no get_market_state tool despite being referenced in get_state.

Resources