Skip to main content
Glama

Trade economics check

trade_check

Deterministic pre-trade economics check for a long (buy) round trip. Call it before placing a trade: given size, entry/exit reference prices, maker/taker roles, fees, spread and slippage, it returns whether the trade still clears after all costs (result.economically_clears, result.reason), the net P&L and return, a per-leg cost breakdown, the break-even and minimum profitable exit prices, and every assumption applied. No predictions, no market data, no execution. Costs 1 prepaid credit per successful check; invalid input costs nothing. Requires "Authorization: Bearer smk_..." (get a key at https://smolabot.arison8.com).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sideYesLong-only: "buy". Shorts are rejected with SIDE_NOT_SUPPORTED.
sizeYesExactly one of quantity (base units) or notional (quote currency, at the entry reference price).
symbolYesLabel only; does not affect the math.
exit_priceYesExpected exit reference (mid) price, before spread, slippage and fees.
spread_bpsYesFULL bid/ask spread in bps; a taker leg pays half.
entry_priceYesEntry reference (mid) price, before spread, slippage and fees.
slippage_bpsYesAdverse slippage per taker leg, in bps.
maker_fee_bpsYes
taker_fee_bpsYes
exit_liquidityYes
entry_liquidityYes
profit_buffer_bpsNoOptional required net return in bps; omitted means 0 (echoed in assumptions).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
errorNoPresent when ok=false. Stable machine-readable code; field-level `errors` for VALIDATION_FAILED.
usageYes
resultNoPresent when ok=true: the canonical /check result.
request_idYes
model_versionYesCalculation model version. Same version + same input = same output.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

The description adds substantial behavioral context beyond annotations: deterministic execution, no market-data dependence, no execution side effects, cost of 1 prepaid credit per successful check, no charge for invalid input, and required authorization header. This is especially valuable since the annotations only supply false hints and do not describe runtime costs or side effects.

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?

The description is information-dense yet well-structured, front-loading the core purpose and usage instruction before listing outputs and costs. Every sentence contributes operational or behavioral value; there is no filler or repetition of schema details.

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?

For a tool with 12 parameters and an output schema, the description is complete: it states the decision it answers, the result fields, assumptions echo, cost behavior, invalid-input behavior, auth requirement, and what it does not do. With no sibling tools and an output schema present, nothing critical is missing.

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 schema covers about 67% of parameters with descriptions, so the schema does most of the work. The description groups inputs as 'size, entry/exit reference prices, maker/taker roles, fees, spread and slippage,' which adds some orientation but does not meaningfully explain the less-documented fields like maker_fee_bps, taker_fee_bps, entry_liquidity, or exit_liquidity beyond what the schema provides.

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 opens with a specific verb and resource: 'Deterministic pre-trade economics check for a long (buy) round trip.' It clarifies scope (long-only), the inputs involved, and the concrete result fields returned. There are no siblings to differentiate from, so the clear verb+resource is sufficient.

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

Usage Guidelines5/5

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

The description explicitly says 'Call it before placing a trade,' giving direct when-to-use guidance. It also states exclusions: 'No predictions, no market data, no execution,' and mentions the prepaid credit cost and auth requirement, which helps an agent decide whether invoking it is appropriate.

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