Skip to main content
Glama

prediction.exit_capacity_audit

Audit a Polymarket outcome's live order book to determine executable share size, average fill price, and price impact vs the best quote. Validate real exit capacity 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.

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. Dates show when Glama detected each change.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden of disclosing behavior. It clearly states this is a read-only, live, point-in-time snapshot, not historical data, and uses language like 'audit' and 'walk order book' to imply no execution. However, it does not explicitly say 'this tool does not place orders' or 'no trading occurs', which would be fully transparent for a tool that assesses executable liquidity.

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?

The description is well-structured with a clear intro, usage guidance, parameter explanations, and return format. It is slightly verbose, repeating the idea of 'real executable liquidity versus headline quote' in both paragraphs, but the redundancy is minor and does not obscure the content.

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?

The description covers parameter relationships (either token_id or market_slug, outcome ignored when token_id is given), required vs optional inputs, and return shape on success/failure. It lacks explicit behavior for the case where both token_id and market_slug are provided, and does not enumerate possible error types, but overall the context is sufficient for correct use in most scenarios.

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?

Even though the schema has no per-property descriptions, the tool description thoroughly explains all five parameters: position_size_shares meaning and positivity constraint, token_id vs market_slug exclusivity, outcome default and when it is ignored, and side default and direction. This gives the agent complete semantic understanding beyond the raw schema.

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?

Clearly states a specific action (walking a live order book to audit exit capacity) with a specific resource (a single Polymarket outcome), and explicitly distinguishes itself from the sibling tool prediction.neg_risk_arbitrage. The description leaves no ambiguity about the tool's core function.

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?

Provides explicit when-to-use guidance ('validate one leg of an opportunity found by prediction.neg_risk_arbitrage before committing capital') and when-not-to-use guidance ('Do NOT use for multi-outcome basket arbitrage detection'), naming the alternative tool directly. This is the strongest possible usage guidance.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/parkyucheol-del/alphapipeline'

If you have feedback or need assistance with the MCP directory API, please join our Discord server