From e37ed38dc8a3cc428271fa6f5c3a607579a4d9e3 Mon Sep 17 00:00:00 2001 From: CJACK Date: Sun, 5 Apr 2026 17:51:26 +0800 Subject: [PATCH] refactor: remove instruction regarding text-before-tool output in tool prompt documentation --- internal/util/tool_prompt.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/util/tool_prompt.go b/internal/util/tool_prompt.go index 13ea906..a801286 100644 --- a/internal/util/tool_prompt.go +++ b/internal/util/tool_prompt.go @@ -51,9 +51,8 @@ RULES: 3) Multiple tools → multiple blocks inside ONE root. 4) Do NOT wrap the XML in markdown code fences (no triple backticks). 5) After receiving a tool result, use it directly. Only call another tool if the result is insufficient. -6) If you want to say something AND call a tool, output text first, then the XML block on its own. -7) Parameters MUST use the exact field names from the selected tool schema. -8) CRITICAL: Do NOT invent or add any extra fields (such as "_raw", "_xml"). Use ONLY the fields strictly defined in the schema. Extra fields will cause execution failure. +6) Parameters MUST use the exact field names from the selected tool schema. +7) CRITICAL: Do NOT invent or add any extra fields (such as "_raw", "_xml"). Use ONLY the fields strictly defined in the schema. Extra fields will cause execution failure. ❌ WRONG — Do NOT do these: Wrong 1 — mixed text and XML: