Type Alias: InferToolParams<T>
InferToolParams<
T> =Textendsobject?InferOutput<S> :Textendsobject?P:never
Defined in: packages/core/src/type-utils.ts:167
Infer the parameter type from a tool definition
Type Parameters
T
T
Example
const tool = defineZodTool({
schema: z.object({ x: z.number() }),
function: (params) => params.x * 2
});
type Params = InferToolParams<typeof tool>; // { x: number }