Skip to main content
Glama

prediction.bid_ask_spread_pct

Compute a Polymarket outcome's live top-of-book bid/ask spread as a percentage of mid price from a token_id or market_slug for quick quote spread checks.

Instructions

Cheap tier - a single Polymarket outcome's live top-of-book bid/ask spread
as a percentage of mid_price. Not a liquidity or executability measure
(use prediction.exit_capacity_audit/order_split_guide for that). Reuses
the same order-book fetch as those tools - no new upstream call.

Args:
    token_id: The outcome's CLOB token_id / asset_id, if already known.
        Provide either this OR market_slug.
    market_slug: Exact Polymarket market slug, used to resolve token_id
        automatically when not already known.
    outcome: "yes" (default) or "no" - which side to resolve when using
        market_slug. Ignored if token_id is given directly.

Returns:
    On success: {"success": true, "best_bid", "best_ask", "mid_price",
        "spread_abs", "spread_pct", ...}
    On failure: {"success": false, "error": {"type", "message"}}

Input Schema

NameRequiredDescriptionDefault
outcomeNoyes
token_idNo
market_slugNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.6.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does several things well: it discloses the cost/latency profile ('Reuses the same order-book fetch as those tools - no new upstream call') and documents both success and failure response shapes, including an error object. It does not state auth requirements or that the operation is strictly read-only, so it is not fully exhaustive.

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-loads the one-line purpose and the disambiguation before the Args/Returns blocks, and every section earns its place given there is no output schema. It is mildly verbose in the Args prose, but there is 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?

No output schema exists, and the description compensates by enumerating return keys (best_bid, best_ask, mid_price, spread_abs, spread_pct) and the failure envelope. Combined with full parameter semantics, sibling routing, and the upstream-call disclosure, an agent has everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does fully: it explains token_id as the CLOB asset id, market_slug as the auto-resolver, the either/or relationship between them, the default of outcome='yes', and that outcome is ignored when token_id is supplied. This resolves all three parameters plus a precedence rule the schema does not encode.

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/resource pair: a single Polymarket outcome's live top-of-book bid/ask spread, expressed as a percentage of mid_price. It explicitly distinguishes itself from the liquidity-flavored siblings (exit_capacity_audit, order_split_guide) and even tags itself as the 'cheap tier', so an agent can place it in the tool family without opening a 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?

Gives a clear exclusion ('Not a liquidity or executability measure') and names the two tools to use instead, which is strong routing guidance. It stops short of an explicit positive when-to-use trigger (e.g. 'call this first to screen a market before deeper liquidity checks'), leaving that slightly implicit.

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