Skip to main content
Glama
yigitabi5444

Polymarket MCP Server

by yigitabi5444

get_event

Retrieve detailed information about a specific Polymarket prediction market event using its ID or slug, including all associated markets and current data.

Instructions

Get a single Polymarket event by ID or slug. Returns full event details including nested markets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoEvent ID
slugNoEvent slug

Implementation Reference

  • The MCP tool definition and handler for "get_event".
    server.tool(
      "get_event",
      "Get a single Polymarket event by ID or slug. Returns full event details including nested markets.",
      {
        id: z.string().optional().describe("Event ID"),
        slug: z.string().optional().describe("Event slug"),
      },
      async (args) => {
        if (!args.id && !args.slug) {
          return {
            content: [{ type: "text", text: "Error: Either id or slug is required" }],
            isError: true,
          };
        }
        try {
          const data = await gamma.getEvent(args);
          return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
        } catch (error) {
          return {
            content: [{ type: "text", text: `Error: ${(error as Error).message}` }],
            isError: true,
          };
        }
      },
    );

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/yigitabi5444/yigit_polymarket_mcp'

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