Skip to main content
Glama
bmorphism

Manifold Markets MCP Server

cancel_bet

Cancel an existing limit order bet on Manifold Markets by providing its unique bet ID.

Instructions

Cancel a limit order bet

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
betIdYesBet ID to cancel

Implementation Reference

  • Zod schema for cancel_bet tool input validation - requires a betId string
    const CancelBetSchema = z.object({
      betId: z.string(),
    });
  • src/index.ts:266-276 (registration)
    Registration of the 'cancel_bet' tool with description and input schema (name, description, inputSchema)
    {
      name: 'cancel_bet',
      description: 'Cancel a limit order bet',
      inputSchema: {
        type: 'object',
        properties: {
          betId: { type: 'string', description: 'Bet ID to cancel' },
        },
        required: ['betId'],
      },
    },
  • Handler for cancel_bet: parses betId, makes POST request to /v0/bet/cancel/{betId} with API key auth, 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',
          },
        ],
      };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden for behavioral disclosure. It fails to mention side effects (e.g., refund, state changes) or idempotency, leaving critical gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The single-sentence description is extremely concise, with no extraneous words, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple cancel action with one parameter and no output schema, the description covers the essential purpose but lacks details on preconditions (e.g., bet status) or postconditions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the description adds no meaningful detail beyond what the schema already provides for betId. Baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'cancel' and the object 'a limit order bet', making the tool's purpose immediately understandable and distinct from siblings like place_bet or sell_shares.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives, such as whether cancellation is only for limit orders or if there are prerequisites like unsettled bets.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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