MCP Toolbox for Databases on the Professional Agentic Architect Exam

GCP Study Hub
November 15, 2026

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.

Prebuilt tools and the custom tools framework

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:

  • A source
  • A description
  • Typed parameters
  • A fixed SQL statement

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.

Sharing database tools across ADK agents

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.

Why fixed statements matter for database access

The custom tools framework addresses the risks of open-ended SQL. Two common patterns show those risks clearly:

  • The prebuilt execute_sql tool lets an agent run any SQL statement, so on its own it cannot hold an agent to an approved set of queries.
  • A function tool that constructs SQL strings directly from a model's output invites SQL injection, and because each agent carries its own copy of that logic, query handling ends up duplicated across every agent that needs access.

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.

Get tips and updates from GCP Study Hub

arrow