Home / Class/ ServerToolCallChunk Class — langchain Architecture

ServerToolCallChunk Class — langchain Architecture

Architecture documentation for the ServerToolCallChunk class in content.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  728c0c3c_9660_ccca_89a4_33d3c3babaf7["ServerToolCallChunk"]
  c7f11daf_e104_efbe_7225_f1d6da8e8630["content.py"]
  728c0c3c_9660_ccca_89a4_33d3c3babaf7 -->|defined in| c7f11daf_e104_efbe_7225_f1d6da8e8630

Relationship Graph

Source Code

libs/core/langchain_core/messages/content.py lines 397–422

class ServerToolCallChunk(TypedDict):
    """A chunk of a server-side tool call (yielded when streaming)."""

    type: Literal["server_tool_call_chunk"]
    """Used for discrimination."""

    name: NotRequired[str]
    """The name of the tool to be called."""

    args: NotRequired[str]
    """JSON substring of the arguments to the tool call."""

    id: NotRequired[str]
    """Unique identifier for this server tool call chunk.

    Either:

    - Generated by the provider
    - Generated by LangChain upon creation (`UUID4` prefixed with `'lc_'`))
    """

    index: NotRequired[int | str]
    """Index of block in aggregate response. Used during streaming."""

    extras: NotRequired[dict[str, Any]]
    """Provider-specific metadata."""

Frequently Asked Questions

What is the ServerToolCallChunk class?
ServerToolCallChunk is a class in the langchain codebase, defined in libs/core/langchain_core/messages/content.py.
Where is ServerToolCallChunk defined?
ServerToolCallChunk is defined in libs/core/langchain_core/messages/content.py at line 397.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free