unresolve_market
Change a resolved prediction market back to an unresolved state. Useful for correcting errors or reopening markets.
Instructions
Unresolve a previously resolved market
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| contractId | Yes | Market ID | |
| answerId | No | Optional. Answer ID for multiple choice markets |
Implementation Reference
- src/index.ts:92-95 (schema)Zod schema for unresolve_market input validation: requires contractId, optional answerId for multiple choice markets
const UnresolveMarketSchema = z.object({ contractId: z.string(), answerId: z.string().optional(), }); - src/index.ts:313-324 (registration)Tool registration in the list of tools with name 'unresolve_market', description, input schema definition
{ 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'] } }, - src/index.ts:787-820 (handler)Handler for unresolve_market: parses params via Zod schema, checks API key, POSTs to /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', }, ], };