Skip to main content
Glama
BijectiveLabs

trading-research-agents

Official

Cost floor (layer 0)

check_cost_floor
Read-only

Verify if a claimed edge covers the cheapest round-trip trading cost before any data is touched. Stops ideas below the cost floor, saving backtest effort.

Instructions

Check whether a claimed edge can pay for trading it, before any data is touched.

Reads the fee channels declared in envelope.toml, takes the cheapest round trip (on `venue`
when given, else across every channel) and compares the claimed magnitude with it. Use it
first: an idea whose edge is below the round trip stops here, and no backtest can rescue it.
Read-only. Returns `outcome` ("cleared" or "stop"), the channel used, its round trip and the
margin (magnitude minus round trip) in bps as decimal strings, and the measured round trip
when the channel records one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
venueNoonly this venue's channels; empty for the cheapest across all
envelope_pathYespath to envelope.toml, the declared fee channels
magnitude_bpsYesthe claimed edge per round trip, in basis points, as a decimal string

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, and the description restates read-only. It adds real behavioral context beyond the annotations: it reads fee channels from envelope.toml, takes the cheapest round trip restricted to `venue` or across all channels, and emits an outcome of 'cleared' or 'stop' with margin in bps. It never states failure modes (e.g., unparsable envelope or missing channel), which is the remaining gap.

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 core decision in the first sentence, followed by mechanism, usage, and return shape. The 'no backtest can rescue it' clause is slightly rhetorical but reinforces the gate; overall it is tight with no dead weight.

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?

Given a read-only, three-parameter tool with a full schema and an output schema, the description supplies everything needed to call it correctly: inputs consumed, the decision rule, the ordering constraint, and the outcome vocabulary. Return-value detail is a bonus rather than a necessity here.

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 100% and the schema already documents all three parameters, including the 'empty for the cheapest across all' semantics of `venue`. The description's 'on `venue` when given, else across every channel' merely restates that, and `magnitude_bps` gets no format detail beyond what the schema says, so this is baseline territory.

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: it gates a claimed edge against the cost of trading it, before any data is touched. This is clearly distinguishable from the sibling tools (list_runs, show_ledger, audit_dataset, validate_trades), which are ledger/report inspection rather than a pre-trade economic gate.

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?

Gives explicit sequencing guidance ('Use it first') and the decisive condition ('an idea whose edge is below the round trip stops here, and no backtest can rescue it'). It does not name a sibling as the alternative for cases that clear the floor, so it stops short of full when/when-not/alternatives coverage.

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