Function: withGoal()
withGoal<
T>(tool):T
Defined in: packages/core/src/utils/with-goal.ts:33
Prepend a required goal to one tool's input schema. A tool that already
declares goal, a Processable, and anything without an inputSchema come
back unchanged.
Type Parameters
T
T extends ToolDefinition<(...args) => unknown> | ZodToolDefinition<ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>, unknown> | GoalWrappable
Parameters
tool
T
Returns
T