Skip to main content
Glama

Polymarket Microstructure Statistics

pm_micro_stats

Retrieve key statistics from the Polymarket microstructure dataset including total markets analyzed, average spread, thin book count, and last updated timestamp. Free endpoint.

Instructions

Get statistics about the Polymarket microstructure dataset: total markets analyzed, average spread, thin book count, and last updated. Free endpoint.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool 'pm_micro_stats' is registered via server.registerTool with name 'pm_micro_stats', title 'Polymarket Microstructure Statistics', and an empty input schema. The handler calls apiGet<PmMicroStatsResponse>('/api/v1/pm/micro/stats') and returns the JSON result.
    // ── Dataset stats ─────────────────────────────────────────────────────
    
    server.registerTool(
      "pm_micro_stats",
      {
        title: "Polymarket Microstructure Statistics",
        description:
          "Get statistics about the Polymarket microstructure dataset: total markets analyzed, " +
          "average spread, thin book count, and last updated. Free endpoint.",
        inputSchema: {},
      },
      async () => {
        const res = await apiGet<PmMicroStatsResponse>("/api/v1/pm/micro/stats");
    
        if (!res.ok) {
          return {
            content: [
              {
                type: "text" as const,
                text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
              },
            ],
            isError: true,
          };
        }
    
        return {
          content: [
            { type: "text" as const, text: JSON.stringify(res.data, null, 2) },
          ],
        };
      },
    );
  • The async handler function for pm_micro_stats that fetches dataset statistics from the Verilex API endpoint /api/v1/pm/micro/stats. It has no input parameters (empty inputSchema). On success, it returns the stats JSON; on error, it returns an error response.
    server.registerTool(
      "pm_micro_stats",
      {
        title: "Polymarket Microstructure Statistics",
        description:
          "Get statistics about the Polymarket microstructure dataset: total markets analyzed, " +
          "average spread, thin book count, and last updated. Free endpoint.",
        inputSchema: {},
      },
      async () => {
        const res = await apiGet<PmMicroStatsResponse>("/api/v1/pm/micro/stats");
    
        if (!res.ok) {
          return {
            content: [
              {
                type: "text" as const,
                text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
              },
            ],
            isError: true,
          };
        }
    
        return {
          content: [
            { type: "text" as const, text: JSON.stringify(res.data, null, 2) },
          ],
        };
      },
  • The PmMicroStatsResponse interface defines the shape of the API response: dataset (string), source (string), update_frequency (string), and stats (Record<string, unknown>).
    interface PmMicroStatsResponse {
      dataset: string;
      source: string;
      update_frequency: string;
      stats: Record<string, unknown>;
    }
  • src/index.ts:31-31 (registration)
    Import of registerPmMicroTools from './tools/pm_micro.js' in the main server entry point.
    import { registerPmMicroTools } from "./tools/pm_micro.js";
  • src/index.ts:58-58 (registration)
    Registration call: registerPmMicroTools(server) invoked in createMcpServer() to wire up all pm_micro tools including pm_micro_stats.
    registerPmMicroTools(server);
Behavior4/5

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

No annotations provided, so the description carries the burden. It correctly indicates a read-only query and includes a 'Free endpoint' disclosure. However, it does not specify rate limits, data freshness, or other behavioral details.

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?

Single sentence plus a brief note. Front-loaded with key information, no filler. Extremely efficient.

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?

Given zero parameters and no output schema, the description sufficiently explains the tool's output and free status. Complete for a statistics endpoint.

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?

Input schema is empty (0 parameters, 100% coverage), so baseline is 3. The description adds value by enumerating output statistics, compensating for the lack of output schema. Provides meaningful context beyond schema.

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?

Description clearly states it retrieves statistics about the Polymarket microstructure dataset, listing specific metrics (total markets analyzed, average spread, thin book count, last updated). This distinctively separates it from sibling tools like pm_micro_depth or pm_stats.

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?

The description implies usage context for aggregated stats, but lacks explicit guidance on when to use vs. alternatives like pm_micro_depth or pm_micro_thin. The 'Free endpoint' note adds value but does not fully address comparative selection.

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/carrierone/verilexdata-mcp'

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