
Connecting production agents to databases such as Cloud SQL for PostgreSQL raises two recurring architectural needs: managing database connections and authentication cleanly, and limiting what queries an agent is allowed to run. MCP Toolbox for Databases addresses both by giving agents governed access to databases while handling connection pooling and IAM-integrated authentication to the database itself.
On the Professional Agentic Architect exam, the main distinction within MCP Toolbox for Databases is between prebuilt tools and the custom tools framework. Toolbox offers prebuilt tools, including execute_sql, which lets an agent run any SQL statement. That open-ended access is unsuitable whenever a security policy allows only specific queries.
When agents must be restricted to specific queries, Toolbox provides a custom tools framework, which Google describes as the way to build restricted, structured database tools for production agents. Each custom tool is defined in a tools.yaml file, for example as a postgres-sql tool, with four elements:
With those definitions in place, agents can run only those fixed statements, with only their typed parameters. Because the SQL statement is fixed in tools.yaml rather than generated dynamically, agents stay within the permitted queries.
In architectures where several ADK agents need the same database queries, keeping query definitions in one place avoids duplicating logic across agents. MCP Toolbox for Databases lets you group custom tools into a toolset so that every agent loads and reuses the same set of tools.
ADK can load Toolbox tools in a few lines of code, keeping agent implementations concise while Toolbox handles connection pooling and IAM-integrated authentication directly.
The custom tools framework addresses the risks of open-ended SQL. Two common patterns show those risks clearly:
Fixed statements with typed parameters remove both problems. The model can choose which approved tool to call and supply values for its parameters, but it cannot change the SQL itself. Defining those tools once in tools.yaml and sharing them through a toolset keeps that guarantee consistent across ADK agents, while Toolbox handles connection pooling and IAM-integrated authentication to the database.
Our Professional Agentic Architect practice exams test MCP Toolbox for Databases alongside ADK tool integration and function tools, with detailed explanations that drill these distinctions.