Skip to content

Add tools to your agent

Give your agent the ability to do things beyond generating text: call an API, read a file, run code, or query a database. You pass tools to an agent, and the agent decides when to call them based on the request. Strands works with tools you write yourself, prebuilt tools the SDK and community ship, and any MCP server.

The smallest useful setup is an agent with a single tool it can decide to call. Define the tool, pass it to the agent, and invoke:

from strands import Agent, tool
@tool
def get_weather(city: str) -> str:
"""Get the current weather for a city."""
return f"It's sunny in {city}."
agent = Agent(tools=[get_weather])
agent("What's the weather in Seattle?")

The agent reads the tool’s description and decides when to call it. From here you add the tools your application needs and control how they run.

New to tools? Start with Attach and invoke tools to see how tools load onto an agent and the two ways to call them, then Create custom tools to build your own.

Bringing in tools that already exist? Reach for vended tools or the community tools package, or connect an MCP server. When a model returns several tool calls at once, tool executors decide whether they run concurrently or in order.