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-coretoolsbaseBaseToolextras
    Attribute●Since v1.2

    extras

    Optional provider-specific extra fields for the tool.

    This is used to pass provider-specific configuration that doesn't fit into standard tool fields.

    Copy
    extras: dict[str, Any] | None = None

    Example:

    Anthropic-specific fields like cache_control, defer_loading, or input_examples.

    @tool(extras={"defer_loading": True, "cache_control": {"type": "ephemeral"}})
    def my_tool(x: str) -> str:
        return x
    View source on GitHub