Skip to main content
Glama

Fetches resting order book depth for a Polymarket outcome

pm_orderbook
Read-only

Fetches resting order book depth for a Polymarket outcome token (or market slug and outcome name). Returns top 20 bids and asks, midpoint price, spread, depth within 1/2/5 cents, and last trade price. Information only, not financial advice. Related tools on this server, for a different need: pm_history when you need to fetch historical price points for a Polymarket outcome; pm_event when you need to fetch details for a single Polymarket event by slug. Price: $0.003 per successful call, paid with x402 (USDC on Base, Solana and 10 more networks); failed calls are not charged.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "tokenId": "<tokenId>"
    },
    "name": "pm_orderbook"
  }
}

Input Schema

NameRequiredDescriptionDefault
slugNoMarket slug if tokenId is unknown
outcomeNoOutcome name (e.g. Yes or No) when slug is provided
tokenIdYesOutcome CLOB token ID (numeric string)

Output Schema

NameRequiredDescriptionDefault
midNo
asksNo
bidsNo
depthNo
marketNo
sourceNo
spreadNo
bestAskNo
bestBidNo
tokenIdNo
asksCountNo
bidsCountNo
checkedAtNo
disclaimerNo
lastTradePriceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare read-only and open-world, but the description adds the truncation limit (top 20 levels) and the payment model: $0.003 per successful call via x402 in USDC, with failed calls not charged. Cost and billing behavior are exactly the kind of context structured fields cannot convey and materially affect an agent's decision to call.

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?

Return fields are front-loaded and the sibling routing follows in a single well-ordered sentence. The 'Information only, not financial advice' clause is boilerplate that consumes space without informing tool selection, and the network enumeration ('Solana and 10 more networks') is padding.

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 an output schema already covering the response shape, the description supplies the remaining decision-critical pieces: the two identifier paths, the depth truncation, the per-call price and payment rail, and where to go for adjacent data. Nothing an agent needs before calling is absent.

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

Parameters3/5

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

Schema coverage is 100% and the schema already documents tokenId as the CLOB token, slug as the fallback, and outcome as the name used with slug. The description only restates the either/or identifier pattern in parentheses, adding no format, precedence, or error-handling detail beyond the schema. Baseline 3 applies.

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 and resource (fetch resting order book depth for a Polymarket outcome token), names the alternative identifier form (slug + outcome name), and enumerates the returned fields (top 20 bids/asks, midpoint, spread, depth within 1/2/5 cents, last trade). An agent can distinguish it from pm_history and pm_event without opening any 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?

Explicitly routes two adjacent needs: pm_history for historical price points and pm_event for event-by-slug details, each with a stated condition. It does not address when a free read-only alternative like crypto_orderbook would suffice, nor does it state a when-not condition for this tool itself, so it stops short of full routing guidance.

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