File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
mcp-server-filesystem/src/main/java/com/github/mcp/examples/server/filesystem Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff 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.
You can’t perform that action at this time.
0 commit comments