Skip to main content
Glama
CoinRithm

CoinRithm/coinrithm-agent-trading

Official

Prediction-market outcome order book

pm_data_orderbook
Read-only

Fetch live prediction-market order book depth for one outcome by venue and event slug, returning bid, ask, midpoint and levels on Polymarket or Kalshi; no API key required.

Instructions

Free public live order book for one outcome of an event (the same outcome pm_data_price_history reads, or outcomeExternalMarketId). bid, ask, midpoint and level prices are 0-1 fractions, not 0-100 points. Each side is cut to its best depth levels as served, with the full level counts in bidLevels/askLevels. Polymarket and Kalshi only; orderBook: null is valid (venue not served, no resting orders, or a selected outcome book older than 10 s). This is fetch-time depth, not an executable quote: use pm_quote for that. No API key required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesEvent slug on that venue.
depthNoLevels per side, 1-50 (default 10).
sourceYesVenue slug, as in pm_data_events rows.
outcomeExternalMarketIdNoVenue market id of another outcome on the event (from pm_data_event).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
bodyNo
httpStatusYes
ledgerStatusNo
ledgerEventIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.25

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint/openWorldHint/destructiveHint, and the description adds substantial behavior beyond them: free/public/no-key access, venue coverage limits, the valid 'orderBook: null' outcomes (venue not served, no resting orders, or a >10 s stale book), that the book is fetch-time depth rather than executable liquidity, and the 0-1 fraction unit convention. These are exactly the traits an agent cannot infer from annotations.

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 scoping and unit caveats are front-loaded and every sentence carries load (units, depth trimming, venue limits, null semantics, alternative tool). It is dense and readable, though the single long paragraph packs several distinct concerns that could be marginally cleaner to parse.

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 present, the description needn't enumerate returns, yet it still explains the two fields an agent would misread (bidLevels/askLevels and a null orderBook) plus unit scaling. Combined with annotations covering safety and openness, nothing needed to call this tool correctly is 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 nonetheless adds meaning by clarifying that slug corresponds to the same outcome pm_data_price_history reads, that outcomeExternalMarketId selects the venue market id of another outcome, and that depth controls how many levels are kept per side ('cut to its best depth levels as served') with full counts in bidLevels/askLevels.

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 states a specific verb and resource ('live order book for one outcome of an event') and immediately scopes it against siblings, noting it is the same outcome pm_data_price_history reads and that pm_quote is the executable-quote alternative. An agent can distinguish it from pm_data_price_history, pm_quote, and pm_data_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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit alternatives and conditions are given: 'use pm_quote for that' for executable quotes, and pm_data_price_history / pm_data_event are named as the sources for the outcome identifiers. It also bounds applicability ('Polymarket and Kalshi only') and states prerequisites ('No API key required'), so the when-to-use decision is fully specified.

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