Skip to main content
Glama

prediction.exit_capacity_audit

Audit live Polymarket order book liquidity to determine executable position size, average exit price, and price impact versus best quote before committing capital.

Instructions

Walk a single Polymarket outcome's live order book to determine how much
of a given position size can actually be filled right now, at what
average price, and with how much price impact versus the best quote - a
live, point-in-time snapshot, not historical/average liquidity. Also
returns book_snapshot_time (the book's own reported snapshot timestamp)
and Polymarket's own tick_size/min_order_size for this market (null if the
book response didn't include them).

Use this to validate one leg of an opportunity found by
prediction.neg_risk_arbitrage before committing capital, or whenever you
need real executable liquidity rather than the headline best bid/ask. Do
NOT use for multi-outcome basket arbitrage detection (use
prediction.neg_risk_arbitrage instead). market_slug only resolves an
EXACT Polymarket market slug - no fuzzy keyword search, since a wrong
silent match would be worse than an error here.

Args:
    position_size_shares: Number of outcome shares to sell (or buy). Must
        be positive.
    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.
    side: "sell" (default) to audit exiting a position against the bid
        side, or "buy" to audit entering against the ask side.

Returns:
    On success: {"success": true, "executable", "best_quote",
        "avg_exit_price", "price_impact_pct", "max_executable_shares", ...}
    On failure: {"success": false, "error": {"type", "message"}}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sideNosell
outcomeNoyes
token_idNo
market_slugNo
position_size_sharesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure and does so thoroughly. It states this is a live point-in-time snapshot, not historical/average liquidity, explains returned metadata like book_snapshot_time and tick_size, and documents the success/failure response envelope. It also notes that missing book fields return null, setting expectations for edge cases.

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 longer than average but stays tightly organized with a purpose summary, usage guidance, parameter list, and return-shape note. Every sentence carries necessary information, and the most decision-relevant constraints (live snapshot, single outcome, exact slug) are front-loaded.

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 moderate complexity, no annotations, and no output schema, the description is complete. It covers what the tool does, when to use it, what each argument means, and what success and failure look like, including the key computed fields. An agent has enough information to call it correctly and interpret the result.

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?

The input schema provides type/default/required info only, with 0% semantic coverage, so the description must explain each parameter. It does: position_size_shares must be positive, token_id and market_slug are alternatives, outcome defaults to 'yes' and is ignored when token_id is provided, and side maps sell to bid and buy to ask. This fully compensates for the schema gaps.

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 ('Walk') and resource ('a single Polymarket outcome's live order book') and clearly states the computed outputs: executable size, average price, price impact. It also distinguishes itself from prediction.neg_risk_arbitrage by explicitly scoping to a single leg rather than multi-outcome basket arbitrage.

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?

Usage guidance is explicit: validate one leg of an opportunity from prediction.neg_risk_arbitrage, or whenever real executable liquidity is needed. It also gives a clear exclusion: do NOT use for multi-outcome basket arbitrage, directing the agent to prediction.neg_risk_arbitrage instead. The exact-slug warning further clarifies when it is appropriate to use this tool.

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