send_reaction
Send reactions to Instagram messages by specifying recipient, message ID, and reaction type like love, like, haha, wow, sad, or angry.
Instructions
Send a reaction to a message on Instagram
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| recipientId | Yes | The user ID | |
| messageId | Yes | The message ID to react to | |
| reaction | Yes | Reaction type (e.g., love, like, haha, wow, sad, angry) |
Implementation Reference
- src/index.ts:412-420 (handler)Handler for the 'send_reaction' tool in the main switch statement within CallToolRequestSchema handler. Parses input using SendReactionSchema and calls api.sendMessageReaction.case 'send_reaction': { const params = SendReactionSchema.parse(args); result = await api.sendMessageReaction( params.recipientId, params.messageId, params.reaction ); break; }
- src/index.ts:57-61 (schema)Zod schema for validating input parameters of the send_reaction tool: recipientId, messageId, reaction.const SendReactionSchema = z.object({ recipientId: z.string(), messageId: z.string(), reaction: z.string() });
- src/index.ts:120-132 (registration)Tool registration in the ListToolsRequestSchema response, defining name, description, and inputSchema matching the Zod schema.{ name: 'send_reaction', description: 'Send a reaction to a message on Instagram', inputSchema: { type: 'object', properties: { recipientId: { type: 'string', description: 'The user ID' }, messageId: { type: 'string', description: 'The message ID to react to' }, reaction: { type: 'string', description: 'Reaction type (e.g., love, like, haha, wow, sad, angry)' } }, required: ['recipientId', 'messageId', 'reaction'] } },
- src/facebook-api.ts:145-162 (helper)Core helper function that performs the actual API call to send a reaction to a message via Facebook Graph API.export async function sendMessageReaction( recipientId: string, messageId: string, reaction: string ): Promise<any> { return makeApiCall({ method: 'POST', endpoint: `/me/messages`, data: { recipient: { id: recipientId }, sender_action: 'react', payload: { message_id: messageId, reaction } } }); }