langchain.js
    Preparing search index...

    Interface ToolCall<TName, TArgs>

    Represents a request to call a tool.

    const toolCall: ToolCall = {
    type: "tool_call",
    name: "foo",
    args: { a: 1 },
    callId: "123"
    };

    This represents a request to call the tool named "foo" with arguments {"a": 1} and an identifier of "123".

    interface ToolCall<TName extends string = string, TArgs = unknown> {
        args: TArgs;
        id?: string;
        name: TName;
        type: "tool_call";
        [key: string]: unknown;
    }

    Type Parameters

    • TName extends string = string
    • TArgs = unknown

    Hierarchy

    • BaseContentBlock
      • ToolCall

    Indexable

    • [key: string]: unknown

      Arbitrary properties

    Index

    Properties

    Properties

    args: TArgs

    The arguments to the tool call

    id?: string

    Content block identifier, which can be either

    • generated by the provider (e.g., a provider-specific ID)
    • generated by LangChain upon creation (a uuid prefixed with 'lc-')
    name: TName

    The name of the tool being called

    type: "tool_call"

    Type of the content block