Helper type to convert an array of tools (ClientTool | ServerTool)[] to a MessageToolSet. This maps each tool's name (as a literal type) to its MessageToolDefinition containing the input and output types.
const myTool = tool(async (input: { a: number }) => 42, { name: "myTool", schema: z.object({ a: z.number() })});// Results in: { myTool: MessageToolDefinition<{ a: number }, number> }type ToolSet = ToolsToMessageToolSet<readonly [typeof myTool]>; Copy
const myTool = tool(async (input: { a: number }) => 42, { name: "myTool", schema: z.object({ a: z.number() })});// Results in: { myTool: MessageToolDefinition<{ a: number }, number> }type ToolSet = ToolsToMessageToolSet<readonly [typeof myTool]>;
Helper type to convert an array of tools (ClientTool | ServerTool)[] to a MessageToolSet. This maps each tool's name (as a literal type) to its MessageToolDefinition containing the input and output types.