Skip to main content
Glama

Polymarket Changes

pm_changes

Track recent Polymarket data changes since a given timestamp. Query on-chain Polymarket updates with a specified start time.

Instructions

Get recent changes to Polymarket data since a given timestamp. Cost: $0.01 per query. Source: Polymarket on-chain data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sinceYesISO 8601 timestamp to get changes since (e.g. 2026-03-01T00:00:00Z)
limitNoMaximum results (default 50)

Implementation Reference

  • The handler function for the 'pm_changes' tool. It calls the API at '/api/v1/pm/changes' with 'since' (ISO 8601 timestamp) and optional 'limit' parameters, then returns the count and data. This is both the handler and the schema definition since the tool is registered inline via server.registerTool.
    server.registerTool(
      "pm_changes",
      {
        title: "Polymarket Changes",
        description:
          "Get recent changes to Polymarket data since a given timestamp. " +
          "Cost: $0.01 per query. Source: Polymarket on-chain data.",
        inputSchema: {
          since: z
            .string()
            .describe("ISO 8601 timestamp to get changes since (e.g. 2026-03-01T00:00:00Z)"),
          limit: z
            .number()
            .int()
            .min(1)
            .max(100)
            .optional()
            .describe("Maximum results (default 50)"),
        },
      },
      async ({ since, limit }) => {
        const res = await apiGet<PmQueryResponse>("/api/v1/pm/changes", {
          since,
          limit: limit ?? 50,
        });
    
        if (!res.ok) {
          return {
            content: [
              {
                type: "text" as const,
                text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
              },
            ],
            isError: true,
          };
        }
    
        const { count, data } = res.data;
        const warn = stalenessWarning(res);
        const summary = `${warn}Found ${count} Polymarket change(s) since ${since}.`;
        const json = JSON.stringify(data, null, 2);
    
        return {
          content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
        };
      },
    );
  • The input schema for 'pm_changes', defined inline with Zod: 'since' (required ISO 8601 string) and 'limit' (optional number, 1-100, default 50).
    inputSchema: {
      since: z
        .string()
        .describe("ISO 8601 timestamp to get changes since (e.g. 2026-03-01T00:00:00Z)"),
      limit: z
        .number()
        .int()
        .min(1)
        .max(100)
        .optional()
        .describe("Maximum results (default 50)"),
    },
  • src/index.ts:29-54 (registration)
    The export and registration of the registerPmTools function which registers all Polymarket tools including 'pm_changes' on the MCP server.
    import { registerPmResolutionTools } from "./tools/pm_resolution.js";
    import { registerEconTools } from "./tools/econ.js";
    import { registerPmMicroTools } from "./tools/pm_micro.js";
    
    function createMcpServer() {
      const server = new McpServer({
        name: "verilex-data",
        version: "0.3.3",
      });
    
      registerNpiTools(server);
      registerSecTools(server);
      registerPacerTools(server);
      registerWeatherTools(server);
      registerOtcTools(server);
      registerTrademarkTools(server);
      registerPatentTools(server);
      registerCompanyTools(server);
      registerCryptoTools(server);
      registerSanctionsTools(server);
      registerWhaleTools(server);
      registerLabelTools(server);
      registerHolderTools(server);
      registerDexTools(server);
      registerContractTools(server);
      registerPmTools(server);
  • The apiGet helper used by the pm_changes 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> = {
        Accept: "application/json",
        "User-Agent": "verilex-mcp-server/0.1.0",
      };
    
      // Forward x402 payment token if present in env (for paid endpoints)
      const paymentToken = process.env.VERILEX_PAYMENT_TOKEN;
      if (paymentToken) {
        headers["X-Payment-Token"] = paymentToken;
      }
    
      const res = await fetch(url, { headers });
      const data = (await res.json()) as T;
    
      const stale = res.headers.get("X-Data-Stale");
      const lastUpdated = res.headers.get("X-Data-Last-Updated");
      const ageSeconds = res.headers.get("X-Data-Age-Seconds");
    
      return {
        ok: res.ok,
        status: res.status,
        data,
        stale: stale === "true",
        lastUpdated: lastUpdated ?? undefined,
        ageSeconds: ageSeconds ? Number(ageSeconds) : undefined,
      };
    }
  • The stalenessWarning helper used by the pm_changes handler to append stale-data warnings.
    export function stalenessWarning(res: ApiResponse): string {
      if (!res.stale) return "";
      const parts = ["[STALE DATA]"];
      if (res.lastUpdated) parts.push(`Last updated: ${res.lastUpdated}`);
      if (res.ageSeconds != null) parts.push(`Age: ${res.ageSeconds}s`);
      return parts.join(" ") + "\n\n";
    }
Behavior2/5

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

No annotations are supplied, so the description must carry the full burden. It mentions cost ($0.01 per query) and data source (on-chain), but does not disclose read-only nature, rate limits, pagination, or data freshness. A read hint is absent, which is critical for an agent.

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 very concise: three short sentences with clear front-loading of purpose. No extraneous text; every sentence adds value (purpose, cost, source).

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?

The tool is simple (2 parameters, no output schema), so the description covers basic aspects. However, it lacks details on what 'changes' means, output format, and pagination behavior (limit parameter mentioned only in schema). Some gaps remain.

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%, with both parameters described adequately. The description adds minimal extra meaning beyond the schema (e.g., 'since a given timestamp' matches the parameter description). Baseline 3 is appropriate.

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 recent changes to Polymarket data since a timestamp, using a specific verb and resource. However, it does not differentiate this from sibling tools like pm_arb_changes or pm_micro_changes, which also retrieve changes for Polymarket.

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?

No guidance is provided on when to use this tool versus alternatives. The description lacks any 'when to use' or 'when not to use' context, leaving the agent to infer usage from the name alone.

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