Skip to main content
Glama
K4L-EL

pyon-mcp

by K4L-EL

Diagnose strategy (AI debugger)

diagnose_strategy

Run a sample backtest to diagnose why a strategy produces zero trades or poor returns, and get a structured issue list plus an optional edit request.

Instructions

Ask Pyon's AI debugger to analyze a strategy, running a fresh sample backtest as evidence; waits up to 300s. Use this when run_backtest shows zero trades, poor returns, or confusing diagnostics and you need a causal explanation before editing. Parameters: strategyId (UUID, required); question (string, 10 to 2000 characters, optional) - ask something specific such as 'why did this take zero trades in 2025?', or omit it entirely for a general health check. Returns a diagnosis message, a structured list of up to 10 issues, and, when available, a ready-to-use edit request (agentRequest) that can be passed directly to edit_strategy as the instruction. If the wait times out, the error includes a jobId to check with get_job_status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
questionNoOptional specific question, at least 10 characters, e.g. 'why did this take zero trades in 2025?'. Omit it entirely for a general health check.
strategyIdYesStrategy UUID. Find it with list_strategies (it is also returned by create_strategy). Not a strategy name.
Behavior5/5

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

With no annotations, the description fully discloses behavior: it runs a fresh backtest, waits up to 300s, returns a diagnosis, up to 10 issues, and an optional agentRequest. It also explains timeout error handling with jobId, which is crucial for an async-like operation. This is thorough and honest.

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

Conciseness5/5

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

The description is compact yet dense: first sentence states purpose and core behavior, second gives usage context, third details parameters, fourth explains return value, fifth explains timeout. Every sentence serves a distinct purpose, and it is organized logically.

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

Completeness5/5

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

Despite no output schema and no annotations, the description covers the key aspects: what it does, when to use, parameters, return structure, timeout behavior, and how to use the result with edit_strategy. It also references sibling tools for finding strategyId. This is complete for a diagnostic tool.

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% giving baseline 3, but the description adds valuable context: it explains the question is optional and gives an example, and clarifies that omitting it yields a general health check. It also reiterates the required nature of strategyId, adding practical usage nuance beyond the schema.

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 tool 'analyze a strategy, running a fresh sample backtest as evidence' and distinguishes it from siblings like run_backtest by focusing on causal diagnosis. It explicitly mentions producing an edit request for edit_strategy, making its role unique.

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

Usage Guidelines5/5

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

It gives explicit when-to-use guidance: 'Use this when run_backtest shows zero trades, poor returns, or confusing diagnostics...'. It also provides a fallback for timeout via get_job_status, and implies not to use it if you only need a backtest. This is clear and actionable.

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/K4L-EL/pyon-mcp'

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