Skip to main content
Glama
bmorphism

Manifold Markets MCP Server

cancel_bet

Cancel a limit order bet on Manifold Markets by specifying the bet ID to remove pending wagers from prediction markets.

Instructions

Cancel a limit order bet

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
betIdYesBet ID to cancel

Implementation Reference

  • Executes the cancel_bet tool: validates input with CancelBetSchema, authenticates with MANIFOLD_API_KEY, sends POST request to Manifold Markets API to cancel the specified 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 the input for cancel_bet tool: requires a 'betId' string.
    const CancelBetSchema = z.object({ betId: z.string(), });
  • src/index.ts:266-276 (registration)
    Registers the 'cancel_bet' tool in the MCP server's tool list, providing name, description, and input schema for listing available tools.
    { name: 'cancel_bet', description: 'Cancel a limit order bet', inputSchema: { type: 'object', properties: { betId: { type: 'string', description: 'Bet ID to cancel' }, }, required: ['betId'], }, },

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