← Back to hub
Tools — giving the agent hands
In one line
A tool is a function the model can call. Its docstring tells the model when to use it.
Key idea
Use @tool for your own logic. Use MCP to plug into outside services. Mix both in one list.
from langchain.tools import tool
@tool
def get_weather(city: str) -> str:
"""Get the current weather for a city."""
return f"sunny and 70F in {city}"
MCP — borrow tools from anywhere
langchain-mcp-adaptersturns MCP tools into LangChain tools.MultiServerMCPClientconnects to many servers;get_tools()loads them.- Transports:
stdioandstreamable_http.
Links
My notes
Add your own findings here as you learn.