send_mana
Transfer mana to specified users on the Manifold Markets platform by providing user IDs, amount, and an optional message.
Instructions
Send mana to other users
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount of mana to send (min 10) | |
| message | No | Optional message to include | |
| toIds | Yes | Array of user IDs to send mana to |
Input Schema (JSON Schema)
{
"properties": {
"amount": {
"description": "Amount of mana to send (min 10)",
"type": "number"
},
"message": {
"description": "Optional message to include",
"type": "string"
},
"toIds": {
"description": "Array of user IDs to send mana to",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"toIds",
"amount"
],
"type": "object"
}
Implementation Reference
- src/index.ts:1090-1128 (handler)Handler for the send_mana tool: validates input with SendManaSchema, checks for MANIFOLD_API_KEY, sends POST request to Manifold's /v0/managram endpoint to transfer mana to specified user IDs, returns success message.case 'send_mana': { const params = SendManaSchema.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/managram`, { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: `Key ${apiKey}`, }, body: JSON.stringify({ toIds: params.toIds, amount: params.amount, message: params.message, }), }); if (!response.ok) { throw new McpError( ErrorCode.InternalError, `Manifold API error: ${response.statusText}` ); } return { content: [ { type: 'text', text: 'Mana sent successfully', }, ], }; }
- src/index.ts:135-139 (schema)Zod schema defining input validation for send_mana tool: array of recipient user IDs, minimum 10 mana amount, optional message.const SendManaSchema = z.object({ toIds: z.array(z.string()), amount: z.number().min(10), message: z.string().optional(), });
- src/index.ts:413-428 (registration)Registers the send_mana tool in the tools list for ListToolsRequestHandler, including JSON input schema matching the Zod schema.name: 'send_mana', description: 'Send mana to other users', inputSchema: { type: 'object', properties: { toIds: { type: 'array', items: { type: 'string' }, description: 'Array of user IDs to send mana to' }, amount: { type: 'number', description: 'Amount of mana to send (min 10)' }, message: { type: 'string', description: 'Optional message to include' }, }, required: ['toIds', 'amount'], }, },