send_mana
Transfer mana currency to other users on Manifold Markets, specifying recipients and amount with optional messages.
Instructions
Send mana to other users
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| toIds | Yes | Array of user IDs to send mana to | |
| amount | Yes | Amount of mana to send (min 10) | |
| message | No | Optional message to include |
Implementation Reference
- src/index.ts:1090-1128 (handler)Handler for send_mana tool: parses input with SendManaSchema, checks MANIFOLD_API_KEY, sends POST request to Manifold's /v0/managram endpoint with toIds, amount, and optional message, 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 for validating send_mana tool inputs: array of recipient user IDs (toIds), 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:412-428 (registration)Registration of send_mana tool in the listTools response, including name, description, and inputSchema 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'], }, },