Skip to main content
Glama

get_orderbook

Read-only

Fetch displayed YES and NO order books as [price, size] levels, best first, to gauge basket fill near the quoted price before paper_order.

Instructions

Get the displayed order book for YES and NO as [price, size] levels, best first.

Prices are dollars per contract and sizes are contracts. Use it to see how
much of a basket can fill near the quoted price before paper_order; use
get_quote when only the top of book matters. Kalshi publishes bids only, so
each side's asks are derived from the other side's bids (a YES ask of p is a
NO bid of 1 - p). Public data, no API key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthNoPrice levels per side, 1-50 (clamped). Default 10.
venueYesVenue: 'kalshi' or 'polymarket'.
market_idYesKalshi market ticker (e.g. KXFEDDECISION-28JAN-H0) or Polymarket market id (e.g. 2589812), as returned by search_markets.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.2.2
    • addedInput schema / properties / depth / description
      Added value: +"Price levels per side, 1-50 (clamped). Default 10."
    • addedInput schema / properties / market_id / description
      Added value: +"Kalshi market ticker (e.g. KXFEDDECISION-28JAN-H0) or Polymarket market id (e.g. 2589812), as returned by search_markets."
    • addedInput schema / properties / venue / description
      Added value: +"Venue: 'kalshi' or 'polymarket'."
  2. First observedv1.2.1

TDQS

A4.9/5.0
Behavior5/5

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

Annotations declare readOnlyHint and openWorldHint, but the description adds behavior the annotations cannot convey: Kalshi publishes bids only so asks are derived from the other side's bids (with the 1 - p formula), plus 'public data, no API key' authentication context and price/size units. This is substantive domain-specific disclosure.

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 tight sentences, front-loaded with purpose and output format, then usage routing, then pricing/data-source caveats. Every sentence adds distinct information with no 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 present, return values need not be re-explained, and the description still supplies the venue-specific quoting quirk, units, and auth status. An agent has everything needed to call and interpret this correctly.

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, but the description adds unit semantics the schema omits: prices are dollars per contract and sizes are contracts, and level ordering is best-first. It does not restate the depth range or venue enum, which the schema already covers.

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 displayed order book for YES and NO') and specifies the output shape ('[price, size] levels, best first'), which immediately separates it from siblings like get_quote and get_market.

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?

It states the concrete use case ('see how much of a basket can fill near the quoted price before paper_order') and names the alternative with its selecting condition ('use get_quote when only the top of book matters'). The when-to-use and when-not-to-use are both explicit.

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