Skip to content

ResultTool<ResultSchema, ToolContext> ​

ts
type ResultTool<ResultSchema, ToolContext> = Tool<ToolParameters, ToolContext, SchemaInfer<ResultSchema>>;

Tool the AI may pick as its outcome; trypatch calls it after the investigation and its return value is returned from the decorated method in place of the error. When AiInvestigationOptions.resultSchema is set, execute must return SchemaInfer for that schema.

Type Parameters ​

ResultSchema ​

ResultSchema extends Schema = Schema

ToolContext ​

ToolContext = unknown