Skip to main content
Glama
OKX Market Guard

OKX Market Guard

by mavis-codee

Market candles

market_candles
Read-onlyIdempotent

Retrieve recent OKX public candlestick (OHLCV) data for one instrument to analyze price movement and volatility. Supports interval, pagination, and limit controls for read-only market research.

Instructions

Get recent OKX public candlesticks (OHLCV) for one instrument. READ-ONLY: this tool only calls OKX public market REST. No API key, no order, no account access. Returns newest-first, same as OKX. bar examples: 1m, 5m, 1H, 1D.

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": {
      "instId": "<instId>"
    },
    "name": "market_candles"
  }
}

Input Schema

NameRequiredDescriptionDefault
barNoCandle interval. Default 1H.
afterNoPagination: return records newer than this ms timestamp.
limitNoNumber of candles, 1-300. Default 100.
beforeNoPagination: return records older than this ms timestamp.
instIdYesOKX instrument ID, e.g. BTC-USDT.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

The annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, so the safety profile is covered. The description still adds real value beyond them: it confirms only the OKX public market REST endpoint is hit, that no API key or account access is needed, and that results are newest-first like OKX. Rate limits and pagination behavior across before/after are not described, which keeps it at 4.

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?

Three short sentences, front-loaded with the purpose and the safety constraint, with no filler. The trailing bar examples partially duplicate the schema enum and 'same as OKX' is a slightly loose shorthand, but neither is costly.

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?

Five parameters with one required, full schema coverage, and no output schema, so the description is not obligated to explain returns. It covers scope, auth, and ordering, which are the main ambiguities. It could still say how before/after interact or mention result caps, but nothing essential to a correct call is missing.

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 description coverage is 100%, so every parameter, including the bar enum and the before/after pagination fields, is already documented in structured form. The description only restates a few bar values that the enum already enumerates and mentions single-instrument scope, adding little new parameter meaning. The baseline 3 applies when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The definition states a specific verb and resource: 'Get recent OKX public candlesticks (OHLCV) for one instrument.' That is concrete enough to separate it from market_ticker, funding_rate, and oi_summary by subject matter alone. It stops short of an explicit sibling comparison, so it lands at 4 rather than 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Usage context is implied: it is the tool for OHLCV history on a single instrument, and 'for one instrument' signals that instId is mandatory. There is no sentence saying when to prefer this over market_ticker, or when to choose another interval or paginate instead, so guidance stays at the implied level.

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