Skip to main content
Glama

Live execution cost: what a market order really costs

get_slippage
Read-only

Calculate live slippage costs in basis points for $10K–$5M market orders across 8 major perpetuals and identify thin order books.

Instructions

Call this when the user asks how much slippage a trade of a given size would face, how thick the books are, or which major perp market is thinnest right now. Returns live cost ladders in basis points for $10K to $5M market orders across 8 major perpetuals, both sides, from the full visible order book. Excludes fees; null = the book cannot absorb that size.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint=true and openWorldHint=true, so the description doesn't need to restate safety. It adds valuable behavior beyond annotations: the return format (cost ladders in basis points), the exact order sizes, both side coverage, exclusion of fees, and the null semantics for unabsorbable sizes. This is richer than the baseline for annotated read-only tools.

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 compact and front-loaded with the most critical usage trigger. It covers what, when, and return semantics in just two sentences. Every clause adds value (e.g., size range, both sides, null meaning), with no filler or repetition.

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 the tool has no parameters and no output schema, the description carries full responsibility for explaining return values and edge cases. It does so thoroughly: live cost ladders, order size range, number of perps, both sides, fee exclusion, and null behavior. This makes the tool fully understandable without needing additional information.

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?

The input schema has zero parameters, which is a baseline 4. The description adds no parameter-specific semantics because there are none, but it implicitly tells the agent that no arguments are needed, consistent with a fixed-market tool. The description does not need to compensate since there is nothing to document.

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 clearly states the tool's purpose: it returns live cost ladders for market orders, addressing slippage, book thickness, and thinnest perp market queries. This distinguishes it from sibling tools like get_funding_arbitrage or get_liquidations, which focus on different data. The verb 'returns' and specific scope ('8 major perpetuals', '$10K to $5M', 'both sides') make the purpose unmistakable.

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?

The description opens with explicit usage guidance: 'Call this when the user asks how much slippage...' It also covers related use cases like book thickness and thinnest market. While it doesn't explicitly mention when not to use it or alternative tool names, the context is clear enough for an agent to select this tool over siblings for slippage-related queries.

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