Skip to main content
Glama
bmorphism

Manifold Markets MCP Server

get_market

Retrieve detailed information about a specific prediction market on the Manifold Markets platform using its unique market ID.

Instructions

Get detailed information about a specific market

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
marketIdYesMarket ID

Implementation Reference

  • Handler for 'get_market' tool: parses input with GetMarketSchema, fetches market details from Manifold Markets API (/v0/market/{marketId}), handles errors, and returns the market data as JSON string.
    case 'get_market': {
      const { marketId } = GetMarketSchema.parse(args);
      const response = await fetch(`${API_BASE}/v0/market/${marketId}`, {
        headers: { Accept: 'application/json' },
      });
    
      if (!response.ok) {
        throw new McpError(
          ErrorCode.InternalError,
          `Manifold API error: ${response.statusText}`
        );
      }
    
      const market = await response.json();
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(market, null, 2),
          },
        ],
      };
    }
  • Zod schema defining input for get_market: requires 'marketId' string.
    const GetMarketSchema = z.object({
      marketId: z.string(),
    });
  • src/index.ts:227-237 (registration)
    Tool registration in listTools: defines name 'get_market', description, and inputSchema matching the Zod schema.
    {
      name: 'get_market',
      description: 'Get detailed information about a specific market',
      inputSchema: {
        type: 'object',
        properties: {
          marketId: { type: 'string', description: 'Market ID' },
        },
        required: ['marketId'],
      },
    },

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/bmorphism/manifold-mcp-server'

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