Skip to main content
Glama

Algo Trade Analytics

analyze_risk_management

analyze_risk_management
Read-onlyIdempotent

Analyze position sizing, drawdown limits, and risk-of-ruin for a required experiment protocolId.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNo
inputsNoOptional input overrides as a JSON-stringified object, e.g. '{"SMA Length":14}'. Keys are Pine input names; values are number, string, or boolean.
sourceYes
symbolYes
endDateYes
startDateYes
timeframeYes
iterationsNo
protocolIdYesExperiment protocol id returned by define_experiment_protocol for this exact risk-management check.
accountSizeNo
caseStudyIdNoOptional: bind this call to one of your case studies. Defaults to the bound run's case study.
researchRunIdNoOptional: bind this call to one of your existing research runs. Defaults to this session's most recent unfinished run.
maxDrawdownPctNo
riskPerTradePctNo
ruinDrawdownPctNo
maxRiskOfRuinPctNo
mcpIdempotencyKeyNoUnique key for this logical action. Reuse it only when retrying the same arguments. Required for hosted trust-creating actions when no idempotency header is supplied.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.3/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is clear. The description adds no behavioral context beyond the constraints implied by requiring a protocolId. It doesn't discuss side effects, performance, or data boundaries. With annotations carrying the safety weight, the description contributes minimal additional behavioral detail.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely brief—one sentence—which is concise but grossly under-specified for a tool with 17 parameters. While there is no fluff, the structure is not 'appropriately sized'; it lacks necessary detail. The core action is front-loaded, but the overall terseness does not serve the agent's needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (17 parameters, 6 required, no output schema, low schema coverage), the description is woefully incomplete. It fails to explain the meaning of key parameters, the expected input format, or how the analysis results are delivered. An agent cannot correctly invoke this tool without additional external knowledge.

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

Parameters1/5

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

Schema description coverage is only 29%, meaning most parameters are undocumented within the schema. The description mentions 'protocolId' as required but does not explain any of the other 16 parameters, such as iterations, accountSize, riskPerTradePct, or maxDrawdownPct. The tool definition does nothing to compensate for the sparse schema documentation, leaving the agent clueless about parameter usage.

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 states a specific verb ('Analyze') and resource ('position sizing, drawdown limits, and risk-of-ruin') and mentions that it requires an experiment protocolId. This is clear and distinguishes it from other tool categories in the sibling list (e.g., analyze_bootstrap_confidence focuses on different aspects). However, it does not explicitly differentiate it from other analyze_* tools, so it's not a 5.

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, nor does it mention prerequisites beyond 'required experiment protocolId'. There is no mention of when not to use it or which sibling tools might be more appropriate for other analysis types. The usage context is entirely omitted.

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