

# Tools
<a name="tools"></a>

AI agents deliver value by interacting with external tools, APIs, and data sources to perform useful tasks. The right tool integration strategy directly impacts your agent's capabilities, security posture, and long-term flexibility.

This section helps you navigate the tool integration landscape with a focus on open standards that maximize your freedom and flexibility. The section highlights the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) for tool integration and reviews framework-specific tools and specialized meta-tools that enhance agent workflows.

**In this section:**
+ [Tool categories](tool-categories.md)
+ [Protocol-based tools](protocol-based-tools-detailed.md)
+ [Framework-native tools](framework-native-tools-detailed.md)
+ [Meta-tools](meta-tools-detailed.md)
+ [Tool integration strategy](tool-integration-strategy.md)
+ [Security best practices for tool integration](security-best-practices-for-tool-integration.md)

# Tool categories
<a name="tool-categories"></a>

Building agent systems involves three main categories of tools.

## Protocol-based tools
<a name="protocol-based-tools"></a>

[Protocol-based tools](protocol-based-tools-detailed.md) use standardized protocols for agent-to-tool communication:
+ **MCP tools** – Open standard tools that work across frameworks with both local and remote execution options.
+ **OpenAI function calling** – Proprietary tools that are specific to OpenAI models.
+ **Anthropic tools** – A variation on OpenAI function calling for proprietary tools that are specific to Anthropic Claude models.

## Framework-native tools
<a name="framework-native-tools"></a>

[Framework-native tools](framework-native-tools-detailed.md) are built directly into specific agent frameworks:
+ **Strands Agents  tools** – Lightweight, quick-to-implement tools that are specific to the Strands Agents framework.
+ **LangChain tools** – Python-based tools that are tightly integrated with the LangChain ecosystem.
+ **LlamaIndex tools** – Tools that are optimized for data retrieval and processing within LlamaIndex.

## Meta-tools
<a name="meta-tools"></a>

[Meta-tools](meta-tools-detailed.md) enhance agent workflows without directly taking external actions:
+ **Workflow tools** – Manage agent execution flow, branching logic, and state management.
+ **Agent graph tools** – Coordinate multiple agents in complex workflows.
+ **Memory tools** – Provide persistent storage and retrieval of information across agent sessions.
+ **Reflection tools** – Enable agents to analyze and improve their own performance.

# Protocol-based tools
<a name="protocol-based-tools-detailed"></a>

