Skip to content

ToolExecuteArgument

type ToolExecuteArgument<TParameters> = TParameters extends StandardSchemaWithJSON<any, any> ? StandardSchemaOutput<TParameters> : TParameters extends ZodObjectLike ? ZodInfer<TParameters> : TParameters extends JsonObjectSchema<any> ? unknown : string;

The arguments to a tool.

The type of the arguments are derived from the parameters passed to the tool definition.

If the parameters are passed as a JSON schema the type is unknown. For Standard Schema and Zod schemas it will match the inferred validation output type. Otherwise the type is string.

Type Parameter

TParameters extends ToolInputParameters