mcp: simplify handleList implementations

This commit is contained in:
Adrià Arrufat
2026-03-02 21:30:47 +09:00
parent 78edf6d324
commit 43785bfab4
2 changed files with 2 additions and 14 deletions

View File

@@ -91,13 +91,7 @@ pub const tool_list = [_]protocol.Tool{
pub fn handleList(server: *Server, arena: std.mem.Allocator, req: protocol.Request) !void {
_ = arena;
const result = struct {
tools: []const protocol.Tool,
}{
.tools = &tool_list,
};
try server.sendResult(req.id.?, result);
try server.sendResult(req.id.?, .{ .tools = &tool_list });
}
const GotoParams = struct {