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-coreoutput_parsersopenai_toolsparse_tool_call
    Function●Since v0.1

    parse_tool_call

    Parse a single tool call.

    Copy
    parse_tool_call(
      raw_tool_call: dict[str, Any],
      *,
      partial: bool = False,
      strict: bool = False,
      return_id: bool = True
    ) -> dict[str, Any] | None

    Parameters

    NameTypeDescription
    raw_tool_call*dict[str, Any]

    The raw tool call to parse.

    partialbool
    Default:False

    Whether to parse partial JSON.

    strictbool
    Default:False

    Whether to allow non-JSON-compliant strings.

    return_idbool
    Default:True

    Whether to return the tool call id.

    View source on GitHub