Skip to main content
Glama
yigitabi5444

Polymarket MCP Server

by yigitabi5444

get_events

List and filter Polymarket prediction events with pagination, sorting, and status/tag filtering to analyze market data.

Instructions

List and filter Polymarket prediction events. Supports pagination, sorting, and filtering by status/tag.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of results to return
offsetNoPagination offset
orderNoSort field: volume, liquidity, startDate, endDate, createdAt
ascendingNoSort ascending (default: false)
slugNoFilter by event slug
tagNoFilter by tag label
closedNoFilter by closed status
activeNoFilter by active status

Implementation Reference

  • Tool handler implementation for 'get_events' in src/tools/gamma/events.ts, which calls the underlying GammaApi.getEvents method.
    async (args) => {
      try {
        const data = await gamma.getEvents(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,
        };
      }
    },
  • Registration of 'get_events' tool including Zod schema validation in src/tools/gamma/events.ts.
    server.tool(
      "get_events",
      "List and filter Polymarket prediction events. Supports pagination, sorting, and filtering by status/tag.",
      {
        limit: z.number().min(1).max(100).default(20).describe("Number of results to return"),
        offset: z.number().min(0).default(0).describe("Pagination offset"),
        order: z
          .string()
          .optional()
          .describe("Sort field: volume, liquidity, startDate, endDate, createdAt"),
        ascending: z.boolean().optional().describe("Sort ascending (default: false)"),
        slug: z.string().optional().describe("Filter by event slug"),
        tag: z.string().optional().describe("Filter by tag label"),
        closed: z.boolean().optional().describe("Filter by closed status"),
        active: z.boolean().optional().describe("Filter by active status"),
      },
  • The underlying GammaApi method 'getEvents' that executes the request logic for the 'get_events' tool.
    async getEvents(params?: {
      limit?: number;
      offset?: number;
      order?: string;
      ascending?: boolean;
      slug?: string;
      tag?: string;
      closed?: boolean;
      active?: boolean;
      archived?: boolean;
    }): Promise<GammaEvent[]> {
      const query: Record<string, string | undefined> = {};
      if (params?.limit !== undefined) query.limit = String(params.limit);
      if (params?.offset !== undefined) query.offset = String(params.offset);
      if (params?.order) query.order = params.order;
      if (params?.ascending !== undefined) query.ascending = String(params.ascending);
      if (params?.slug) query.slug = params.slug;
      if (params?.tag) query.tag = params.tag;
      if (params?.closed !== undefined) query.closed = String(params.closed);
      if (params?.active !== undefined) query.active = String(params.active);
      if (params?.archived !== undefined) query.archived = String(params.archived);
      return this.client.gamma<GammaEvent[]>("/events", query);
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'Supports pagination, sorting, and filtering by status/tag,' which gives some behavioral context, but doesn't cover important aspects like rate limits, authentication requirements, error behavior, or what the output looks like. For a read operation with 8 parameters, this is insufficient disclosure.

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 extremely concise (one sentence) and front-loaded with the core purpose. Every word earns its place—there's no fluff or redundancy. It efficiently communicates the tool's capabilities in minimal space.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (8 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain what an 'event' is in this context, what the return format looks like, or any prerequisites for use. For a tool with rich filtering capabilities and many sibling alternatives, more context is needed to guide proper usage.

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%, so the schema already fully documents all 8 parameters. The description adds minimal value beyond the schema by mentioning filtering by 'status/tag' (which maps to 'closed', 'active', and 'tag' parameters) and 'pagination' (which maps to 'limit' and 'offset'), but doesn't provide additional semantic context. Baseline 3 is appropriate when schema does the heavy lifting.

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's purpose: 'List and filter Polymarket prediction events.' It specifies the resource (events) and the action (list and filter). However, it doesn't explicitly differentiate this tool from its many siblings (like 'get_markets', 'search', or 'get_event'), which would require a 5.

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?

The description provides no guidance on when to use this tool versus alternatives. With 18 sibling tools including 'get_markets', 'search', and 'get_event', there's no indication of which scenarios call for this specific event-listing tool over others. It mentions capabilities but not context.

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

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