mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 04:34:44 +00:00
mcp: use declarative static definitions for tools and resources
This commit is contained in:
@@ -94,7 +94,17 @@ pub const ToolsCapability = struct {
|
||||
pub const Tool = struct {
|
||||
name: []const u8,
|
||||
description: ?[]const u8 = null,
|
||||
inputSchema: std.json.Value,
|
||||
inputSchema: RawJson,
|
||||
};
|
||||
|
||||
pub const RawJson = struct {
|
||||
json: []const u8,
|
||||
|
||||
pub fn jsonStringify(self: @This(), jw: anytype) !void {
|
||||
try jw.beginWriteRaw();
|
||||
try jw.writer.writeAll(self.json);
|
||||
jw.endWriteRaw();
|
||||
}
|
||||
};
|
||||
|
||||
pub const Resource = struct {
|
||||
|
||||
Reference in New Issue
Block a user