feishu_im_user_message
Send or reply to Feishu messages as the authenticated user. Use this tool when explicitly requested to act on the user's behalf for private or group chats, ensuring content and recipient confirmation.
Instructions
飞书用户身份 IM 消息工具。有且仅当用户明确要求以自己身份发消息、回复消息时使用,当没有明确要求时优先使用message系统工具。
Actions:
send(发送消息):发送消息到私聊或群聊。私聊用 receive_id_type=open_id,群聊用 receive_id_type=chat_id
reply(回复消息):回复指定 message_id 的消息,支持话题回复(reply_in_thread=true)
【重要】content 必须是合法 JSON 字符串,格式取决于 msg_type。最常用:text 类型 content 为 '{"text":"消息内容"}'。
【安全约束】此工具以用户身份发送消息,发出后对方看到的发送者是用户本人。调用前必须先向用户确认:1) 发送对象(哪个人或哪个群)2) 消息内容。禁止在用户未明确同意的情况下自行发送消息。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| receive_id_type | No | 接收者 ID 类型:open_id(私聊,ou_xxx)、chat_id(群聊,oc_xxx) | |
| receive_id | No | 接收者 ID,与 receive_id_type 对应。open_id 填 'ou_xxx',chat_id 填 'oc_xxx' | |
| msg_type | Yes | 消息类型:text(纯文本)、post(富文本)、image(图片)、file(文件)、interactive(消息卡片)、share_chat(群名片)、share_user(个人名片)等 | |
| content | Yes | 消息内容(JSON 字符串),格式取决于 msg_type。示例:text → '{"text":"你好"}',image → '{"image_key":"img_xxx"}',share_chat → '{"chat_id":"oc_xxx"}',post → '{"zh_cn":{"title":"标题","content":[[{"tag":"text","text":"正文"}]]}}' | |
| uuid | No | 幂等唯一标识。同一 uuid 在 1 小时内只会发送一条消息,用于去重 | |
| message_id | No | 被回复消息的 ID(om_xxx 格式) | |
| reply_in_thread | No | 是否以话题形式回复。true 则消息出现在该消息的话题中,false(默认)则出现在聊天主流 |