Skip to main content
Glama
polymarket-mcp

polymarket-mcp

by simonlokc

polymarket_get_orderbook

Fetch live CLOB order books for one or more outcome token IDs and get sorted bids/asks, best bid/ask, spread, and midpoint to assess market depth.

Instructions

Live CLOB order book(s) for one or more outcome token ids. Returns sorted bids/asks with best bid/ask, spread and midpoint. Get token ids from polymarket_get_markets or polymarket_resolve_token.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "polymarket_get_orderbook"
  }
}

Input Schema

NameRequiredDescriptionDefault
token_idNoSingle outcome token id (convenience).
token_idsNoOne or more outcome token ids.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden: it does disclose the tool is live data and enumerates the return fields, which is genuinely useful. However, it says nothing about rate limits, latency, error behavior for invalid token ids, or whether both the single and plural parameters can be supplied together and which takes precedence.

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?

Three short sentences, front-loaded with purpose then return contents then prerequisite, with no filler or restated title.

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?

There is no output schema, so the description's enumeration of returned fields is doing necessary work, and the id-sourcing guidance closes the main workflow gap. What remains missing is behavioral context (errors, rate limits, parameter precedence) for a tool that has no annotations to fall back on.

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%, so the schema already documents both parameters ('single outcome token id (convenience)' vs 'one or more outcome token ids'), establishing the 3 baseline. The description adds only the source-of-ids hint and does not resolve the ambiguity of passing token_id and token_ids simultaneously.

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 pairs a specific verb ('get') with a specific resource ('live CLOB order book(s)') and states the input unit ('one or more outcome token ids'). It also names the return payload (sorted bids/asks, best bid/ask, spread, midpoint), making it unmistakable against siblings like polymarket_get_markets, which supplies ids rather than books.

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 concrete prerequisite workflow: 'Get token ids from polymarket_get_markets or polymarket_resolve_token,' which tells the agent what to call first. It stops short of stating when not to use this tool or how it differs from any alternative order-book source, so it does not reach the explicit when/when-not bar.

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