Skip to content

The agent engineering platform.

docs(core): clarify @tool decorator argument and return type requirements (#34860)

shivangraikar2063577d678c
diff --git a/libs/core/langchain_core/tools/convert.py b/libs/core/langchain_core/tools/convert.py
index 480e30efae..ca6d499765 100644
--- a/libs/core/langchain_core/tools/convert.py
+++ b/libs/core/langchain_core/tools/convert.py
@@ -94,11 +94,10 @@ def tool(
unless disabled.
!!! note "Requirements"
-
- - Functions must have type hints for proper schema inference
- - When `infer_schema=False`, functions must be `(str) -> str` and have
- docstrings
- - When using with `Runnable`, a string name must be provided
+ - Functions should have type hints for proper schema inference.
+ - Functions may accept multiple arguments and return types are flexible;
+ outputs will be serialized if needed.
+ - When using with `Runnable`, a string name must be provided.
Args:
name_or_callable: Optional name of the tool or the `Callable` to be