Skip to main content
Glama
bmorphism

Manifold Markets MCP Server

place_bet

Place a bet on prediction market outcomes using market ID, amount, and outcome selection to participate in forecasting events.

Instructions

Place a bet on a market

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
marketIdYesMarket ID
amountYesAmount to bet in mana
outcomeYes
limitProbNoOptional limit order probability (0.01-0.99)

Implementation Reference

  • Handler for place_bet tool: parses input with PlaceBetSchema, calls Manifold Markets /v0/bet API to place the bet, returns the result.
    case 'place_bet': {
      const params = PlaceBetSchema.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`, {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          Authorization: `Key ${apiKey}`,
        },
        body: JSON.stringify({
          contractId: params.marketId,
          amount: params.amount,
          outcome: params.outcome,
          limitProb: params.limitProb,
        }),
      });
    
      if (!response.ok) {
        throw new McpError(
          ErrorCode.InternalError,
          `Manifold API error: ${response.statusText}`
        );
      }
    
      const result = await response.json();
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Zod schema defining input parameters for the place_bet tool: marketId, amount, outcome (YES/NO), optional limitProb.
    const PlaceBetSchema = z.object({
      marketId: z.string(),
      amount: z.number().positive(),
      outcome: z.enum(['YES', 'NO']),
      limitProb: z.number().min(0.01).max(0.99).optional(),
    });
  • src/index.ts:249-265 (registration)
    Tool registration in listTools response: defines name, description, and inputSchema for place_bet.
    {
      name: 'place_bet',
      description: 'Place a bet on a market',
      inputSchema: {
        type: 'object',
        properties: {
          marketId: { type: 'string', description: 'Market ID' },
          amount: { type: 'number', description: 'Amount to bet in mana' },
          outcome: { type: 'string', enum: ['YES', 'NO'] },
          limitProb: { 
            type: 'number',
            description: 'Optional limit order probability (0.01-0.99)',
          },
        },
        required: ['marketId', 'amount', 'outcome'],
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Place a bet' which implies a write/mutation operation, but it doesn't disclose critical traits like whether this is irreversible, requires authentication, has rate limits, or what happens on success/failure. For a financial transaction tool with zero annotation coverage, this is a significant gap.

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 description is a single, efficient sentence with no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place by conveying essential information without redundancy.

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

Completeness2/5

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

Given the complexity of a financial betting tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits, error conditions, return values, and usage context. For a tool that likely involves monetary transactions and market interactions, this minimal description leaves too many gaps for effective agent use.

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 description coverage is 75% (three parameters have descriptions, one does not), so the schema provides good documentation. The description adds no additional meaning beyond the schema, such as explaining 'mana' as currency or clarifying the optional 'limitProb'. With high schema coverage, the baseline is 3, and the description doesn't compensate for the 25% gap.

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

Purpose4/5

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

The description clearly states the action ('Place a bet') and the target ('on a market'), which is specific and unambiguous. However, it doesn't differentiate this tool from sibling tools like 'cancel_bet' or 'sell_shares', which also involve betting operations, so it doesn't fully distinguish from alternatives.

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?

The description provides no guidance on when to use this tool versus alternatives like 'cancel_bet' or 'sell_shares', nor does it mention prerequisites such as market availability or user balance. It lacks explicit usage context, leaving the agent to infer based on the tool name alone.

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