Skip to main content
Glama

Check a signal for lookahead

check_leakage
Read-onlyIdempotent

Compare backtest outputs on truncated data cuts to detect look-ahead bias; changed rows expose leakage, naming its pattern and horizon. No code is sent.

Instructions

Does a signal look ahead? plan gives cuts; rerun your code on the first cut rows for each, then compare. Rows that changed used later rows; the result names the pattern and horizon. No code is sent. A pass covers only these cuts: the columns are the caller's, and survivorship, vendor revisions or a leak no cut reaches leave no trace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cutsNocompare: plan's cuts.
seedNo
actionYes
columnsNocompare: {name: {full: [all rows], prefixes: [[first cuts[i] rows], ...]}}, null for missing.
prefixesNoplan: cuts, default 5.
toleranceNoDefault 1e-9.
timestampsNo
columns_fileNocompare, on your machine: a JSON file {cuts, columns} instead.
observationsNoplan: rows in the series.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
cutsNo
seedNo
limitsNo
sourceNo
columnsNo
verdictNo
plain_readingNo
flagged_columnsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.13.0

TDQS

B3.2/5.0
Behavior4/5

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

Annotations already cover safety (readOnlyHint=true, idempotent, non-destructive, closed world), so the bar is lower, and the description still adds real context: 'No code is sent' (privacy guarantee) and an explicit coverage caveat about survivorship, vendor revisions, and leaks no cut reaches. That honest scope disclosure is exactly the kind of behavioral detail annotations cannot provide.

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

Conciseness3/5

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

The front-loaded question is good, but the prose is telegraphic and partly unparseable: 'A pass covers only these cuts: the columns are the caller's, and survivorship, vendor revisions or a leak no cut reaches leave no trace' packs three unrelated caveats into one fragment. Information density is high but clarity suffers.

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?

With 9 parameters, an enum action, nested columns, and an output schema, the description should at minimum clarify what plan versus compare each return and how the two phases connect. It sketches the workflow and its limits, but omits the distinction between the two actions' outputs and leaves several parameters unexplained, so it is only marginally complete for a tool of this complexity.

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?

Schema coverage is 67%, so the baseline is 3. The description touches on cuts, the columns payload, and prefixes implicitly, but adds no meaning for seed, tolerance, timestamps, observations, or columns_file beyond what the schema already documents. It does not compensate for the uncovered third.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening question 'Does a signal look ahead?' and the title state the goal (detecting lookahead bias in a signal), but the description spends most of its text on the mechanics of a two-phase protocol (plan → rerun → compare) rather than crisply stating what the tool returns. An agent can infer the purpose, but the verb+resource framing is buried and the sibling set (placebo_test, validate_overfitting, validate_backtest_length) is never distinguished.

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

Usage Guidelines3/5

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

The description does convey a usage workflow: call plan to get cuts, rerun your code on the first cut rows for each, then compare. That is genuine guidance. However it never says when to prefer this over the numerous validation siblings, nor when a check is unnecessary, so the routing guidance is only implied.

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