Skip to main content
Glama
bmorphism

Manifold Markets MCP Server

add_bounty

Add a bounty to a Manifold Markets prediction market to incentivize participation and increase liquidity.

Instructions

Add bounty to a market

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contractIdYesMarket ID
amountYesAmount of mana to add as bounty

Implementation Reference

  • Handler function for 'add_bounty' tool: validates params with AddBountySchema, checks for MANIFOLD_API_KEY, sends POST request to Manifold API to add bounty to the specified market, returns success message.
    case 'add_bounty': {
      const params = AddBountySchema.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/market/${params.contractId}/add-bounty`, {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          Authorization: `Key ${apiKey}`,
        },
        body: JSON.stringify({
          amount: params.amount,
        }),
      });
    
      if (!response.ok) {
        throw new McpError(
          ErrorCode.InternalError,
          `Manifold API error: ${response.statusText}`
        );
      }
    
      return {
        content: [
          {
            type: 'text',
            text: 'Bounty added successfully',
          },
        ],
      };
    }
  • Zod schema for add_bounty tool input: requires contractId (string) and amount (positive finite number).
    const AddBountySchema = z.object({
      contractId: z.string(),
      amount: z.number().positive().finite(),
    });
  • src/index.ts:361-372 (registration)
    Tool registration in listTools handler: defines name 'add_bounty', description, and inputSchema matching the Zod schema.
    {
      name: 'add_bounty',
      description: 'Add bounty to a market',
      inputSchema: {
        type: 'object',
        properties: {
          contractId: { type: 'string', description: 'Market ID' },
          amount: { type: 'number', description: 'Amount of mana to add as bounty' }
        },
        required: ['contractId', 'amount']
      }
    },

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