Skip to main content
Glama

Manifold Markets MCP Server

unresolve_market

Reopen a resolved prediction market on Manifold Markets to allow further trading or updates by specifying the market ID and optional answer ID for multiple choice markets.

Instructions

Unresolve a previously resolved market

Input Schema

NameRequiredDescriptionDefault
answerIdNoOptional. Answer ID for multiple choice markets
contractIdYesMarket ID

Input Schema (JSON Schema)

{ "properties": { "answerId": { "description": "Optional. Answer ID for multiple choice markets", "type": "string" }, "contractId": { "description": "Market ID", "type": "string" } }, "required": [ "contractId" ], "type": "object" }

Implementation Reference

  • The handler case for 'unresolve_market' in the main switch statement. It parses input parameters using UnresolveMarketSchema, checks for the required MANIFOLD_API_KEY environment variable, makes a POST request to Manifold's /v0/unresolve endpoint with the parameters, handles any errors from the API, and returns a 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', }, ], }; }
  • Zod schema definition for validating input parameters of the unresolve_market tool: requires contractId (string), optional answerId (string).
    const UnresolveMarketSchema = z.object({ contractId: z.string(), answerId: z.string().optional(), });
  • src/index.ts:314-324 (registration)
    Registration of the 'unresolve_market' tool in the MCP server's tools list, including name, description, and input schema matching the Zod 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'] } },

Other Tools

Related Tools

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