Skip to main content
Glama
bmorphism

Manifold Markets MCP Server

award_bounty

Reward insightful comments on prediction markets by allocating bounty funds to specific contributions using market and comment identifiers.

Instructions

Award bounty to a comment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contractIdYesMarket ID
commentIdYesComment ID to award bounty to
amountYesAmount of bounty to award

Implementation Reference

  • Handler for 'award_bounty' tool: validates input with AwardBountySchema, requires MANIFOLD_API_KEY, POSTs to Manifold API /market/{contractId}/award-bounty with commentId and amount, returns success message on OK response.
    case 'award_bounty': {
      const params = AwardBountySchema.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}/award-bounty`, {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          Authorization: `Key ${apiKey}`,
        },
        body: JSON.stringify({
          commentId: params.commentId,
          amount: params.amount,
        }),
      });
    
      if (!response.ok) {
        throw new McpError(
          ErrorCode.InternalError,
          `Manifold API error: ${response.statusText}`
        );
      }
    
      return {
        content: [
          {
            type: 'text',
            text: 'Bounty awarded successfully',
          },
        ],
      };
    }
  • Zod schema defining input parameters for award_bounty: contractId (string), commentId (string), amount (positive finite number).
    const AwardBountySchema = z.object({
      contractId: z.string(),
      commentId: z.string(),
      amount: z.number().positive().finite(),
    });
  • src/index.ts:373-385 (registration)
    Tool registration in listTools handler: defines name 'award_bounty', description, and inputSchema matching the Zod schema.
    {
      name: 'award_bounty',
      description: 'Award bounty to a comment',
      inputSchema: {
        type: 'object',
        properties: {
          contractId: { type: 'string', description: 'Market ID' },
          commentId: { type: 'string', description: 'Comment ID to award bounty to' },
          amount: { type: 'number', description: 'Amount of bounty to award' }
        },
        required: ['contractId', 'commentId', '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