Skip to content

Commit 3c19de2

Browse files
committed
findtext simplify and some tool schema mods
1 parent 7f26066 commit 3c19de2

7 files changed

Lines changed: 371 additions & 354 deletions

File tree

exectool/runscript.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var runScriptToolSpec = spec.Tool{
2323
Slug: "runscript",
2424
Version: "v1.0.0",
2525
DisplayName: "Run Script",
26-
Description: "Run a pre-existing script from disk.",
26+
Description: "Run an existing script from disk.",
2727
Tags: []string{"exec"},
2828

2929
ArgSchema: spec.JSONSchema(`{

fstool/listdirectory.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var listDirectoryTool = spec.Tool{
3636
},
3737
"nameGlob": {
3838
"type": "string",
39-
"description": "Optional glob applied to immediate entry names, like \"*.txt\". Not a regex."
39+
"description": "Optional glob applied to immediate entry names, like \"*.txt\"."
4040
},
4141
"includeDotEntries": {
4242
"type": "boolean",

fstool/searchfiles.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ var searchFilesTool = spec.Tool{
2323
Slug: "searchfiles",
2424
Version: "v1.0.0",
2525
DisplayName: "Search files (content or path)",
26-
Description: "Recursively search files by path, file content, or both. Dot-prefixed files and directories are excluded by default. Content search only checks small (< 1MB) UTF-8 text-like files.",
27-
Tags: []string{"fs", "search"},
26+
Description: "Recursively search files by path, file content, or both. " +
27+
"Dot-prefixed files and directories are excluded by default. Content search only checks small (< 1MB) UTF-8 text-like files.",
28+
Tags: []string{"fs", "search"},
2829

2930
ArgSchema: spec.JSONSchema(`{
3031
"$schema": "http://json-schema.org/draft-07/schema#",
@@ -52,7 +53,7 @@ var searchFilesTool = spec.Tool{
5253
},
5354
"nameGlob": {
5455
"type": "string",
55-
"description": "Optional basename glob to limit which files are searched, like \"*.go\". Not a regex."
56+
"description": "Optional basename glob to limit which files are searched, like \"*.go\"."
5657
},
5758
"caseSensitive": {
5859
"type": "boolean",

fstool/writefile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var writeFileTool = spec.Tool{
2323
Slug: "writefile",
2424
Version: "v1.0.0",
2525
DisplayName: "Write file",
26-
Description: "Write a file to disk. Text mode writes UTF-8 text. Binary mode expects base64 input and writes raw bytes.",
26+
Description: "Write a file to disk. Set createParents=true if folders dont exist. Set overwrite=true to replace the file. Text mode writes UTF-8 text. Binary mode expects base64 input and writes raw bytes.",
2727
Tags: []string{"fs"},
2828

2929
ArgSchema: spec.JSONSchema(`{

texttool/deletetextlines.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ var deleteTextLinesTool = spec.Tool{
1919
Slug: "deletetextlines",
2020
Version: "v1.0.0",
2121
DisplayName: "Delete text lines",
22-
Description: "Delete a uniquely located block of lines from a UTF-8 text file. Matching compares TrimSpace(line). " +
23-
"Before calling, get exact file text and line numbers with find/read tools unless you already have them. " +
22+
Description: "Delete a block of lines. Matching compares TrimSpace(line). " +
2423
"Use a pointed locator: copy an exact distinctive block of > 2 consecutive lines, add immediate beforeLines/afterLines when the block may repeat, and pass maybeStartLine from the observed line number when relevant. " +
2524
"Do not send generic, repeated, overlapping, or conflict-prone deletions. The tool fails unless the final deletion count equals expectedDeletions.",
2625
Tags: []string{"text"},
@@ -31,13 +30,13 @@ var deleteTextLinesTool = spec.Tool{
3130
"properties": {
3231
"path": {
3332
"type": "string",
34-
"description": "Path of the UTF-8 text file."
33+
"description": "Path of the file."
3534
},
3635
"matchLines": {
3736
"type": "array",
3837
"items": { "type": "string" },
3938
"minItems": 1,
40-
"description": "Exact consecutive lines to delete, copied from the file. Prefer a distinctive block of > 2 lines. Do not paraphrase. Do not use generic single lines such as blank lines, braces, or repeated return statements. Newline characters inside items are allowed and treated as line breaks."
39+
"description": "Lines to delete. Prefer a distinctive block of > 2 lines. Do not paraphrase. Do not use generic single lines such as blank lines, braces, or repeated return statements. Newline characters inside items are allowed and treated as line breaks."
4140
},
4241
"beforeLines": {
4342
"type": "array",

0 commit comments

Comments
 (0)