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
| Name | Required | Description | Default |
|---|---|---|---|
| marketId | Yes | Market ID |
Implementation Reference
- src/index.ts:560-582 (handler)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), }, ], }; }
- src/index.ts:65-67 (schema)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'], }, },