unresolve_market
Reopens a resolved prediction market on Manifold Markets to allow further trading and updates to market outcomes.
Instructions
Unresolve a previously resolved market
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| contractId | Yes | Market ID | |
| answerId | No | Optional. Answer ID for multiple choice markets |
Implementation Reference
- src/index.ts:787-821 (handler)Executes the unresolve_market tool: parses params with UnresolveMarketSchema, requires MANIFOLD_API_KEY, POSTs to Manifold /v0/unresolve endpoint, returns success message.case 'unresolve_market': { const params = UnresolveMarketSchema.parse(args); const apiKey = process.env.MANIFOLD_API_KEY; if (!apiKey) { throw new McpError( ErrorCode.InternalError, 'MANIFOLD_API_KEY environment variable is required' ); } const response = await fetch(`${API_BASE}/v0/unresolve`, { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: `Key ${apiKey}`, }, body: JSON.stringify(params), }); if (!response.ok) { throw new McpError( ErrorCode.InternalError, `Manifold API error: ${response.statusText}` ); } return { content: [ { type: 'text', text: 'Market unresolved successfully', }, ], }; }
- src/index.ts:92-95 (schema)Zod schema defining input for unresolve_market: contractId (string, required), answerId (string, optional).const UnresolveMarketSchema = z.object({ contractId: z.string(), answerId: z.string().optional(), });
- src/index.ts:313-324 (registration)Registers the unresolve_market tool in the ListTools response with name, description, and input schema.{ name: 'unresolve_market', description: 'Unresolve a previously resolved market', inputSchema: { type: 'object', properties: { contractId: { type: 'string', description: 'Market ID' }, answerId: { type: 'string', description: 'Optional. Answer ID for multiple choice markets' } }, required: ['contractId'] } },