Skip to content

Commit 16842af

Browse files
authored
Merge pull request #36 from nbanks/clarify-tool-descriptions
Clarify MCP description for edit_block, read_file, and how search_files.
2 parents 5982685 + 5e7f523 commit 16842af

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ The server provides these tool categories:
122122
- `move_file`: Move/rename files
123123
- `search_files`: Pattern-based file search
124124
- `get_file_info`: File metadata
125-
- `code_search`: Recursive ripgrep based text and code search
125+
- `search_code`: Recursive ripgrep based text and code search
126126

127127
### Edit Tools
128128
- `edit_block`: Apply surgical text replacements (best for changes <20% of file size)
@@ -132,9 +132,9 @@ Search/Replace Block Format:
132132
```
133133
filepath.ext
134134
<<<<<<< SEARCH
135-
existing code to replace
135+
content to find
136136
=======
137-
new code to insert
137+
new content
138138
>>>>>>> REPLACE
139139
```
140140

src/server.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
148148
name: "read_file",
149149
description:
150150
"Read the complete contents of a file from the file system. " +
151-
"Handles various text encodings and provides detailed error messages " +
151+
"Reads UTF-8 text and provides detailed error messages " +
152152
"if the file cannot be read. Only works within allowed directories.",
153153
inputSchema: zodToJsonSchema(ReadFileArgsSchema),
154154
},
@@ -194,7 +194,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
194194
{
195195
name: "search_files",
196196
description:
197-
"Recursively search for files and directories matching a pattern. " +
197+
"Finds files by name using a case-insensitive substring matching. " +
198198
"Searches through all subdirectories from the starting path. " +
199199
"Only searches within allowed directories.",
200200
inputSchema: zodToJsonSchema(SearchFilesArgsSchema),
@@ -230,8 +230,8 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
230230
name: "edit_block",
231231
description:
232232
"Apply surgical text replacements to files. Best for small changes (<20% of file size). " +
233-
"Multiple blocks can be used for separate changes. Will verify changes after application. " +
234-
"Format: filepath, then <<<<<<< SEARCH, content to find, =======, new content, >>>>>>> REPLACE.",
233+
"Call repeatedly to change multiple blocks. Will verify changes after application. " +
234+
"Format:\nfilepath\n<<<<<<< SEARCH\ncontent to find\n=======\nnew content\n>>>>>>> REPLACE",
235235
inputSchema: zodToJsonSchema(EditBlockArgsSchema),
236236
},
237237
],
@@ -409,4 +409,4 @@ server.setRequestHandler(CallToolRequestSchema, async (request: CallToolRequest)
409409
isError: true,
410410
};
411411
}
412-
});
412+
});

0 commit comments

Comments
 (0)