You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -212,11 +212,18 @@ export async function presentAssistantMessage(cline: Task) {
212
212
break
213
213
}
214
214
215
-
if(cline.didAlreadyUseTool){
215
+
if(cline.didAlreadyUseTool>4){
216
216
// Ignore any content after a tool has already been used.
217
217
cline.userMessageContent.push({
218
218
type: "text",
219
-
text: `Tool [${block.name}] was not executed because a tool has already been used in this message. Only one tool may be used per message. You must assess the first tool's result before proceeding to use the next tool.`,
219
+
text: `Tool [${block.name}] was not executed because too many tools have already been used in this message. Only five tools may be used per message. You must assess the first tool's result before proceeding to use the next tool.`,
Copy file name to clipboardExpand all lines: src/core/prompts/sections/tool-use.ts
+12-2Lines changed: 12 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ export function getSharedToolUseSection(): string {
3
3
4
4
TOOL USE
5
5
6
-
You have access to a set of tools that are executed upon the user's approval. You can use one tool per message, and will receive the result of that tool use in the user's response. You use tools step-by-step to accomplish a given task, with each tool use informed by the result of the previous tool use.
6
+
You have access to a set of tools that are executed upon the user's approval. You can use up to five tools in a single message to reduce the number of interaction rounds, and will receive the results of those tool use in the user's response. Read and write tools should not be used simultaneously in one request. You use tools step-by-step to accomplish a given task, with each tool use informed by the result of the previous tool use.
7
7
8
8
# Tool Use Formatting
9
9
@@ -15,11 +15,21 @@ Tool uses are formatted using XML-style tags. The tool name itself becomes the X
15
15
...
16
16
</actual_tool_name>
17
17
18
-
For example, to use the read_file tool:
18
+
<actual_tool_name2>
19
+
<parameter1_name>value1</parameter1_name>
20
+
<parameter2_name>value2</parameter2_name>
21
+
...
22
+
</actual_tool_name2>
23
+
24
+
For example, to use two read_file tools:
19
25
20
26
<read_file>
21
27
<path>src/main.js</path>
22
28
</read_file>
23
29
30
+
<read_file>
31
+
<path>src/index.js</path>
32
+
</read_file>
33
+
24
34
Always use the actual tool name as the XML tag name for proper parsing and execution.`
0 commit comments