Skip to content

Commit d8f9e4a

Browse files
committed
feat(adk): add jsonschema descriptions to filesystem tool arguments
Add detailed JSON Schema descriptions to all filesystem tool argument structs for better AI model understanding and tool invocation. Changes: - readFileArgs: Added descriptions for file_path, offset, and limit fields - writeFileArgs: Added descriptions for file_path and content fields - editFileArgs: Added descriptions for file_path, old_string, new_string, and replace_all fields with default value annotation - globArgs: Added descriptions for pattern and path fields - grepArgs: Added comprehensive descriptions for all 14 fields including pattern, path, glob, output_mode (with enum values), context options (-A/-B/-C), line numbers, case sensitivity, file type, pagination (head_limit/offset), and multiline mode Also updated tool descriptions in prompt.go: - WriteFileToolDesc: Improved usage guidelines with clearer instructions - GlobToolDesc: Simplified description focusing on key capabilities This enhancement enables LLM-based agents to better understand tool parameters and generate more accurate tool calls.
1 parent aed7865 commit d8f9e4a

File tree

7 files changed

+456
-238
lines changed

7 files changed

+456
-238
lines changed

_typos.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ InvokableRun = "InvokableRun"
99
typ = "typ"
1010
byted = "byted"
1111
cpy = "cpy"
12-
12+
mak = "mak"
1313
[files]
1414
extend-exclude = ["go.mod", "go.sum", "check_branch_name.sh"]

adk/filesystem/backend.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ type GrepMatch struct {
3636
// Path is the file path where the match was found.
3737
Path string
3838

39-
// LineNumber is the line number where the match was found.
40-
LineNumber int
39+
// Line is the 1-based line number of the match.
40+
Line int
4141

4242
// Count is the total number of matches found in the file.
4343
Count int

0 commit comments

Comments
 (0)