Skip to main content
Glama
yigitabi5444

Polymarket MCP Server

by yigitabi5444

get_sports_teams

Retrieve a list of teams for a specified sport on Polymarket to analyze prediction markets and monitor events.

Instructions

List teams for a given sport on Polymarket.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sportNoSport code (e.g. 'nba', 'nfl', 'epl')

Implementation Reference

  • The tool definition and handler for "get_sports_teams" which invokes the GammaApi service.
    server.tool(
      "get_sports_teams",
      "List teams for a given sport on Polymarket.",
      {
        sport: z.string().optional().describe("Sport code (e.g. 'nba', 'nfl', 'epl')"),
      },
      async (args) => {
        try {
          const data = await gamma.getSportsTeams(args.sport);
          return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
        } catch (error) {
          return {
            content: [{ type: "text", text: `Error: ${(error as Error).message}` }],
            isError: true,
          };
        }
      },
    );
  • The actual implementation of the "getSportsTeams" logic that fetches data from the API client.
    async getSportsTeams(sport?: string): Promise<GammaSportsTeam[]> {
      const query: Record<string, string | undefined> = {};
      if (sport) query.sport = sport;
      return this.client.gamma<GammaSportsTeam[]>("/sports/teams", query, CACHE_TTLS.sports);
    }

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