Skip to main content
Glama
yigitabi5444

Polymarket MCP Server

by yigitabi5444

get_series_by_id

Retrieve a specific Polymarket event series by ID to access all related prediction market events and their details.

Instructions

Get a specific Polymarket event series by ID, including all events in the series.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesSeries ID

Implementation Reference

  • The implementation of the logic to fetch a series by ID from the API client.
    async getSeriesById(id: string): Promise<GammaSeries> {
      return this.client.gamma<GammaSeries>(`/series/${id}`);
    }
  • The registration and tool handler function for "get_series_by_id" using the GammaApi service.
    server.tool(
      "get_series_by_id",
      "Get a specific Polymarket event series by ID, including all events in the series.",
      {
        id: z.string().describe("Series ID"),
      },
      async (args) => {
        try {
          const data = await gamma.getSeriesById(args.id);
          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