docs(tools): clarify coding tool guidance

This commit is contained in:
Xubin Ren
2026-05-21 14:28:39 +08:00
parent 7e122d6e49
commit 44ef697aac
6 changed files with 85 additions and 22 deletions
+4 -2
View File
@@ -211,8 +211,10 @@ class ExecTool(Tool):
def description(self) -> str:
return (
"Execute a shell command and return its output. "
"Prefer read_file/write_file/edit_file over cat/echo/sed, "
"and grep/glob over shell find/grep. "
"Use this for tests, builds, package commands, git commands, and "
"other process execution. Prefer read_file/find_files/grep for "
"inspection and apply_patch/write_file/edit_file for file changes "
"instead of cat, shell find/grep, echo, or sed. "
"Use -y or --yes flags to avoid interactive prompts. "
"For long-running or interactive commands, pass yield_time_ms; "
"if the command keeps running, exec returns a session_id that can "