Skip to content

Commit 243eb91

Browse files
committed
refactor(mcp-server-filesystem): Improve comments in listFiles method for clarity
1 parent 8ae789b commit 243eb91

File tree

1 file changed

+2
-0
lines changed
  • mcp-server-filesystem/src/main/java/com/github/mcp/examples/server/filesystem

1 file changed

+2
-0
lines changed

mcp-server-filesystem/src/main/java/com/github/mcp/examples/server/filesystem/McpTools.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,10 @@ public static McpServerFeatures.SyncToolSpecification readFile() throws IOExcept
8484
public static McpServerFeatures.SyncToolSpecification listFiles() throws IOException {
8585
// Step 1: Load the JSON schema for the tool input arguments.
8686
final String schema = FileOperationHelper.readResourceAsString("schema/list-files-tool-input-json-schema.json");
87+
8788
// Step 2: Create a tool with name, description, and JSON schema.
8889
McpSchema.Tool tool = new McpSchema.Tool("list_files", "List files of a directory.", schema);
90+
8991
// Step 3: Create a tool specification with the tool and the call function.
9092
return new McpServerFeatures.SyncToolSpecification(tool, (exchange, arguments) -> {
9193
// Step 4: List files and return the result.

0 commit comments

Comments
 (0)