Skip to main content
Glama

get_market_history

Retrieve price history data for prediction markets on Kalshi or Polymarket over specified time periods to analyze market trends and support trading decisions.

Instructions

Get price history for a prediction market over a configurable period.

Args: platform: Platform: "kalshi" or "polymarket". market_id: Platform-specific market identifier. period: History window: "48h", "7d", or "30d". max_points: Maximum data points to return.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
platformYes
market_idYes
periodNo7d
max_pointsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The get_market_history tool implementation, which acts as a handler for the MCP tool and calls the internal _request helper.
    async def get_market_history(
        platform: str, market_id: str, period: str = "7d", max_points: int = 48
    ) -> str:
        """Get price history for a prediction market over a configurable period.
    
        Args:
            platform: Platform: "kalshi" or "polymarket".
            market_id: Platform-specific market identifier.
            period: History window: "48h", "7d", or "30d".
            max_points: Maximum data points to return.
        """
        return await _request(
            "GET",
            f"/v1/markets/{platform}/{market_id}/history",
            params={"period": period, "max_points": max_points},
        )
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal safety or operational context. It does not indicate whether this is a read-only operation (though implied by 'Get'), mention rate limits, caching behavior, data freshness, or error conditions for invalid market_ids.

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 description is appropriately sized with zero wasted words. It is front-loaded with the core purpose statement, followed by a structured Args block that efficiently conveys parameter details. The format is slightly unconventional for MCP (using an 'Args:' section) but remains clear and scannable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the existence of an output schema, the description appropriately avoids duplicating return value documentation. However, it lacks any mention of the output structure (e.g., that it returns time-series data points) or error handling patterns, leaving gaps for a tool with four parameters and complex data retrieval behavior.

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?

Despite 0% schema description coverage, the description compensates effectively by documenting all four parameters in the Args block. It adds crucial semantic constraints not present in the schema, specifically enumerating valid values for 'platform' ('kalshi'/'polymarket') and 'period' ('48h'/'7d'/'30d'), and clarifies the purpose of 'market_id' and 'max_points'.

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 description clearly states the tool retrieves 'price history for a prediction market' with a 'configurable period,' providing a specific verb and resource. However, it does not explicitly differentiate from sibling 'get_market' (which likely fetches current state), leaving implicit the distinction that this tool is for historical time-series data.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'get_market' (current snapshot) or 'search_markets' (discovery). There are no prerequisites, exclusions, or 'see also' references to help the agent select the correct tool for historical analysis tasks.

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/Rekko-AI/rekko-mcp'

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