llm-tools.el

Opinionated tools for use by a (local) LLM
Log | Files | Refs | LICENSE

commit b289ee4ddbcd791f23537e9a7ad1cc2c1f839eda
parent 0584ace0f5368111f9898256b7fead019493a6e4
Author: Vineet Kumar <git@vineetk.net>
Date:   Tue, 26 May 2026 00:44:46 -0400

update bash tool to explicitly mention the other tools

the llm otherwise could rationalize to use bash otherwise since it was
initially vague

Diffstat:
Mllm-tools.el | 13++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/llm-tools.el b/llm-tools.el @@ -271,7 +271,7 @@ COMMAND is the bash command string to execute." "\\bmkfs\\b" "\\bsudo\\b" "\\bdoas\\b" - "[^>]>[^>]" ; any singular > that isn't >> + "[^>]>[^>&0-9]" ; any singular > that isn't >> nor file-descriptor redirect "\\$(" "`" "|[ \t]*\\bsh\\b" @@ -292,6 +292,13 @@ tests or other development or system administration tasks. Use the dedicated tools for file operations, searching, and code navigation instead of shell commands. +- For file contents: use `read_file` or `web_fetch` +- For file discovery/metadata: use `find_files` +- For searching text in files: use `grep` +- For editing files: use `edit_file` or `write_file` + +Bash should be a last resort, used only when no other tool fits the task. + - Quote file paths with spaces using double quotes. - Chain dependent commands with && (or ; if failures are OK) - Use absolute paths instead of cd when possible @@ -302,8 +309,8 @@ EXAMPLES: - Check file type: 'file document.pdf' - Count lines: 'wc -l *.txt' -The command will be executed in the current working directory. Output is -returned as a string. Long outputs should be filtered/limited using pipes." +The command will be executed in the current working directory. Output is +returned as a string. Long outputs should be filtered/limited using pipes." :args '((:name "command" :type string :description "The Bash command to execute.\