CertSafari
    Databricks Certified Context Engineer Associate· Lessons

    Domain 5 · Lesson 33/45

    Selecting a Unity Catalog Tool by Fit, Inputs, Outputs and Task Requirements

    Given a described agent task and a set of tools registered in Unity Catalog (with names, descriptions, and parameter schemas), identify the most appropriate tool and justify the selection based on functional fit, input/output compatibility, and task requirements.

    11 min read
    2.17% of exam
    5 sources
    Published 3 Oct 2026
    Docs as of 30 Sep 2026

    What you will be able to do

    • Choose between a Unity Catalog function, Genie, the Databricks SQL MCP server, AI Search and the code interpreter for a described task
    • Check that the agent can supply a tool's named, typed parameters and that the tool's output is what the next step needs
    • Factor execution and permission requirements into a tool selection and justify the choice on all three criteria

    1.Functional fit: does the tool do the job the task describes?

    The first criterion is whether the tool's purpose matches the kind of work the task asks for. Databricks is explicit about where Unity Catalog functions fit best. They are for structured data retrieval when the query is known ahead of time and the agent supplies the parameters. A function like lookup_customer_info(customer_name) fits that pattern. The SQL is fixed, and the agent only fills in a name.

    Many agent tasks don't have a fixed query, so you have to recognise when a different tool is the better fit.

    A Genie Agent covers up to 25 Unity Catalog tables and queries them in natural language. If the agent itself writes SQL and needs to run it through a SQL warehouse, the documentation points to the managed Databricks SQL MCP server instead of a custom tool. For unstructured documents, the AI Search MCP server queries an index. For arbitrary computation, there is the code interpreter.

    Matching the shape of a task to the tool Databricks documents for it
    Task shapeToolManaged MCP URL
    Fixed, repeatable query; agent supplies parametersUnity Catalog SQL or Python function/api/2.0/mcp/functions/{catalog}/{schema}
    Natural-language questions over up to 25 tablesGenie Agent/api/2.0/mcp/genie/{genie_space_id}
    Run AI-generated SQL through a SQL warehouseDatabricks SQL MCP server/api/2.0/mcp/sql
    Semantic search over documentsAI Search index/api/2.0/mcp/ai-search/{catalog}/{schema}/{index_name}
    Run Python code with no setupsystem.ai.python_exec/api/2.0/mcp/functions/system/ai

    Checkpoint 1 of 7· Check yourself

    A support agent must fetch a customer's ID and email given the customer's name, using the same query every time. Which tool is the documented best fit?

    Checkpoint 2 of 7· Exam question

    An agent powering a support dashboard needs to populate a KPI widget that displays a single number: the count of open support tickets in the "EMEA" region. Available Unity Catalog tools: - get_ticket_details(ticket_id: str) -> dict — returns full details for one ticket - count_open_tickets_by_region(region: str) -> int — returns the number of open tickets for a region - list_tickets_by_region(region: str) -> list[dict] — returns full ticket records for a region Which tool is the best selection for this task?

    Sources123

    2.Input/output compatibility: can the agent call it, and use what comes back?

    A tool can do the right job and still be the wrong choice if the agent can't supply its inputs. When an agent calls a Unity Catalog function, the DatabricksFunctionClient retrieves the function definition and validates the parameter names and types before execution. The call has to provide each declared argument by name, with a compatible value.

    Checkpoint 3 of 7· Fill the gap

    Complete the documented test call. Which keyword carries the named arguments that are validated against the function's schema?

    result = client.execute_function(
      function_name=f"{CATALOG}.{SCHEMA}.add_numbers",
       ? ={"number_1": 36939.0, "number_2": 8922.4}
    )

    This creates a practical test for selection: does the agent have, or can it get, every required input? The Databricks design-patterns guide uses a help desk agent that calls lookup_order(customer_id, order_id). If the user gives only a name, that tool can't be called yet, because nothing has produced a customer_id. The structured-retrieval version of lookup_customer_info closes that gap. Its COMMENT says it returns the customer's email and ID, and that the customer ID can be used for other queries. Read output descriptions this way. A tool is compatible when its output type and fields are what the next step consumes. In the example above, that means a STRING carrying an ID that feeds lookup_order.

    Checkpoint 4 of 7· Check yourself

    What does the DatabricksFunctionClient check before submitting a Unity Catalog function call for execution?

    Checkpoint 5 of 7· Exam question

    A retail assistant agent receives the request "Find the product with SKU SKU-99231." Two similarly named Unity Catalog tools are registered: - search_products_by_sku(sku: str) -> dict — looks up a single product by exact SKU code - search_products_by_keyword(query: str) -> list[dict] — performs a text search across product names and descriptions Which tool should the agent invoke?

    Sources142

    3.Task requirements: execution, permissions and context

    The third criterion covers whatever else the task demands beyond what the tool does and what it accepts. Three requirements appear in the documentation.

    Execution. Unity Catalog functions run as agent tools in serverless mode by default. That mode needs serverless generic compute (Spark Connect serverless), not serverless SQL warehouses. Without it, calls fail with errors like PERMISSION_DENIED: Cannot access Spark Connect.

    Permissions. Access to the Unity Catalog functions MCP server is governed by Unity Catalog permissions. An agent deployed as an app must be granted EXECUTE on the function.

    Granting an agent app EXECUTE on a Unity Catalog function in databricks.ymlyaml
    resources:
      apps:
        my_agent_app:
          resources:
            - name: 'my_uc_function'
              uc_securable:
                securable_full_name: '<catalog>.<schema>.<function-name>'
                securable_type: 'FUNCTION'
                permission: 'EXECUTE'

    Authentication and flexibility. Outside structured retrieval with a known query, Databricks recommends MCP servers or logic written directly in agent code. The reasons given are faster execution, per-user authentication support and more flexibility. If a task requires acting with each user's own identity, that recommendation favours MCP or in-code tools over a UC function.

    Conversation context. The managed Genie MCP server calls Genie as a tool, so conversation history isn't passed. If a task requires Genie to see the conversation so far, calling Genie as an agent in a multi-agent system can pass that context deterministically.

    Checkpoint 6 of 7· Check yourself

    A team has a serverless SQL warehouse but no serverless generic compute. Its agent's Unity Catalog function tool fails with PERMISSION_DENIED: Cannot access Spark Connect. What is the cause?

    Checkpoint 7 of 7· Exam question

    An agent workflow includes a downstream step that checks a boolean result to decide whether to notify a user that a record was removed. The task instruction is "Delete record REC-1120 and confirm it was removed." Available tools: - delete_record(record_id: str) -> bool — deletes a record and returns whether the deletion succeeded - archive_record(record_id: str) -> None — marks a record as archived without removing it - get_record_status(record_id: str) -> str — returns the current status string of a record Which tool satisfies both the requested action and the downstream requirement?

    Sources152

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.Every agent tool that touches Unity Catalog should be a Unity Catalog function.Why is that wrong?

      Databricks recommends UC functions for structured retrieval with a known query. For other cases it recommends MCP servers or in-code logic, and for open-ended table questions it recommends Genie.

      Covered in Functional fit: does the tool do the job the task describes?

    2. 2.A serverless SQL warehouse is enough compute to run Unity Catalog function tools.Why is that wrong?

      UC function tools run on serverless generic compute (Spark Connect serverless). Without it, calls fail with PERMISSION_DENIED.

      Covered in Task requirements: execution, permissions and context

    3. 3.A tool is a fit as long as it returns the right kind of data, whether or not the agent has its inputs yet.Why is that wrong?

      The client validates parameter names and types before execution. If a required input such as customer_id isn't available, another tool must produce it first.

      Covered in Input/output compatibility: can the agent call it, and use what comes back?

    Practise it for real

    List the tools on a managed Unity Catalog functions MCP server and call one using the exact name and arguments from its schema.

    1. 1.Run databricks auth login --host https://<workspace-hostname> and note the profile name (default DEFAULT).

      Why: The MCP client authenticates to your workspace with this OAuth profile.

      You should see: A saved profile you can pass to WorkspaceClient(profile=...).

    2. 2.In Python 3.12 or above, run pip install -U "mcp>=1.9" "databricks-sdk[openai]" "mlflow>=3.1.0" "databricks-agents>=1.0.0" "databricks-mcp".

      Why: databricks-mcp provides DatabricksMCPClient.

      You should see: Packages install without errors.

    3. 3.Create a DatabricksMCPClient for {host}/api/2.0/mcp/functions/system/ai and call list_tools().

      Why: This shows each tool's name, description and input schema, which is the contract you select from.

      You should see: A list of tool names that includes system__ai__python_exec.

    4. 4.Call mcp_client.call_tool("system__ai__python_exec", {"code": "print('Hello, world!')"}) and print result.content.

      Why: This confirms that the call has to match the tool name and argument names in the listed schema.

      You should see: Output containing Hello, world!

    Stuck? Get a nudge

    If the call fails, check that serverless compute is enabled in the workspace; managed system.ai tools need it.

    Sources

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “when the query is known ahead of time and the agent provides the parameters”
      ↩︎ Functional fit: does the tool do the job the task describes?
      “extracts the function definition and validates the parameter names and types.”
      ↩︎ Input/output compatibility: can the agent call it, and use what comes back?
      “Unity Catalog functions executed as agent tools require serverless generic compute (Spark Connect serverless), not serverless SQL warehouses.”
      ↩︎ Task requirements: execution, permissions and context
      “Databricks recommends MCP servers or defining the logic directly in agent code for faster execution, per-user authentication support”
      ↩︎ Task requirements: execution, permissions and context
      “Databricks recommends MCP servers or defining the logic directly in agent code for faster execution, per-user authentication support”
      ↩︎ Exam trap 1
      “Unity Catalog functions executed as agent tools require serverless generic compute (Spark Connect serverless), not serverless SQL warehouses.”
      ↩︎ Exam trap 2
      “validates the parameter names and types”
      ↩︎ Exam trap 3
    2. 2.
      “A Genie Agent is a collection of up to 25 Unity Catalog tables that Genie can keep in context and query using natural language.”
      ↩︎ Functional fit: does the tool do the job the task describes?
      “run AI-generated SQL against Unity Catalog tables through a SQL warehouse”
      ↩︎ Functional fit: does the tool do the job the task describes?
      “When you call Genie as an agent, you can deterministically pass in existing conversation context to Genie.”
      ↩︎ Task requirements: execution, permissions and context
      “If your agent needs to query data in Unity Catalog tables, Databricks recommends using Genie Agents.”
      ↩︎ Prediction
      “when the query is known ahead of time and the agent provides the parameters”
      ↩︎ Checkpoint
    3. 3.
      “Use the Databricks-managed AI Search MCP server to give your agent access to a Databricks AI Search index.”
      ↩︎ Functional fit: does the tool do the job the task describes?

    Ready to test yourself?

    Practise Databricks Certified Context Engineer Associate in quiz mode.

    Spotted a mistake, or was something unclear? Tell us.