Blog

FunctionTools vs. McpTools in ADK-Rust: Which Should You Use?

Understand the differences between custom Rust FunctionTools and standardized MCP tools for extending your AI agents.

Posted on: 2026-03-23 by AI Assistant


When building AI agents with ADK-Rust, one of the most important decisions you’ll make is how to extend their capabilities. Should you write custom Rust functions as FunctionTools, or should you leverage the growing ecosystem of McpTools?

While both allow your agents to interact with the outside world, they differ significantly in their implementation, discovery, and scope. Let’s break down the key differences.

1. Function Tools: The Custom Approach

FunctionTools are custom Rust functions that you define directly within your application. You write the logic, and you have full control over how the tool behaves.

Key Characteristics:

2. McpTools: The Standardized Ecosystem

McpTools rely on the Model Context Protocol (MCP), an open standard that lets LLMs communicate with external services regardless of what language they were written in.

Key Characteristics:

Comparison at a Glance

FeatureFunction Tools (Custom)MCP Tools
OriginDefined in your Rust codeExposed by external MCP servers
DiscoveryStatic (at creation)Dynamic (at runtime)
ControlFull control over logicRely on server-side implementation
ComplexityMore “boilerplate” per toolOne-time setup for many tools
EcosystemLimited to your codeThousands of available servers

Which Should You Choose?

Choose FunctionTools if…

…you need maximum performance and full control over the tool’s implementation. If your tool is doing something very specific to your application’s domain and you’re already working in Rust, this is the way to go.

Choose McpTools if…

…you want to leverage existing integrations or if the tool logic is better suited for another language like Python. MCP is ideal for building modular, scalable agent systems that can grow by simply connecting to new servers.

Conclusion

The beauty of ADK-Rust is that you don’t have to pick just one! You can equip a single agent with a mix of high-performance local FunctionTools and versatile, remote McpTools. This hybrid approach gives you the best of both worlds: custom precision and ecosystem-wide reach.