Function type that dynamically generates a description for a tool call approval request.
The tool call being reviewed
The current agent state
The agent runtime context
A string description or Promise that resolves to a string description
import { type DescriptionFactory, type ToolCall } from "langchain";const descriptionFactory: DescriptionFactory = (toolCall, state, runtime) => { return `Please review: ${toolCall.name}(${JSON.stringify(toolCall.args)})`;}; Copy
import { type DescriptionFactory, type ToolCall } from "langchain";const descriptionFactory: DescriptionFactory = (toolCall, state, runtime) => { return `Please review: ${toolCall.name}(${JSON.stringify(toolCall.args)})`;};
Function type that dynamically generates a description for a tool call approval request.