Skip to main content
Glama

analyze_trades

Calculate trade performance statistics including profit/loss analysis, drawdown calculations, and risk metrics from P&L data to evaluate trading strategy effectiveness.

Instructions

Compute performance statistics from a list of trade P&L results.

Args: pnls: List of profit/loss values per trade (e.g. [150, -80, 200, -50, 300]) starting_equity: Starting account equity for drawdown calc (default $100,000)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pnlsYes
starting_equityNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool computes statistics and mentions drawdown calculation, but lacks details on what specific statistics are computed (e.g., win rate, Sharpe ratio), how results are formatted, whether it's idempotent, or any error handling. For a tool with no annotation coverage, this leaves significant 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?

The description is appropriately sized and front-loaded, with the core purpose stated first. The two-sentence structure is efficient, and the parameter explanations in the 'Args' section add necessary detail without redundancy. However, the formatting with 'Args:' could be slightly more integrated into the main text.

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 tool's moderate complexity (2 parameters, no annotations, but with an output schema), the description is reasonably complete. It covers the purpose and parameter semantics adequately, and since an output schema exists, it doesn't need to explain return values. However, it could benefit from more behavioral context, such as what statistics are computed, to fully compensate for the lack of annotations.

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 description adds meaningful context beyond the input schema, which has 0% description coverage. It explains that 'pnls' is a 'List of profit/loss values per trade' with an example, and clarifies that 'starting_equity' is for 'drawdown calc' with a default. This compensates well for the schema's lack of descriptions, though it doesn't detail all possible statistics or parameter constraints.

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?

The description clearly states the tool's purpose: 'Compute performance statistics from a list of trade P&L results.' It specifies the verb ('compute') and resource ('performance statistics'), and distinguishes itself from siblings like 'calculate_position_size' or 'get_trend_score' by focusing on trade analysis rather than position sizing or trend scoring. However, it doesn't explicitly differentiate from all siblings (e.g., 'compare_tickers' might also involve performance analysis).

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context for use, or comparisons with sibling tools like 'compare_tickers' or 'get_technical_indicators' that might also analyze performance. The only implied usage is for trade P&L analysis, but no explicit when/when-not instructions are given.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/slimbiggins007/fintools-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server