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.
| Task shape | Tool | Managed MCP URL |
|---|---|---|
| Fixed, repeatable query; agent supplies parameters | Unity Catalog SQL or Python function | /api/2.0/mcp/functions/{catalog}/{schema} |
| Natural-language questions over up to 25 tables | Genie Agent | /api/2.0/mcp/genie/{genie_space_id} |
| Run AI-generated SQL through a SQL warehouse | Databricks SQL MCP server | /api/2.0/mcp/sql |
| Semantic search over documents | AI Search index | /api/2.0/mcp/ai-search/{catalog}/{schema}/{index_name} |
| Run Python code with no setup | system.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?
The query is known in advance and only the name changes. That is exactly the case where Databricks recommends a Unity Catalog function.
“when the query is known ahead of time and the agent provides the parameters”Source: docs.databricks.com
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?
Correct answer: A — count_open_tickets_by_region, because its region parameter matches the task input and its integer return matches the single count the widget needs
- A. Correct. The task requires exactly one integer count for a given region. count_open_tickets_by_region takes the region as input and returns that integer directly, giving the closest input/output match with no extra processing or unrelated context.
- B. Incorrect. list_tickets_by_region would work indirectly, but it pulls full ticket records into context and forces the agent to perform extra counting logic, when a tool already returns the exact value needed.
- C. Incorrect. get_ticket_details requires a specific ticket_id, not a region, so its input does not match what the task provides and it cannot answer an aggregate question.
- D. Incorrect. Returning more fields is not an advantage here; it adds irrelevant data to context and does not match the scalar output the task requires.
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}
)execute_function takes a fully qualified function_name plus a parameters dictionary keyed by the declared argument names.
Source: docs.databricks.comThis 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.
lookup_customer_info goes first. lookup_order requires a customer_id, and the user supplied only a name. The first tool's documented output includes the customer ID, which then satisfies lookup_order's input schema.
Checkpoint 4 of 7· Check yourself
What does the DatabricksFunctionClient check before submitting a Unity Catalog function call for execution?
The client extracts the function definition and validates parameter names and types. An agent that can't supply correctly named, typed inputs can't use the tool.
“extracts the function definition and validates the parameter names and types.”Source: docs.databricks.com
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?
Correct answer: A — search_products_by_sku, because the task supplies an exact SKU code, which matches this tool's required input type and purpose
- A. Correct. The task provides an exact SKU value, and search_products_by_sku's parameter and description are purpose-built for that exact-match input, making it the correct functional and input/output fit.
- B. Incorrect. Relying on a keyword search to incidentally match a SKU is unreliable and not the tool's intended purpose; a dedicated exact-match tool exists and should be preferred.
- C. Incorrect. Registration order in Unity Catalog has no bearing on which tool is functionally appropriate for a given task.
- D. Incorrect. Returning more results is not inherently more useful; the task asks for one specific product, so a tool returning a single matching dict is the better output match.
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.
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?
Serverless execution of UC function tools runs on Spark Connect serverless. A SQL warehouse does not satisfy that requirement.
“Unity Catalog functions executed as agent tools require serverless generic compute (Spark Connect serverless), not serverless SQL warehouses.”Source: docs.databricks.com
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?
Correct answer: A — delete_record, because it performs the requested deletion and its boolean return directly supports the downstream success check
- A. Correct. The task explicitly requests deletion, and delete_record both performs that action and returns a bool the downstream step can consume directly, satisfying functional fit and output compatibility together.
- B. Incorrect. Archiving does not remove the record as the task requires, and it returns None, which cannot feed the boolean check the downstream step needs.
- C. Incorrect. get_record_status only reads a status string; it performs no deletion at all, so it fails the core task requirement even though it returns useful data.
- D. Incorrect. Ruling out tools by return type alone, without checking whether the tool performs the requested action, is not a valid selection justification.
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
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.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.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.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.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.Create a DatabricksMCPClient for
{host}/api/2.0/mcp/functions/system/aiand calllist_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.Call
mcp_client.call_tool("system__ai__python_exec", {"code": "print('Hello, world!')"})and printresult.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.
“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.
“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?“customer ID can be used for other queries.”
↩︎ Input/output compatibility: can the agent call it, and use what comes back?“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.
“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? - 4.
“the agent might call a function lookup_order(customer_id, order_id)”
↩︎ Input/output compatibility: can the agent call it, and use what comes back? - 5.
“with access governed by Unity Catalog permissions”
↩︎ Task requirements: execution, permissions and context