langchain.js
    Preparing search index...

    Type Alias ToolCallHandler<TSchema, TContext>

    ToolCallHandler: (
        request: ToolCallRequest<TSchema, TContext>,
    ) => PromiseOrValue<BaseMessage | Command>

    Handler function type for wrapping tool calls. Takes a tool call request and returns the tool result or a command.

    Type Parameters

    • TSchema extends Record<string, unknown> = AgentBuiltInState
    • TContext = unknown

    Type Declaration