award_bounty
Assign a bounty to a specific comment on a Manifold Markets prediction market by providing the market ID, comment ID, and bounty amount.
Instructions
Award bounty to a comment
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount of bounty to award | |
| commentId | Yes | Comment ID to award bounty to | |
| contractId | Yes | Market ID |
Input Schema (JSON Schema)
{
"properties": {
"amount": {
"description": "Amount of bounty to award",
"type": "number"
},
"commentId": {
"description": "Comment ID to award bounty to",
"type": "string"
},
"contractId": {
"description": "Market ID",
"type": "string"
}
},
"required": [
"contractId",
"commentId",
"amount"
],
"type": "object"
}
Implementation Reference
- src/index.ts:977-1014 (handler)Handler for the 'award_bounty' tool: validates input with AwardBountySchema, checks for API key, sends POST request to Manifold Markets API to award bounty to a specific comment on a market, and returns a success message.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', }, ], }; }
- src/index.ts:117-121 (schema)Zod schema defining the input parameters for the award_bounty tool: 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 the listTools response: defines name, description, and input schema 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'] } },