Tool Selection, Tool Descriptions, Tool Outputs
Databricks Context Engineer Associate · Lesson 13 of 18 · 1:37:38
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
Learning with these videos? Subscribe for new courses and exam-style questions.
Subscribe on YouTube (opens in a new tab)In this lesson
Prepare for the Databricks Certified Context Engineer Associate exam. In this lesson: choosing a Unity Catalog tool by functional fit, inputs and outputs, and task requirements, finding the overlap between two confusing MCP tool descriptions, writing distinct descriptions, and clearing raw tool outputs. Includes three original practice questions.
Study notes
The text of this lesson, to read at your own pace. Information as of November 2026.
The wrong tool, half the time
Thistledown's maintenance agent has two tools in Unity Catalog, one to get work orders, and one to search them. It calls the wrong one half the time, and its context fills with raw outputs from calls it finished an hour ago. This lesson covers choosing the right tool, finding the overlap in tool descriptions, and clearing raw tool outputs.
Choosing the right tool
On Databricks, an agent's tools often live in Unity Catalog, as governed functions, served to the agent directly, or through managed MCP servers for Unity Catalog functions, Genie Agents, AI Search, and SQL. The model sees each tool's name, its description, and its parameter schema, taken from the comments on the function and its parameters. To pick a tool for a task, check its functional fit first: does it do what the task needs, at the right scope? Then check input and output compatibility: can the agent supply every required parameter, in the right type, and does the result have the shape the next step expects? And check the task's requirements, like freshness, permissions, and how many rows it must return.
Overlapping descriptions
When an agent keeps confusing two tools, compare their descriptions side by side. Overlap usually hides in shared verbs and nouns, like find and work orders, in vague scopes, like any request, and in parameters that both accept, like a free text query. If both descriptions could honestly claim the same request, the model has no basis to choose, and a human reading them would hesitate too. So the fix is to remove the overlap, not to add a warning to the system prompt.
Writing distinct descriptions
Make each description say what the tool does, when to use it, and when not to, naming the other tool. Give each tool a distinct input: an exact ID for the lookup, and free text for the search. Name tools by their action and object, like get work order by ID, and search work orders by text, and merge tools that truly do the same job. Then test with real requests, and check in the traces that each one goes to the expected tool.
Clearing raw tool outputs
As a long session grows, raw tool outputs often take most of the context: full query results, long documents, and verbose logs. Once the agent has used a result, and kept what it learned, the raw output is a good candidate for clearing. Good candidates are old results already summarized, results replaced by a newer call, and large outputs from exploratory calls that led nowhere. Keep the results that a pending step still needs, and keep the decisions and facts drawn from every result. Clearing raw outputs is one of the safest ways to free space, since the agent can call the tool again if it needs the details.
Recap
Let's recap. Unity Catalog tools reach the model as a name, a description, and a parameter schema. Pick a tool by functional fit, input and output compatibility, and the task's requirements. When two tools get confused, find the overlap in their descriptions, and remove it. Describe what, when, and when not, with distinct inputs and clear names. And clear raw tool outputs that were already used, while keeping pending results and decisions.
Quick checks for this lesson
The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.
Task: how many work orders are open in Elm Court since Monday? Which tool in Unity Catalog fits best?
- search_work_orders(text): ten similar orders
- get_work_order(id): one order by its ID
- list_buildings(): every building name
- count_open_orders(building_id, since): a count
Show the answer
count_open_orders(building_id, since): a count
The count open orders function fits the task, takes exactly the building and the date, and returns the count the manager wants. “search_work_orders(text): ten similar orders” is wrong, since a similarity search returns ten orders, not a reliable count. “get_work_order(id): one order by its ID” is wrong, since it needs a work order ID that the task does not have, and returns a single order. And “list_buildings(): every building name” is wrong, since a list of buildings does not count any work orders.
Two tools keep getting confused. The first “returns tenant information for a query”, the second “looks up tenant details from a query”. What causes the confusion?
- Both claim the same job, with the same input
- The tool names are too long
- The reasoning effort of the model is too low
- The tools sit in the same Unity Catalog schema
Show the answer
Both claim the same job, with the same input
Both descriptions claim the same job, with the same vague query, so neither tells the model when to choose it. “The tool names are too long” is wrong, since long names are not the problem, the overlapping descriptions are. “The reasoning effort of the model is too low” is wrong, since more reasoning cannot separate two tools that claim the same job. And “The tools sit in the same Unity Catalog schema” is wrong, since sharing a schema does not make tools ambiguous.
The context is nearly full, in a deep session about the Elm Court repairs. Which item is the best candidate for clearing?
- The tenant’s request for this session
- The decision to book Tuesday’s repair
- Raw JSON of a building search, already summarized
- The work order the next step will change
Show the answer
Raw JSON of a building search, already summarized
The raw search output was already used and summarized, so clearing it frees space without losing anything the agent needs. “The tenant’s request for this session” is wrong, since the tenant's request defines the task. “The decision to book Tuesday’s repair” is wrong, since decisions must survive, or the agent may contradict itself later. And “The work order the next step will change” is wrong, since a pending step still needs that work order.