Skip to main content
Glama

Manifold Markets MCP Server

cancel_bet

Cancel a specific limit order bet on the Manifold Markets MCP Server by providing the bet ID, allowing users to manage active bets efficiently.

Instructions

Cancel a limit order bet

Input Schema

NameRequiredDescriptionDefault
betIdYesBet ID to cancel

Input Schema (JSON Schema)

{ "properties": { "betId": { "description": "Bet ID to cancel", "type": "string" } }, "required": [ "betId" ], "type": "object" }

Implementation Reference

  • Handler for cancel_bet tool: parses betId from args, checks for MANIFOLD_API_KEY, sends POST request to Manifold API endpoint /v0/bet/cancel/{betId} to cancel the bet, returns success message.
    case 'cancel_bet': { const { betId } = CancelBetSchema.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/bet/cancel/${betId}`, { method: 'POST', headers: { Authorization: `Key ${apiKey}`, }, }); if (!response.ok) { throw new McpError( ErrorCode.InternalError, `Manifold API error: ${response.statusText}` ); } return { content: [ { type: 'text', text: 'Bet cancelled successfully', }, ], }; }
  • Zod schema defining input for cancel_bet: requires betId as string.
    const CancelBetSchema = z.object({ betId: z.string(), });
  • src/index.ts:266-276 (registration)
    Registers the cancel_bet tool in the listTools response, including name, description, and inputSchema matching the Zod schema.
    { name: 'cancel_bet', description: 'Cancel a limit order bet', inputSchema: { type: 'object', properties: { betId: { type: 'string', description: 'Bet ID to cancel' }, }, required: ['betId'], }, },

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