langchain.js
    Preparing search index...

    Type Alias WrapToolCallHook<TSchema, TContext>

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

    Wrapper function type for the wrapToolCall hook. Allows middleware to intercept and modify tool execution.

    Type Parameters

    • TSchema extends BaseMessage | undefined = undefined
    • TContext = unknown

    Type Declaration