Skip to main content
Glama

Polymarket Resolution Lookup

pm_resolution_lookup

Retrieve resolution source and criteria for any Polymarket market. Displays oracle, rules, data sources, and expected timeline.

Instructions

Look up the resolution source and criteria for a Polymarket market. Shows the oracle, resolution rules, data sources, and expected resolution timeline. Cost: $0.02 per query. Source: Polymarket resolution tracking.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
market_idNoMarket ID to look up
queryNoSearch markets by title/description
limitNoMaximum results (default 25)

Implementation Reference

  • Zod schema defining the three optional input parameters: market_id, query, and limit (1-100, default 25).
      inputSchema: {
        market_id: z
          .string()
          .optional()
          .describe("Market ID to look up"),
        query: z
          .string()
          .optional()
          .describe("Search markets by title/description"),
        limit: z
          .number()
          .int()
          .min(1)
          .max(100)
          .optional()
          .describe("Maximum results (default 25)"),
      },
    },
  • Handler that calls the Verilex API endpoint /api/v1/pm/resolution/lookup with market_id, q (query), and limit parameters, then returns the JSON results with a summary.
      async ({ market_id, query, limit }) => {
        const res = await apiGet<PmResolutionQueryResponse>(
          "/api/v1/pm/resolution/lookup",
          {
            market_id,
            q: query,
            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} resolution record(s).`;
        const json = JSON.stringify(data, null, 2);
    
        return {
          content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
        };
      },
    );
  • Registers the 'pm_resolution_lookup' tool on the MCP server with title, description, input schema, and handler.
    server.registerTool(
      "pm_resolution_lookup",
      {
        title: "Polymarket Resolution Lookup",
        description:
          "Look up the resolution source and criteria for a Polymarket market. Shows the " +
          "oracle, resolution rules, data sources, and expected resolution timeline. " +
          "Cost: $0.02 per query. Source: Polymarket resolution tracking.",
        inputSchema: {
          market_id: z
            .string()
            .optional()
            .describe("Market ID to look up"),
          query: z
            .string()
            .optional()
            .describe("Search markets by title/description"),
          limit: z
            .number()
            .int()
            .min(1)
            .max(100)
            .optional()
            .describe("Maximum results (default 25)"),
        },
      },
      async ({ market_id, query, limit }) => {
        const res = await apiGet<PmResolutionQueryResponse>(
          "/api/v1/pm/resolution/lookup",
          {
            market_id,
            q: query,
            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} resolution record(s).`;
        const json = JSON.stringify(data, null, 2);
    
        return {
          content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
        };
      },
    );
  • src/index.ts:56-56 (registration)
    Top-level registration call that wires the pm_resolution tools into the MCP server.
    registerPmResolutionTools(server);
  • Helper function that generates a staleness warning string used by the handler when data may be stale.
    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";
    }
Behavior4/5

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

No annotations are present, so the description bears full responsibility. It discloses a key behavioral trait: 'Cost: $0.02 per query,' which is valuable for agent planning. The verb 'look up' implies a read-only operation, but this could be more explicit. Overall, it provides useful transparency beyond just functionality.

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 concise (3 sentences) and front-loaded with the primary action. It efficiently conveys purpose, outputs, cost, and source without unnecessary words. Slightly more structure could improve readability, but it is well within acceptable bounds.

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 lack of an output schema, the description compensates by listing the types of information returned (oracle, rules, sources, timeline). It also covers cost and source. However, it does not address error scenarios or pagination behavior related to the 'limit' parameter, leaving a minor gap in completeness.

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?

With 100% schema coverage, the parameters are already described in the schema. The description does not add further semantic detail about how the parameters interact (e.g., whether market_id and query are alternatives) or provide examples. It stays at the baseline.

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 the tool's function: 'Look up the resolution source and criteria for a Polymarket market.' It specifies concrete outputs (oracle, rules, data sources, timeline) and includes cost and source, distinguishing it from sibling tools like pm_changes 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 Guidelines3/5

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

The description implies usage for viewing resolution details but does not explicitly state when to use this tool versus alternatives (e.g., pm_resolution_calendar or pm_resolution_stats). No 'when not to use' guidance is 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