LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
    • Overview
    • Caches
    • Callbacks
    • Documents
    • Document loaders
    • Embeddings
    • Exceptions
    • Language models
    • Serialization
    • Output parsers
    • Prompts
    • Rate limiters
    • Retrievers
    • Runnables
    • Utilities
    • Vector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    OverviewCachesCallbacksDocumentsDocument loadersEmbeddingsExceptionsLanguage modelsSerializationOutput parsersPromptsRate limitersRetrieversRunnablesUtilitiesVector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    Language
    Theme
    Pythonlangchain-coremessagescontentInvalidToolCall
    Classā—Since v1.0

    InvalidToolCall

    Copy
    InvalidToolCall()

    Bases

    TypedDict

    Constructors

    Attributes

    View source on GitHub
    constructor
    __init__
    NameType
    typeLiteral['invalid_tool_call']
    idstr | None
    namestr | None
    argsstr | None
    errorstr | None
    indexNotRequired[int | str]
    extrasNotRequired[dict[str, Any]]
    attribute
    type: Literal['invalid_tool_call']

    Used for discrimination.

    attribute
    id: str | None

    An identifier associated with the tool call.

    An identifier is needed to associate a tool call request with a tool call result in events when multiple concurrent tool calls are made.

    attribute
    name: str | None

    The name of the tool to be called.

    attribute
    args: str | None

    The arguments to the tool call.

    attribute
    error: str | None

    An error message associated with the tool call.

    attribute
    index: NotRequired[int | str]

    Index of block in aggregate response. Used during streaming.

    attribute
    extras: NotRequired[dict[str, Any]]

    Provider-specific metadata.

    Allowance for errors made by LLM.

    Here we add an error key to surface errors made during generation (e.g., invalid JSON arguments.)