Skip to main content
Back to your support agent. You write a Python function that looks up a customer’s order, and the agent can call it. That works great — until the agent needs to search the web, rate a Jira ticket, query a payment system, or work with a service that already exposes hundreds of API operations. Do you really need to write a Python wrapper for every one of those operations? No — there are easier, standardized ways to expose existing tools to your agent.
A dark-themed diagram titled "Tools Your Agent Needs" with a central "Agent" box connected by Python "wrapper" blocks to icons for Web search, Jira, Payments and a Service (312 operations). A user avatar labeled "You" is shown linked to the agent.
Most tools your agent needs already exist; you only need a way to connect to them. One common approach is an OpenAPI specification. What is OpenAPI?
  • OpenAPI is a single machine-readable file (JSON or YAML) that describes every operation a REST API supports.
  • A REST API is a web service your code talks to over HTTP — the same protocol your browser uses.
Example OpenAPI (YAML):
Why OpenAPI helps agents
  • A complete OpenAPI spec turns every documented endpoint into a callable tool without writing custom wrappers.
  • Tools like ADK’s OpenAPIToolset can ingest the spec and expose each operation directly to the model as an actionable tool.
Example: turn an OpenAPI spec into agent tools
If your organization already publishes an OpenAPI spec, prefer generating tools from the spec rather than hand-coding clients. This speeds development and reduces surface-area errors. For official doc reference, see the OpenAPI Specification: https://swagger.io/specification/
What if the provider isn’t a REST API? That’s where MCP (Model Context Protocol) fits. MCP explained
  • MCP is a protocol and common language between an agent and an external tool provider — similar to how device drivers standardize access to hardware.
  • Any tool provider that implements MCP can plug into any agent that speaks MCP, with no extra glue code.
  • The MCP server typically runs a small program (often on the same machine or a reachable host). The agent and server exchange structured messages (JSON, etc.) over a transport such as HTTP or WebSocket.
Example conceptual flow for MCP (illustrative):
Note how the filter limits the agent to list_directory and read_file only — a simple but important security habit. Don’t connect a server and blindly hand over every capability to the model.
A UI mockup titled "Filter Tools as a Security Habit" showing a permissions panel for "company-files" where list_directory and read_file are allowed while write_file, delete_file, and execute are disabled. An arrow points to an Agent icon and an "Agent tools" box listing the two permitted tools.
Google’s pre-built tools
  • In addition to OpenAPI and MCP, Google ships pre-built ADK tools (for example, Google Search) that you can attach to an agent without implementing HTTP calls or parsing results yourself.
Example:
Summary — three ways to give your agent external capabilities
A dark-themed diagram titled "Three Doors Out" showing three stylized doors labeled "OpenAPI spec," "MCP server," and a plain door icon. Below them is an "Agent" icon and an "Agent tools" bar with a highlighted "create_payment" button.
Security and safety considerations
  • Powerful tools can be dangerous. Reading a file may be harmless; cancelling an order or issuing refunds is not.
  • Apply the principle of least privilege: only expose the operations an agent truly needs.
  • Add logging, approval workflows, and human-in-the-loop checks for risky actions.
  • Use agent-side filters to restrict available operations and consider rate limits, audit trails, and explicit confirmation steps for high-risk endpoints.
Apply least privilege and safe approval flows when exposing powerful operations to models. Limit tools to the minimum needed and require human authorization for risky actions.
Further reading and references

Watch Video