Skip to main content
Glama

Polymarket Dataset Statistics

pm_stats

Retrieve Polymarket dataset statistics: total markets, wallets tracked, volume, and last updated timestamp. Free endpoint.

Instructions

Get statistics about the Polymarket dataset: total markets, wallets tracked, volume, and last updated timestamp. Free endpoint.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'pm_stats' tool. Calls apiGet to fetch stats from '/api/v1/pm/stats' and returns the JSON response.
    server.registerTool(
      "pm_stats",
      {
        title: "Polymarket Dataset Statistics",
        description:
          "Get statistics about the Polymarket dataset: total markets, wallets tracked, " +
          "volume, and last updated timestamp. Free endpoint.",
        inputSchema: {},
      },
      async () => {
        const res = await apiGet<PmStatsResponse>("/api/v1/pm/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) },
          ],
        };
      },
    );
  • Input/output schema for pm_stats. No input parameters (empty inputSchema). Response type defined by PmStatsResponse interface (dataset, source, update_frequency, stats).
    {
      title: "Polymarket Dataset Statistics",
      description:
        "Get statistics about the Polymarket dataset: total markets, wallets tracked, " +
        "volume, and last updated timestamp. Free endpoint.",
      inputSchema: {},
  • PmStatsResponse interface defining the shape of the stats response (dataset, source, update_frequency, stats).
    interface PmStatsResponse {
      dataset: string;
      source: string;
      update_frequency: string;
      stats: Record<string, unknown>;
    }
  • Registration of 'pm_stats' tool via server.registerTool with description stating it's a free endpoint.
      // ── Dataset stats ─────────────────────────────────────────────────────
    
      server.registerTool(
        "pm_stats",
        {
          title: "Polymarket Dataset Statistics",
          description:
            "Get statistics about the Polymarket dataset: total markets, wallets tracked, " +
            "volume, and last updated timestamp. Free endpoint.",
          inputSchema: {},
        },
        async () => {
          const res = await apiGet<PmStatsResponse>("/api/v1/pm/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 apiGet helper function used by the pm_stats handler to make HTTP GET requests to the Verilex API.
    export async function apiGet<T = unknown>(
      path: string,
      params?: Record<string, string | number | undefined>,
    ): Promise<ApiResponse<T>> {
      const url = buildUrl(path, params);
    
      const headers: Record<string, string> = {
Behavior3/5

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

With no annotations, the description must convey all behavioral traits. It notes 'Free endpoint' and lists output fields, but omits details like authentication requirements, data freshness, or latency. Basic transparency is provided but incomplete.

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?

The description is a single, front-loaded sentence with no superfluous words. Every element earns its place by defining the tool's purpose and key outputs.

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 the tool's simplicity (no parameters, no output schema), the description adequately covers what it returns and that it is free. It could briefly contrast with sibling tools, but for an aggregate stats endpoint, it is sufficiently complete.

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?

There are no parameters, so the schema coverage is 100%. The description adds value by specifying exactly what statistics are included (markets, wallets, volume, timestamp), which the empty schema does not convey.

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 'Get statistics about the Polymarket dataset' and lists specific metrics (total markets, wallets tracked, volume, last updated). This distinguishes it from sibling tools like pm_changes or pm_micro_stats, which focus on changes or micro data.

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?

No explicit guidance on when to use this tool versus alternatives. The description implies it is for aggregate overviews, but does not mention when not to use it or provide comparisons to related tools.

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