get_market
Retrieve comprehensive details about a specific market on Manifold Markets using its unique market ID to access key information for decision-making.
Instructions
Get detailed information about a specific market
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| marketId | Yes | Market ID |
Input Schema (JSON Schema)
{
"properties": {
"marketId": {
"description": "Market ID",
"type": "string"
}
},
"required": [
"marketId"
],
"type": "object"
}
Implementation Reference
- src/index.ts:560-582 (handler)Handler function for 'get_market' tool that fetches and returns detailed market information from the Manifold Markets API using the provided marketId.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 the input parameters for the get_market tool, requiring a marketId string.const GetMarketSchema = z.object({ marketId: z.string(), });
- src/index.ts:227-237 (registration)Tool registration in the MCP server's listTools response, defining name, description, and inputSchema for get_market.{ name: 'get_market', description: 'Get detailed information about a specific market', inputSchema: { type: 'object', properties: { marketId: { type: 'string', description: 'Market ID' }, }, required: ['marketId'], }, },