From 3ccd70cd4ee54fb61a39ef435fbe98d6de7566f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E8=96=87Lovie?= <127327672+LovieCode@users.noreply.github.com> Date: Sun, 15 Mar 2026 21:46:01 +0800 Subject: [PATCH] Fix: AI fails to send media files when tool-calling mode is set to "skills-like". (#6317) * fix: improve send_message_to_user tool description for skills_like mode * fix: enhance description for send_message_to_user tool to clarify usage --------- Co-authored-by: Soulter <905617992@qq.com> --- astrbot/core/astr_main_agent_resources.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/astrbot/core/astr_main_agent_resources.py b/astrbot/core/astr_main_agent_resources.py index b8eaf41d7..d0ef33b81 100644 --- a/astrbot/core/astr_main_agent_resources.py +++ b/astrbot/core/astr_main_agent_resources.py @@ -188,7 +188,12 @@ class KnowledgeBaseQueryTool(FunctionTool[AstrAgentContext]): @dataclass class SendMessageToUserTool(FunctionTool[AstrAgentContext]): name: str = "send_message_to_user" - description: str = "Directly send message to the user. Only use this tool when you need to proactively message the user. Otherwise you can directly output the reply in the conversation." + description: str = ( + "Send message to the user. " + "Supports various message types including `plain`, `image`, `record`, `video`, `file`, and `mention_user`. " + "Use this tool to send media files (`image`, `record`, `video`, `file`), " + "or when you need to proactively message the user(such as cron job). For normal text replies, you can output directly." + ) parameters: dict = Field( default_factory=lambda: {