Skip to main content
Glama
yigitabi5444

Polymarket MCP Server

by yigitabi5444

get_series

Retrieve grouped collections of related prediction market events from Polymarket. Use this tool to browse event series with pagination controls for limit and offset.

Instructions

List Polymarket event series (grouped collections of related events).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of results
offsetNoPagination offset

Implementation Reference

  • The handler for the "get_series" tool, which invokes the Gamma API to list event series.
    async (args) => {
      try {
        const data = await gamma.getSeries(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 and schema definition for the "get_series" tool.
    server.tool(
      "get_series",
      "List Polymarket event series (grouped collections of related events).",
      {
        limit: z.number().min(1).max(100).default(20).describe("Number of results"),
        offset: z.number().min(0).default(0).describe("Pagination offset"),
      },
  • The API client method that performs the actual network request for getting series.
    async getSeries(params?: {
      limit?: number;
      offset?: number;
    }): Promise<GammaSeries[]> {
      const query: Record<string, string | undefined> = {};
      if (params?.limit !== undefined) query.limit = String(params.limit);
      if (params?.offset !== undefined) query.offset = String(params.offset);
      return this.client.gamma<GammaSeries[]>("/series", query);
    }

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