Skip to content
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.

Published on 2026-03-23

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:

  • Implementation Language: Pure Rust.
  • Integration: You explicitly add individual tool instances to your LlmAgentBuilder.
  • Discovery: Statically defined. The agent knows exactly what tools it has at compile time (or agent creation time).
  • Best For:
    • Internal database queries using a specific Rust ORM.
    • Proprietary calculations or logic unique to your app.
    • High-performance tasks that benefit from being “local” to the agent’s process.

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:

  • Implementation Language: Anything! (Python, Node.js, Go, etc.) as long as it speaks MCP.
  • Integration: You connect your agent to an MCP Server using an McpToolset.
  • Discovery: Dynamic. The agent “asks” the server what tools are available at runtime. You don’t need to know the tools beforehand.
  • Best For:
    • Integrating with existing services like GitHub, Slack, or Google Drive.
    • Accessing a broad ecosystem of pre-built tools without writing the logic yourself.
    • Distributed systems where tools live on separate servers or containers.

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.