Skip to main content
Glama

Algo Trade Analytics

analyze_overfit_probability

analyze_overfit_probability
Read-onlyIdempotent

Estimate the Probability of Backtest Overfitting across a set of candidate configurations via combinatorially-symmetric cross-validation, for a required experiment protocolId. Use after testing several parameterizations to check whether keeping the in-sample best generalizes out-of-sample.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blocksNoEven number of contiguous time blocks to split the window into for cross-validation; defaults to 12.
metricNoPer-block performance metric CSCV ranks configurations by; defaults to 'sharpe'.
sourceYes
symbolYes
configsYesTwo or more candidate configurations (input-override sets) to compare for selection overfitting. Each is run over the same window.
endDateYes
startDateYes
timeframeYes
protocolIdYesExperiment protocol id returned by define_experiment_protocol for this exact overfitting check.
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.
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

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, covering the safety profile. The description adds the CSCV method and the protocolId prerequisite, which is useful, but it doesn't disclose output characteristics or any operational requirements beyond that. With annotations present, this is adequate but not rich.

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?

Two sentences with zero filler: the first front-loads purpose and method, the second gives workflow timing. Every phrase earns its place.

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

Completeness3/5

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

For a 12-parameter, 7-required tool with no output schema and 58% schema coverage, the description covers purpose, method, and workflow position but omits what the returned probability/result looks like and gives no guidance on the required data-locator parameters (symbol, timeframe, dates, source). It is adequate but leaves meaningful gaps.

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

Parameters3/5

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

The description maps 'candidate configurations' to configs and 'required experiment protocolId' to protocolId, adding meaning beyond the schema. At 58% schema coverage, however, symbol, timeframe, startDate, endDate, and source remain undocumented in both the schema and the description, so the description does not fully compensate for the coverage gap.

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 names a specific verb ('Estimate'), a specific resource ('Probability of Backtest Overfitting'), a method ('combinatorially-symmetric cross-validation'), and scope ('across a set of candidate configurations'). This clearly differentiates it from siblings like analyze_parameter_robustness or walk_forward_candidate without needing to open their schemas.

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?

'Use after testing several parameterizations to check whether keeping the in-sample best generalizes out-of-sample' states when to use it with clear context. However, it names no alternatives or when-not-to-use conditions, even though siblings like walk_forward_candidate or evaluate_candidate perform related validation jobs.

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