When considering protocol-based tools, the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) provides the most comprehensive and flexible foundation for tool integration. As stated in the [AWS Open Source blog post on agent interoperability](https://aws.amazon.com/blogs/opensource/open-protocols-for-agent-interoperability-part-1-inter-agent-communication-on-mcp/), AWS has embraced MCP as a strategic protocol, actively contributing to its development.

The following table describes options for MCP tool deployment.


| 
| 
| **Deployment model** | **Description** | **Ideal for** | **Implementation** | 
| --- |--- |--- |--- |
| Local stdio-based | Tools run in the same process as the agent | Development, testing, and simple tools | Quick to implement with no network overhead | 
| Local server-sent events (SSE)-based | Tools run locally but communicate over HTTP | More complex local tools with separation of concerns | Better isolation but still low latency | 
| Remote HTTP Streamable | Tools run on remote servers | Production environments and shared tools | Scalable and centrally managed | 

The official MCP SDKs are available for building MCP tools: 
+ [Python SDK](https://github.com/modelcontextprotocol/python-sdk) – Comprehensive implementation with full protocol support
+ [TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk) – JavaScript/TypeScript implementation for web applications
+ [Java SDK](https://github.com/modelcontextprotocol/java-sdk) – Java implementation for enterprise applications

These SDKs provide the building blocks for creating MCP-compatible tools in your preferred language, with consistent implementations of the protocol specification. 

In addition, AWS has implemented MCP in the [Strands Agents SDK](https://aws.amazon.com/blogs/opensource/introducing-strands-agents-an-open-source-ai-agents-sdk/). The Strands Agents SDK provides a straightforward way to create and use MCP-compatible tools. Comprehensive documentation is available in the [Strands Agents GitHub repository](https://github.com/strands-agents). For simpler use cases or when working outside of the Strands Agents framework, the official MCP SDKs offer direct implementations of the protocol in multiple languages.

## Security features of MCP tools
<a name="security-features-of-mcp-tools"></a>

Security features of MCP tools include the following:
+ **OAuth 2.0/2.1 authentication** – Industry-standard authentication
+ **Permission scoping** – Fine-grained access control for tools
+ **Tool capability discovery** – Dynamic discovery of available tools
+ **Structured error handling** – Consistent error patterns

## Getting started with MCP tools
<a name="getting-started-with-mcp-tools"></a>

To implement MCP for tool integration, take the following actions:

1. Explore the [Strands Agents SDK ](https://strandsagents.com)for a production-ready MCP implementation.

1. Review the [MCP technical documentation](https://modelcontextprotocol.io/) to understand core concepts.

1. Use the practical examples described in this [AWS Open Source Blog](https://aws.amazon.com/blogs/opensource/introducing-strands-agents-an-open-source-ai-agents-sdk/) post.

1. Start with simple local tools before progressing to remote tools.

1. Join the [MCP community](https://github.com/modelcontextprotocol/modelcontextprotocol) to influence the protocol's evolution.

## Explore AgentCore Gateway
<a name="explore-gateway"></a>

[Amazon Bedrock AgentCore Gateway](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway.html) provides an easy and secure way for developers to build, deploy, discover, and connect to MCP tools, and other target endpoints at scale. With AgentCore Gateway, developers can convert APIs, AWS Lambda functions, and existing services into MCP-compatible tools. Then, with just a few lines of code, they can make these tools available to agents through AgentCore Gateway endpoints. AgentCore Gateway supports OpenAPI, Smithy, and Lambda as input types, and is the only solution that provides both comprehensive ingress authentication and egress authentication in a fully managed service.

# Framework-native tools
<a name="framework-native-tools-detailed"></a>

Although the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) provides the most flexible foundation, framework-native tools offer advantages for specific use cases.

The [Strands Agents SDK](https://strandsagents.com) offers Python-based tools characterized by their lightweight design that requires minimal overhead for simple operations. They enable quick implementation and allow developers to create tools with just a few lines of code. In addition, they're tightly integrated to work seamlessly within the Strands Agents framework.

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** | 
| --- |--- |--- |--- |
| [https://microsoft.github.io/autogen/docs/Use-Cases/agent_chat](https://microsoft.github.io/autogen/docs/Use-Cases/agent_chat) | Function definitions | Strong multi-agent support | Microsoft ecosystem | 
| [https://python.langchain.com/docs/concepts/tools/](https://python.langchain.com/docs/concepts/tools/) | Python classes | Large ecosystem of pre-built tools | Framework lock-in | 
| [https://docs.llamaindex.ai/en/stable/getting_started/starter_tools/](https://docs.llamaindex.ai/en/stable/getting_started/starter_tools/) | Python functions | Optimized for data operations | Limited to LlamaIndex | 

# Meta-tools
<a name="meta-tools-detailed"></a>

Meta-tools don't directly interact with external systems. Instead, they enhance agent capabilities by implementing agentic patterns. This section discusses workflow, agent graph, and memory meta-tools.

## Workflow meta-tools
<a name="workflow-meta-tools"></a>

Workflow meta-tools manage the flow of agent execution:
+ **State management** – Maintain context across multiple agent interactions
+ **Branching logic** – Enable conditional execution paths
+ **Retry mechanisms** – Handle failures with sophisticated retry strategies

Example frameworks with workflow meta-tools include [https://github.com/langchain-ai/langgraph](https://github.com/langchain-ai/langgraph) and [Strands Agents workflow capabilities](https://aws.amazon.com/blogs/opensource/introducing-strands-agents-an-open-source-ai-agents-sdk/).

## Agent graph meta-tools
<a name="agent-graph-meta-tools"></a>

Agent graph meta-tools coordinate multiple agents working together:
+ **Task delegation** – Assign subtasks to specialized agents
+ **Result aggregation** – Combine outputs from multiple agents
+ **Conflict resolution** – Resolve disagreements between agents

Frameworks like [https://microsoft.github.io/autogen/docs/Use-Cases/agent_chat](https://microsoft.github.io/autogen/docs/Use-Cases/agent_chat) and [https://github.com/crewAIInc/crewAI](https://github.com/crewAIInc/crewAI) specialize in agent graph coordination.

## Memory meta-tools
<a name="memory-meta-tools"></a>

Memory meta-tools provide persistent storage and retrieval:
+ **Conversation history** – Maintain context across sessions
+ **Knowledge bases** – Store and retrieve domain-specific information
+ **Vector stores** – Enable semantic search capabilities

MCP's resource system provides a standardized way to implement memory meta-tools that work across different agent frameworks.

# Tool integration strategy
<a name="tool-integration-strategy"></a>

Your choice of tool integration strategy directly impacts what your agents can accomplish and how easily your system can evolve. Prioritize open protocols like the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) while strategically using framework-native tools and meta-tools. That way, you can build a tool ecosystem that remains flexible and powerful as AI technology advances.

The following strategic approach to tool integration maximizes flexibility while meeting your organization's immediate needs:

1. **Adopt MCP as your foundation** – MCP provides a standardized way to connect agents to tools with strong security features. Start with MCP as your primary tool protocol for:
   + Strategic tools that will be used across multiple agent implementations.
   + Security-sensitive tools that require robust authentication and authorization.
   + Tools that need remote execution in production environments.

1. **Use framework-native tools when appropriate** – Consider framework-native tools for:
   + Rapid prototyping during initial development.
   + Simple non-critical tools with minimal security requirements.
   + Framework-specific functionality that leverages unique capabilities.

1. **Implement meta-tools for complex workflows** – Add meta-tools to enhance your agent architecture:
   + Start simple with basic workflow patterns.
   + Add complexity as your use cases mature.
   + Standardize interfaces between agents and meta-tools.

1. **Plan for evolution** – Build with future flexibility in mind:
   + Document tool interfaces independently of implementations.
   + Create abstraction layers between agents and tools.
   + Establish migration paths from proprietary to open protocols.

# Security best practices for tool integration
<a name="security-best-practices-for-tool-integration"></a>

Tool integration directly impacts your security posture. This section outlines best practices to consider for your organization.

## Authentication and authorization
<a name="authentication-and-authorization"></a>

Make use of the following robust access controls:
+ **Use OAuth 2.0/2.1** – Implement industry-standard authentication for remote tools.
+ **Implement least privilege** – Grant tools only the permissions they need.
+ **Rotate credentials** – Regularly update API keys and access tokens.

## Data protection
<a name="data-protection"></a>

To help safeguard data, adopt the following measures:
+ **Validate inputs and outputs** – Implement schema validation for all tool interactions.
+ **Encrypt sensitive data** – Use TLS for all remote tool communications.
+ **Implement data minimization** – Only pass necessary information to tools.

## Monitoring and auditing
<a name="monitoring-and-auditing"></a>

Maintain visibility and control by using these mechanisms:
+ **Log all tool invocations** – Maintain comprehensive audit trails.
+ **Monitor for anomalies** – Detect unusual tool usage patterns.
+ **Implement rate limiting** – Prevent abuse through excessive tool calls.

The Model Context Protocol (MCP) security model addresses these concerns comprehensively. For more information, see [Security considerations](https://modelcontextprotocol.io/docs/concepts/architecture#security-considerations) in the MCP documentation.