Tool result refactor (return an object instead of a string)

This commit is contained in:
Alex Gleason committed 2025-12-08 15:13:34 -06:00
1 parent 9c86ced552
commit f7b2d754e9
40 files changed
+315 -276

No files matched your search

+6 -1
View File
@@ -1,7 +1,12 @@
import type z from "zod";
export interface ToolResult {
content: string;
cost?: number;
}
export interface Tool<TParams> {
description: string;
inputSchema?: z.ZodType<TParams>;
execute(args: TParams): Promise<string>;
execute(args: TParams): Promise<ToolResult>;
}