Skip to main content
Glama
ByBastianRok

polymarket-mcp-server

by ByBastianRok

Get Polymarket order book

polymarket_get_orderbook
Read-onlyIdempotent

Fetch a live Polymarket order book for one outcome to check best bid/ask, spread, mid price, implied probability, and top depth before trading.

Instructions

Get the live order book for one market outcome: best bid/ask, spread, mid price, implied probability, and top-of-book depth.

This is where you check whether an edge is real: the implied probability (mid) is the market's estimate, while best ask is what you'd actually pay to buy and best bid what you'd receive to sell. A wide spread or thin depth means the "price" you saw elsewhere may not be executable.

Identify the outcome either by token_id (preferred) OR by slug + outcome.

Args:

  • token_id (string, optional): the ~77-digit CLOB token id for one outcome.

  • slug (string, optional) + outcome (string, optional): e.g. slug + "Yes". Outcome defaults to the first.

  • depth (number): price levels per side to include, 1-50 (default 10).

  • response_format ('markdown' | 'json'): default 'markdown'.

Returns: { tokenId, outcome, slug, question, bestBid, bestAsk, mid, spread, impliedProbabilityPct, spreadPct, totalBidSize, totalAskSize, bids:[{price,size}], asks:[{price,size}], timestamp }.

Errors: "No market found for slug…" (bad slug); an empty side is reported as bestBid/bestAsk = null.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugNoMarket slug — alternative to token_id. Combine with 'outcome'.
depthNoHow many price levels per side to include (1-50, default 10).
outcomeNoOutcome name to select when using 'slug' (e.g. 'Yes' or 'No'). Defaults to the first outcome.
token_idNoCLOB token id (the ~77-digit id for ONE outcome). Preferred when you already have it.
response_formatNoOutput format: 'markdown' (concise, human-readable; default) or 'json' (full structured data).markdown

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
midYes
asksYes
bidsYes
slugYes
spreadYes
bestAskYes
bestBidYes
outcomeYes
tokenIdYes
questionYes
spreadPctYes
timestampYes
totalAskSizeYes
totalBidSizeYes
impliedProbabilityPctYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld, so the safety profile is covered. The description adds genuine behavioral value beyond that: the error case ('No market found for slug…') and the edge case that an empty side surfaces as bestBid/bestAsk = null, which an agent cannot infer from annotations alone.

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?

It is front-loaded with the purpose, then interpretation, then args/returns/errors in labeled blocks, so an agent can scan it quickly. It is slightly longer than strictly necessary, with some sentences (the economic interpretation) edging toward prose rather than specification.

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?

Return fields are enumerated and an output schema also exists, errors and null-side behavior are documented, and all five parameters are described. Nothing an agent needs to invoke it correctly appears to be missing.

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 description coverage is 100%, so the baseline is 3. The description still adds value by stating the token_id vs. slug+outcome selection rule ('either... OR') and marking token_id as preferred, a relationship the flat schema (no oneOf) does not express; the other params largely restate the 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?

The first sentence names a specific verb and resource ('Get the live order book for one market outcome') and enumerates exactly what it contains (best bid/ask, spread, mid, implied probability, depth). The follow-up sentence implicitly differentiates it from price/quote siblings by framing it as the place where a quoted 'price' is validated as executable.

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?

It gives a clear use context: 'This is where you check whether an edge is real' and explains the interpretation of mid vs. best ask/bid and what a wide spread or thin depth implies. It does not explicitly name alternatives (e.g. get_quote, get_price_history) or state when not to use this tool, so it falls short of a full 5.

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