Skip to content

Commit fd53a1c

Browse files
committed
polish tool spec
1 parent 01d55f0 commit fd53a1c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

crates/chat-cli/src/cli/chat/tools/tool_index.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,41 +48,41 @@
4848
"Search",
4949
"Image"
5050
],
51-
"description": "The operation mode"
51+
"description": "The operation mode to run in: `Line`, `Directory`, `Search`. `Line` and `Search` are only for text files, and `Directory` is only for directories. `Image` is for image files, in this mode `image_paths` is required."
5252
},
5353
"path": {
5454
"type": "string",
55-
"description": "Path to file or directory (required for Line, Directory, Search modes)"
55+
"description": "Path to the file or directory. The path should be absolute, or otherwise start with ~ for the user's home (required for Line, Directory, Search modes)."
5656
},
5757
"image_paths": {
5858
"type": "array",
5959
"items": {
6060
"type": "string"
6161
},
62-
"description": "Paths to images (required for Image mode)"
62+
"description": "List of paths to the images. This is currently supported by the Image mode."
6363
},
6464
"start_line": {
6565
"type": "integer",
66-
"description": "Starting line number (optional for Line mode)",
66+
"description": "Starting line number (optional, for Line mode). A negative index represents a line number starting from the end of the file.",
6767
"default": 1
6868
},
6969
"end_line": {
7070
"type": "integer",
71-
"description": "Ending line number (optional for Line mode)",
71+
"description": "Ending line number (optional, for Line mode). A negative index represents a line number starting from the end of the file.",
7272
"default": -1
7373
},
7474
"pattern": {
7575
"type": "string",
76-
"description": "Search pattern (required for Search mode)"
76+
"description": "Pattern to search for (required, for Search mode). Case insensitive. The pattern matching is performed per line."
7777
},
7878
"context_lines": {
7979
"type": "integer",
80-
"description": "Context lines around matches (optional for Search mode)",
80+
"description": "Number of context lines around search results (optional, for Search mode)",
8181
"default": 2
8282
},
8383
"depth": {
8484
"type": "integer",
85-
"description": "Directory traversal depth (optional for Directory mode)",
85+
"description": "Depth of a recursive directory listing (optional, for Directory mode)",
8686
"default": 0
8787
}
8888
},

0 commit comments

Comments
 (0)