Skip to main content
Glama
BijectiveLabs

trading-research-agents

Official

Validate trades (layer 5)

validate_trades
Read-only

Judge closed trades against a sealed preregistration: enforce its universe and era, subtract costs, run bootstrap, permutation, power, and kill criteria, then return a deterministic read-only verdict.

Instructions

Layer 5: judge a set of closed trades against the registration sealed before them.

Rejects trades outside the registered universe or era, subtracts `cost_bps` from every trade,
then runs the eight requirements of layer 5, among them a block bootstrap interval, a
permutation test against a null (`null_mode` "sign" or "cross_sectional") and the power
achieved against the power required, and applies the registration's kill criteria.
Deterministic for a given `seed`. Use it once per registration; running it again with other
settings is the forking the seal exists to prevent. Read-only: the verdict is returned, never
written to the ledger.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNorandom seed; the same seed gives the same verdict
n_permNopermutations of the null
cost_bpsYesround-trip cost subtracted from every trade, in bps, as a decimal string
null_modeNo"sign" (flip each trade's sign) or "cross_sectional"sign
n_resamplesNobootstrap resamples
trades_pathYespath to trades.jsonl, the closed trades to judge
block_lengthNoblock length of the bootstrap, in trades
registration_pathYespath to the sealed preregistration.json

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • addedInput schema / properties / block_length / description
      Added value: +"block length of the bootstrap, in trades"
    • addedInput schema / properties / cost_bps / description
      Added value: +"round-trip cost subtracted from every trade, in bps, as a decimal string"
    • addedInput schema / properties / n_perm / description
      Added value: +"permutations of the null"
    • addedInput schema / properties / n_resamples / description
      Added value: +"bootstrap resamples"
    • addedInput schema / properties / null_mode / description
      Added value: +"\"sign\" (flip each trade's sign) or \"cross_sectional\""
    • addedInput schema / properties / registration_path / description
      Added value: +"path to the sealed preregistration.json"
    • addedInput schema / properties / seed / description
      Added value: +"random seed; the same seed gives the same verdict"
    • addedInput schema / properties / trades_path / description
      Added value: +"path to trades.jsonl, the closed trades to judge"
  2. First observedv0.7.1

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint and closed-world, but the description adds real behavioral context: determinism tied to `seed`, rejection of trades outside the registered universe, the analysis performed, and the explicit guarantee that the verdict is returned but never written to the ledger. The single-use/forking warning is operational guidance that annotations cannot express.

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?

Front-loaded with the layer-5 framing and organized as purpose → pipeline → constraints → safety. The middle sentence is dense with enumerated sub-behaviors, which is justified for an eight-parameter statistical tool but slightly reduces scannability.

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?

With an output schema present, return values need not be explained, and the description covers scope, determinism, data prerequisites (registration_path/trades_path pairing), and side-effect profile. The 'eight requirements of layer 5' are only partially enumerated, leaving some ambiguity about failure modes, but nothing essential to correct invocation is missing.

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%, so the baseline is 3, but the description meaningfully frames `cost_bps` (subtracted from every trade), `null_mode` (sign vs cross_sectional null construction), and `seed` (same seed gives the same verdict) inside the workflow. It stops short of clarifying `n_perm`, `n_resamples`, or `block_length` beyond what the schema already says.

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?

States a specific verb and resource ('judge a set of closed trades against the registration sealed before them') and enumerates what validation entails: universe/era rejection, cost subtraction, eight layer-5 requirements, kill criteria. An agent can distinguish this from check_registration or show_ledger without opening any schema.

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?

Explicit when-to-use ('once per registration') and a strong when-not ('running it again with other settings is the forking the seal exists to prevent'). It does not, however, cross-reference sibling tools such as check_registration or read_run_report for inspecting the verdict, so the alternative routing is left to inference.

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