reply_to_message
Send a reply in an existing social media conversation on Instagram, Facebook, WhatsApp, or other platforms. Provide conversation ID, account ID, and reply text.
Instructions
Reply to a social media message/DM.
Send a reply in an existing conversation on Instagram, Facebook, WhatsApp, or other connected platforms.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"conversation_id": "<conversation_id>",
"account_id": "<account_id>",
"message": "<message>"
},
"name": "reply_to_message"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| conversation_id | Yes | Conversation ID to reply in | |
| account_id | Yes | Social account ID to reply from | |
| message | Yes | Reply text | |
| org_id | No | Organization ID (uses YAPARAI_ORG_ID env var if not provided) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/yaparai/tools/social.py:226-252 (handler)The main handler function `reply_to_message` that sends a reply in an existing conversation on Instagram, Facebook, WhatsApp, or other connected platforms. It takes conversation_id, account_id, message, and optional org_id, resolves the org ID, creates a YaparAIClient, and calls client.social_reply().
async def reply_to_message( conversation_id: str, account_id: str, message: str, org_id: str | None = None, ) -> dict: """ Reply to a social media message/DM. Send a reply in an existing conversation on Instagram, Facebook, WhatsApp, or other connected platforms. Args: conversation_id: Conversation ID to reply in account_id: Social account ID to reply from message: Reply text org_id: Organization ID (uses YAPARAI_ORG_ID env var if not provided) Returns: Dict with reply status confirmation. """ oid = resolve_org_id(org_id) client = YaparAIClient() return await client.social_reply(oid, conversation_id, account_id, { "message": message, }) - src/yaparai/server.py:165-165 (registration)Registration of reply_to_message as an MCP tool via `mcp.tool(reply_to_message)`.
mcp.tool(reply_to_message) - src/yaparai/server.py:70-81 (registration)Import of reply_to_message from yaparai.tools.social module into the server file where it is registered as an MCP tool.
from yaparai.tools.social import ( list_social_accounts, create_social_post, list_social_posts, get_social_quota, generate_caption, generate_hashtags, list_inbox, read_conversation, reply_to_message, ai_reply_suggestion, )