Skip to main content
Glama
PaulieB14

graph-polymarket-mcp

get_market_resolution

Check the UMA oracle resolution status of Polymarket markets. See if a market is initialized, proposed, disputed, or resolved, along with prices and dispute history.

Instructions

Get the UMA oracle resolution status for Polymarket markets. Shows whether a market is initialized, proposed, disputed, or resolved, plus proposed/final prices and dispute history.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
firstNoNumber of markets to return (1-100)
statusNoOptional: filter by resolution status
orderByNoField to sort bylastUpdateTimestamp
orderDirectionNoSort directiondesc

Implementation Reference

  • src/index.ts:722-767 (registration)
    Registration of the 'get_market_resolution' tool using server.registerTool. Defines its description and inputSchema (first, status, orderBy, orderDirection). The handler queries the 'resolution' subgraph (SUBGRAPHS.resolution.ipfsHash) for MarketResolution entities with filtering/sorting.
    // ---------------------------------------------------------------------------
    // Tool 16: get_market_resolution
    // ---------------------------------------------------------------------------
    server.registerTool(
      "get_market_resolution",
      {
        description:
          "Get the UMA oracle resolution status for Polymarket markets. Shows whether a market is initialized, proposed, disputed, or resolved, plus proposed/final prices and dispute history.",
        inputSchema: {
          first: z.number().min(1).max(100).default(10).describe("Number of markets to return (1-100)"),
          status: z
            .enum(["initialized", "proposed", "resolved", "disputed", "challenged", "reproposed"])
            .optional()
            .describe("Optional: filter by resolution status"),
          orderBy: z
            .enum(["lastUpdateTimestamp", "id"])
            .default("lastUpdateTimestamp")
            .describe("Field to sort by"),
          orderDirection: z.enum(["asc", "desc"]).default("desc").describe("Sort direction"),
        },
      },
      async ({ first, status, orderBy, orderDirection }) => {
        try {
          const where = status ? `, where: { status: "${status}" }` : "";
          const query = `{
            marketResolutions(first: ${first}, orderBy: ${orderBy}, orderDirection: ${orderDirection}${where}) {
              id
              status
              flagged
              paused
              wasDisputed
              proposedPrice
              reproposedPrice
              price
              lastUpdateTimestamp
              requestTransactionHash
              resolutionTransactionHash
            }
          }`;
          const data = await querySubgraph(SUBGRAPHS.resolution.ipfsHash, query);
          return textResult(data);
        } catch (error) {
          return errorResult(error);
        }
      }
    );
  • The handler function for get_market_resolution. It executes a GraphQL query against the resolution subgraph, fetching MarketResolution fields (id, status, flagged, paused, wasDisputed, proposedPrice, reproposedPrice, price, lastUpdateTimestamp, requestTransactionHash, resolutionTransactionHash). Supports optional status filter, ordering, and direction.
      async ({ first, status, orderBy, orderDirection }) => {
        try {
          const where = status ? `, where: { status: "${status}" }` : "";
          const query = `{
            marketResolutions(first: ${first}, orderBy: ${orderBy}, orderDirection: ${orderDirection}${where}) {
              id
              status
              flagged
              paused
              wasDisputed
              proposedPrice
              reproposedPrice
              price
              lastUpdateTimestamp
              requestTransactionHash
              resolutionTransactionHash
            }
          }`;
          const data = await querySubgraph(SUBGRAPHS.resolution.ipfsHash, query);
          return textResult(data);
        } catch (error) {
          return errorResult(error);
        }
      }
    );
  • Input schema for get_market_resolution. Defines parameters: 'first' (1-100, default 10), optional 'status' enum (initialized/proposed/resolved/disputed/challenged/reproposed), 'orderBy' (lastUpdateTimestamp or id), and 'orderDirection' (asc/desc).
    server.registerTool(
      "get_market_resolution",
      {
        description:
          "Get the UMA oracle resolution status for Polymarket markets. Shows whether a market is initialized, proposed, disputed, or resolved, plus proposed/final prices and dispute history.",
        inputSchema: {
          first: z.number().min(1).max(100).default(10).describe("Number of markets to return (1-100)"),
          status: z
            .enum(["initialized", "proposed", "resolved", "disputed", "challenged", "reproposed"])
            .optional()
            .describe("Optional: filter by resolution status"),
          orderBy: z
            .enum(["lastUpdateTimestamp", "id"])
            .default("lastUpdateTimestamp")
            .describe("Field to sort by"),
          orderDirection: z.enum(["asc", "desc"]).default("desc").describe("Sort direction"),
        },
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the output fields and statuses, but does not mention that the operation is read-only, side effects, potential errors, or authentication requirements. Additional behavioral context would improve transparency.

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?

A single sentence that efficiently communicates the tool's purpose and output without redundancy. Every word contributes value.

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 no output schema, the description adequately describes the returned information (statuses, prices, dispute history). Omits pagination details but these are captured in the schema. Sufficient for an agent to understand what to expect.

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 and enums. The description adds no new meaning beyond confirming the tool's purpose. Baseline of 3 is appropriate as schema already provides sufficient semantics.

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 specifies the tool retrieves UMA oracle resolution status for Polymarket markets, enumerating the possible statuses (initialized, proposed, disputed, resolved) and data fields (prices, dispute history). This distinguishes it from sibling tools like get_market_data or get_disputed_markets.

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 when resolution information is needed, but does not explicitly state when to use this tool over alternatives like get_market_info or get_disputed_markets. No 'when not to use' or clear usage context 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/PaulieB14/graph-polymarket-mcp'

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