Type Alias: ToolCallResults<TTools>
ToolCallResults<
TTools> ={ [K in keyof TTools]: { arguments: InferToolParams<TTools[K]>; result: InferToolResult<TTools[K]>; toolName: K & string } }[keyofTTools][]
Defined in: packages/core/src/type-utils.ts:200
Create typed tool call results from a tools configuration Each tool call is properly typed with its name, arguments, and result
Type Parameters
TTools
TTools extends Record<string, unknown>
Example
const tools = {
search: defineZodTool({
schema: z.object({ query: z.string() }),
function: async () => ({ results: ['a', 'b'] })
})
};
type Calls = ToolCallResults<typeof tools>;
// Array<{ toolName: 'search', arguments: { query: string }, result: { results: string[] } }>