Skip to main content
Glama

Price spread of two legs

spread_chart
Read-onlyIdempotent

Candles of (A − B) / B between any two instruments (book mids where stored, else marks). Free: 1 h candles and longer over up to 7 days; Pro: 1 m and up, up to 365 days.

Input Schema

NameRequiredDescriptionDefault
daysNo
leg_aYesinstrument id, e.g. binance:um:BTCUSDT
leg_bYesinstrument id
candleNo1h
executableNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the read-only, idempotent, non-destructive profile, and the description adds genuinely new behavior: the price source is book mids where stored and falls back to marks otherwise, plus explicit plan-based limits on granularity and history depth. It stops short of anything about response shape or failure modes when an instrument lacks stored mids.

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 dense sentences, front-loaded with the definition and followed by the constraint that most affects tool choice. Every clause carries information; nothing is redundant with the title or schema.

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?

For a read-only two-leg series tool with no output schema, the description covers what is computed, from what data, and under what tier limits. The one material gap is the undocumented `executable` flag, which changes what the spread actually measures.

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?

With only 40% schema description coverage, the description must carry weight: it does effectively document the `candle` and `days` constraints (granularity tiers, max history) and the (A − B) / B formula implies the roles of leg_a and leg_b. However, `executable` (default false) is never mentioned anywhere and its effect on the computed spread is completely opaque.

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

Purpose4/5

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

States a specific output (candles) and a precise mathematical definition ((A − B) / B) over two instruments, which uniquely identifies the operation. It does not name or contrast with any sibling such as pair_history or basis_trades, so an agent must infer whether a spread chart or a basis series is wanted.

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 gives tier-based constraints (Free: 1h+, ≤7 days; Pro: 1m+, ≤365 days), which is useful gating information, but it never says when to reach for this tool rather than a sibling or what prerequisites (valid instrument ids, entitlement) apply beyond the tier note.

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.