Skip to main content
Glama
bmorphism

Manifold Markets MCP Server

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
NameRequiredDescriptionDefault
contractIdYesMarket ID
answerIdNoOptional. Answer ID for multiple choice markets

Implementation Reference

  • 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',
          },
        ],
      };
    }
  • 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']
      }
    },

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