Skip to main content
Glama

Polymarket OHLCV

polymarket_ohlcv
Read-onlyIdempotent

Historical OHLCV candles for ONE Polymarket outcome token, from the recorded L2 tape. token_id is the ERC-1155 outcome token id — a market's condition_id will NOT work here; read the token ids off clob_token_ids from polymarket_market_detail. Prices are probabilities in [0, 1]. Returns bars OLDEST first as {ts (epoch ms, UTC), open, high, low, close, volume, trades}. There is no cursor, so a window wider than limit is truncated at the OLD end — raise from to reach the recent end. With to and no from, limit keeps the bars nearest to (to=X, limit=1 is the last bar at or before X).

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": {
      "token_id": "<token_id>",
      "interval": "<interval>"
    },
    "name": "polymarket_ohlcv"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoEpoch MILLISECONDS, INCLUSIVE upper bound. Omit for no upper bound.
fromNoEpoch MILLISECONDS, inclusive lower bound. Omit for no lower bound.
limitNoMax candles (default 500, hard max 1000).
intervalYesCandle width. Required.
token_idYesERC-1155 outcome token id. Required.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the description's job is the rest of the behavior — and it delivers: ordering (OLDEST first), the absence of a cursor, the fact that truncation happens at the OLD end, price units in [0,1], and the exact returned fields. The limit/`to` interaction ('`to`=X, `limit`=1 is the last bar at or before X') is behavior an agent could not infer anywhere else.

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?

Front-loads the core statement, then sequences the critical gotcha (token_id vs condition_id), then return shape, then the truncation rule. Every sentence carries non-redundant operational information; no filler.

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?

No output schema exists, and the description compensates by naming the exact return shape and units of each field. Combined with paging semantics and the token_id prerequisite, an agent has everything needed to call this correctly on the first attempt.

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 baseline is 3, but the description adds real meaning beyond the schema: `token_id` is an ERC-1155 outcome token id (not condition_id) sourced from clob_token_ids, and `limit`'s meaning changes depending on whether `from`/`to` are supplied. Only `interval` semantics (enum already documented) go unelaborated.

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+resource ('Historical OHLCV candles for ONE Polymarket outcome token') and pins the data source ('recorded L2 tape'), which distinguishes it from polymarket_tape (raw tape), polymarket_orderbook (snapshot depth), and hl_ohlcv (a different venue's candles). An agent can identify the tool without opening the 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 warns that a market's condition_id will NOT work and tells the agent to source token ids from `clob_token_ids` via polymarket_market_detail, plus explains the truncation/paging workaround ('raise `from` to reach the recent end') and the `to`+`limit` combination. There is no explicit statement of when NOT to use this (e.g., versus polymarket_tape for tick-level data), so it falls just short of a 5.

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.