Skip to main content
Glama

Prediction Market Intelligence

Order book and fill cost

pm_book
Read-onlyIdempotent

Use this when the user asks how liquid a Polymarket market is, how much a trade of a given size would really cost, how far it would move the price, or what the order book looks like. Returns the live book for one outcome: best levels, spread, dollar depth near the mid and which side is heavier. With amount it walks the book level by level for a market order (dollars to spend when buying, shares when selling) and returns shares filled, average and worst price, slippage against the mid, Polymarket's taker fee and the breakeven probability.

Input Schema

NameRequiredDescriptionDefault
sideNobuy (default) or sell.buy
amountNoFor buy: dollars to spend. For sell: number of shares to sell. Omit to see the book only.
marketYesA polymarket.com link, or a market or event slug from pm_search.
outcomeNoWhich outcome: "Yes"/"No", a team name, or for a multi-outcome event the outcome label ("25 bps decrease"). Default: the first outcome (usually Yes).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, openWorld), so the description's job is to add behavior — and it does: it explains that supplying amount walks the book level by level for a market order and returns shares filled, average/worst price, slippage, taker fee and breakeven probability. It still omits data freshness/latency and error behavior.

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?

Two sentences, front-loaded with the routing trigger and then the return contract. Every clause carries information — no filler, no restatement of the title or annotations.

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?

With no output schema, the description must carry the return contract, and it does: it enumerates the book fields and the full fill-cost payload. Combined with annotations handling safety, an agent has everything needed to call and interpret it.

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?

Schema coverage is 100%, so the baseline is 3; the description adds genuinely new meaning by tying amount to order semantics ('dollars to spend when buying, shares when selling') and framing it as a level-by-level walk rather than a snapshot, plus noting the default outcome. That clarifies interaction between side and amount beyond the schema text.

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 (retrieve the live order book and compute fill cost for one outcome) and is clearly separable from sibling market-data tools like pm_market. An agent can tell what it produces — best levels, spread, depth, fill simulation — without opening the 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?

Opens with explicit user-intent triggers: liquidity, real cost of a given-size trade, price impact, or viewing the book. This is strong when-to-use guidance, but it names no alternative (e.g., pm_market for plain price/quotes) and gives no when-not conditions.

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