Skip to main content
Glama

Polymarket Resolution Calendar

pm_resolution_calendar

Retrieve upcoming Polymarket resolution events with dates, sources, and prices. Set a lookahead period and result limit to track market resolutions.

Instructions

Get upcoming market resolution events. Shows markets expected to resolve within a given timeframe with resolution dates, sources, and current prices. Cost: $0.02 per query. Source: Polymarket resolution tracking.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoNumber of days to look ahead (default 7)
limitNoMaximum results (default 25)

Implementation Reference

  • The async handler function for the pm_resolution_calendar tool. It calls the API endpoint /api/v1/pm/resolution/calendar with days and limit parameters, then formats the response.
      async ({ days, limit }) => {
        const res = await apiGet<PmResolutionQueryResponse>(
          "/api/v1/pm/resolution/calendar",
          {
            days: days ?? 7,
            limit: limit ?? 25,
          },
        );
    
        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} upcoming resolution event(s).`;
        const json = JSON.stringify(data, null, 2);
    
        return {
          content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
        };
      },
    );
  • Input schema for pm_resolution_calendar: optional 'days' (1-90, default 7) and 'limit' (1-100, default 25) parameters.
    inputSchema: {
      days: z
        .number()
        .int()
        .min(1)
        .max(90)
        .optional()
        .describe("Number of days to look ahead (default 7)"),
      limit: z
        .number()
        .int()
        .min(1)
        .max(100)
        .optional()
        .describe("Maximum results (default 25)"),
    },
  • Registration of the tool 'pm_resolution_calendar' on the MCP server via server.registerTool(), including title, description, inputSchema, and the async handler.
    server.registerTool(
      "pm_resolution_calendar",
      {
        title: "Polymarket Resolution Calendar",
        description:
          "Get upcoming market resolution events. Shows markets expected to resolve " +
          "within a given timeframe with resolution dates, sources, and current prices. " +
          "Cost: $0.02 per query. Source: Polymarket resolution tracking.",
        inputSchema: {
          days: z
            .number()
            .int()
            .min(1)
            .max(90)
            .optional()
            .describe("Number of days to look ahead (default 7)"),
          limit: z
            .number()
            .int()
            .min(1)
            .max(100)
            .optional()
            .describe("Maximum results (default 25)"),
        },
      },
      async ({ days, limit }) => {
        const res = await apiGet<PmResolutionQueryResponse>(
          "/api/v1/pm/resolution/calendar",
          {
            days: days ?? 7,
            limit: limit ?? 25,
          },
        );
    
        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} upcoming resolution event(s).`;
        const json = JSON.stringify(data, null, 2);
    
        return {
          content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
        };
      },
    );
  • src/index.ts:29-56 (registration)
    Import and invocation of registerPmResolutionTools(server) which registers all resolution tools including pm_resolution_calendar.
    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);
      registerPmArbTools(server);
      registerPmResolutionTools(server);
  • The apiGet helper function used by the 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,
      };
    }
Behavior4/5

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

With no annotations, the description carries the burden. It discloses cost ($0.02 per query) and source, adding transparency beyond mere purpose. However, it does not mention authentication or rate limits, but for a simple read tool this is adequate.

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?

Two concise sentences plus cost and source. Front-loaded with the action verb 'Get'. Every sentence adds value with no redundancy.

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?

For a simple two-parameter tool with no output schema, the description adequately explains the return fields (resolution dates, sources, prices). It covers purpose, cost, and source, leaving few gaps given the tool's low complexity.

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?

Input schema covers 100% of parameters with descriptions. The description adds minimal extra meaning, only associating 'days' with 'within a given timeframe'. Baseline 3 applies as schema does the heavy lifting.

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 upcoming market resolution events' and specifies the output includes resolution dates, sources, and current prices. It distinguishes from sibling tools like pm_resolution_lookup and pm_resolution_stats by focusing on upcoming events within a timeframe.

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?

The description implies usage for viewing upcoming resolutions but does not explicitly state when to use this tool versus alternatives or when not to use it. The context is clear, but no exclusions or alternative references are provided.

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