Skip to main content
Glama
pmxt-dev

pmxt-mcp

Official
by pmxt-dev

loadMarkets

Idempotent

Load and cache all markets from an exchange into a stable snapshot, enabling drift-free local pagination and iteration.

Instructions

Load and cache all markets from the exchange into this.markets and this.marketsBySlug. Subsequent calls return the cached result without hitting the API again. This is the correct way to paginate or iterate over markets without drift. Because fetchMarkets() always hits the API, repeated calls with different offset values may return inconsistent results if the exchange reorders or adds markets between requests. Use loadMarkets() once to get a stable snapshot, then paginate over Object.values(exchange.markets) locally.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exchangeYesThe prediction market exchange to target.
reloadNo
credentialsNoVenue credentials (privateKey, apiKey, etc.). Only needed for authenticated operations like trading.
verboseNoReturn full uncompacted response. Default false returns a compact, agent-friendly summary.
Behavior5/5

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

Discloses caching behavior (subsequent calls return cached result without API hit) and explains drift avoidance. Annotations (`idempotentHint: true`, `readOnlyHint: false`) are consistent; description adds context about internal state modification and idempotency.

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?

Multiple sentences, front-loaded with the core action. Every sentence contributes value, though could be slightly more concise. Well-structured with clear contrast to `fetchMarkets`.

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?

Given 4 parameters and no output schema, the description covers caching, drift, usage pattern, and return compression. Lacks explicit mention of return object shape (though implied by caching), but the verbose flag detail fills part of the gap.

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 75%, and the description adds context for the `reload` parameter implicitly by discussing caching behavior. However, no explicit param-level details beyond the schema; still adds value by explaining how the tool interacts with parameters like `verbose`.

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 clearly states the tool loads and caches all markets from the exchange into internal data structures. It uses specific verbs ('load and cache') and resource ('all markets'), and distinguishes from siblings like `fetchMarkets` which hits the API repeatedly.

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?

Explicitly describes when to use (`loadMarkets` once for a stable snapshot) and contrasts with `fetchMarkets()` which can cause drift. It provides actionable guidance: paginate over `Object.values(exchange.markets)` locally.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pmxt-dev/pmxt-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server