Framework-native tools
Although the Model Context Protocol
(MCP)
The Strands Agents
SDK
The following example demonstrates how to create a simple weather tool using Strands Agents. Developers can quickly transform Python functions into agent-accessible tools with minimal code overhead and automatically generate appropriate documentation from the function's docstring.
#Example of a simple Strands native tool
@tool
def weather(location: str) -> str:
"""Get the current weather for a location""" #
Implementation here
return f"The weather in {location} is sunny."
For rapid prototyping or simple use cases, framework-native tools can accelerate development. However, for production systems, MCP tools provide better interoperability and future flexibility than framework-native tools.
The following table provides an overview of other framework-specific tools.
Framework |
Tool type |
Advantages |
Considerations |
---|---|---|---|
Function definitions |
Strong multi-agent support |
Microsoft ecosystem |
|
Python classes |
Large ecosystem of pre-built tools |
Framework lock-in |
|
Python functions |
Optimized for data operations |
Limited to LlamaIndex |