LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangChain
  • Browser
  • Universal
  • Hub
  • Node
  • Load
  • Serializable
  • Encoder Backed
  • File System
  • In Memory
  • Tools
LangChain Core
  • Agents
  • Caches
  • Base
  • Dispatch
  • Web
  • Manager
  • Promises
  • Chat History
  • Context
  • Base
  • Langsmith
  • Documents
  • Embeddings
  • Errors
  • Example Selectors
  • Indexing
  • Base
  • Chat Models
  • Compat
  • Event
  • Llms
  • Openai Completions Stream
  • Profile
  • Stream
  • Structured Output
  • Load
  • Serializable
  • Memory
  • Messages
  • Tool
  • Output Parsers
  • Openai Functions
  • Openai Tools
  • Outputs
  • Prompt Values
  • Prompts
  • Retrievers
  • Document Compressors
  • Runnables
  • Graph
  • Singletons
  • Stores
  • Structured Query
  • Testing
  • Tools
  • Base
  • Console
  • Log Stream
  • Run Collector
  • Tracer Langchain
  • Stream
  • Async Caller
  • Chunk Array
  • Context
  • Env
  • Event Source Parse
  • Format
  • Function Calling
  • Gateway
  • Hash
  • Json Patch
  • Json Schema
  • Math
  • Ssrf
  • Standard Schema
  • Stream
  • Testing
  • Tiktoken
  • Types
  • Uuid
  • Vectorstores
Text Splitters
MCP Adapters
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangChain
BrowserUniversalHubNodeLoadSerializableEncoder BackedFile SystemIn MemoryTools
LangChain Core
AgentsCachesBaseDispatchWebManagerPromisesChat HistoryContextBaseLangsmithDocumentsEmbeddingsErrorsExample SelectorsIndexingBaseChat ModelsCompatEventLlmsOpenai Completions StreamProfileStreamStructured OutputLoadSerializableMemoryMessagesToolOutput ParsersOpenai FunctionsOpenai ToolsOutputsPrompt ValuesPromptsRetrieversDocument CompressorsRunnablesGraphSingletonsStoresStructured QueryTestingToolsBaseConsoleLog StreamRun CollectorTracer LangchainStreamAsync CallerChunk ArrayContextEnvEvent Source ParseFormatFunction CallingGatewayHashJson PatchJson SchemaMathSsrfStandard SchemaStreamTestingTiktokenTypesUuidVectorstores
Text Splitters
MCP Adapters
Language
Theme
JavaScript@langchain/coretoolsStructuredToolInterface
Interface●Since v0.3

StructuredToolInterface

Copy
interface StructuredToolInterface

Bases

RunnableInterface<StructuredToolCallInput<SchemaT, SchemaInputT>, ToolOutputT | ToolMessage>

Properties

Methods

Inherited fromRunnableInterface

Properties

Plc_serializable: booleanPlc_id: string[]

Methods

Mbatch→ Promise<RunOutput[]>MgetName→ string
View source on GitHub
Minvoke→ Promise<RunOutput>
Mstream→ Promise<IterableReadableStreamInterface<RunOutput>>
Mtransform→ AsyncGenerator<RunOutput>

Inherited fromSerializableInterface

Properties

Plc_id: string[]
property
description: string
property
extras: Record<string, unknown>
property
lc_namespace: string[]
property
lc_serializable: boolean
property
name: string
property
returnDirect: boolean
property
schema: SchemaT
property
lc_id: string[]
method
batch→ Promise<ToolMessage<MessageStructure<MessageToolSet>> | ToolOutputT[]>
method
getName→ string
method
invoke→ Promise<ToolReturnType<TArg, TConfig, ToolOutputT>>
method
stream→ Promise<IterableReadableStreamInterface<ToolMessage<MessageStructure<MessageToolSet>> | ToolOutputT>>
method
transform→ AsyncGenerator<ToolMessage<MessageStructure<MessageToolSet>> | ToolOutputT>
deprecatedmethod
call→ Promise<ToolReturnType<TArg, TConfig, ToolOutputT>>

Interface that defines the shape of a LangChain structured tool.

A structured tool is a tool that uses a schema to define the structure of the arguments that the LLM generates as part of its ToolCall.

A description of the tool.

Optional provider-specific extra fields for the tool.

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

The name of the tool.

Whether to return the tool's output directly.

Setting this to true means that after the tool is called, an agent should stop looping.

A Zod schema representing the parameters of the tool.

Invokes the tool with the provided argument and configuration.