Skip to main content
Glama
yigitabi5444

Polymarket MCP Server

by yigitabi5444

get_clob_market

Retrieve detailed trading parameters for a specific Polymarket prediction market, including token information, reward structures, tick sizes, and order book configurations using the condition ID.

Instructions

Get CLOB-specific market details by condition ID. Returns tokens, rewards, tick sizes, and trading parameters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
condition_idYesMarket condition ID

Implementation Reference

  • The handler function for the "get_clob_market" tool, which calls the clob API.
    async (args) => {
      try {
        const data = await clob.getMarket(args.condition_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,
        };
      }
    },
  • Registration of the "get_clob_market" tool using the MCP server.
    server.tool(
      "get_clob_market",
      "Get CLOB-specific market details by condition ID. Returns tokens, rewards, tick sizes, and trading parameters.",
      {
        condition_id: z.string().describe("Market condition ID"),
      },
      async (args) => {
        try {
          const data = await clob.getMarket(args.condition_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,
          };
        }
      },
    );
  • The underlying API client call for "get_clob_market".
    async getMarket(conditionId: string): Promise<ClobMarket> {
      return this.client.clob<ClobMarket>(`/markets/${conditionId}`);
    }

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