What you will be able to do
- Explain why connecting an MCP server with no filtering turns into a raw dump of every tool schema, and what that costs on each model call.
- Design a staged discovery flow: narrow the connected servers and tools, list lightweight names and descriptions, and load a full input schema only for a tool the agent is about to call.
- Tell staged discovery apart from changes that look similar but are not progressive disclosure, such as splitting tools across servers, shortening descriptions loaded at startup, or fine-tuning.
- Keep tool execution context-efficient by presetting deterministic parameters and processing bulky data outside the model's context.
Key concept
Staged tool discovery — The agent sees a small, cheap view of its tools first, usually names and short descriptions, and pulls a tool's full input schema into context only once it has decided to call that tool. Token cost then grows with the tools the agent actually uses, not with the number of tools it could reach.
1.From a raw tool dump to staged discovery
Progressive disclosure for MCP tools means the agent gets tool information in stages, each one only as detailed as the next decision needs. The alternative is the raw tool dump: every tool from every connected server goes into the request in full, on every turn. Every definition loaded upfront costs tokens and attention before the agent has done any work. That cost is covered in Upfront tool-schema cost. On Databricks the dump is the default, not an edge case. A registered MCP server exposes all of its tools unless someone restricts them, so connecting a server is enough to put every one of its schemas in front of the model.
The common agent loop shows how this happens. The tool list is built once from the server, and then the full spec of every tool is passed again on each model call in the loop. If an agent can reach 300 tools and calls three of them in a session, it still pays for all 300 definitions on every turn.
response = model_client.chat.completions.create(
model="databricks-claude-sonnet-4-5",
messages=messages,
tools=[tool.spec for tool in tools_by_name.values()],
)Staged discovery replaces the dump with three steps. First, narrow which servers are connected and which of their tools are exposed. Second, give the agent a lightweight index of the remaining tools, such as names and one-line descriptions, or a search step that returns them. Third, load a tool's full input schema only when the agent is about to call it. The agent still has access to every tool. What changes is when the detailed definitions enter the context.
Several redesigns look like progressive disclosure but are not. Shortening every description and loading the short versions at startup still loads everything upfront, only smaller. It also leaves the agent without the parameter detail it needs to build a valid call, so that detail has to arrive before the call, not in the tool's response. Putting schemas into fine-tuning data takes away the agent's ability to discover tools at run time and goes stale as soon as a server changes. Splitting the tools across more servers changes where the tools live, but whatever the agent connects to still arrives in full.
Checkpoint 1 of 8· Fill the gap
This tool-calling loop makes a model call on every turn. Which attribute makes it a raw tool dump, sending each discovered tool's full definition on every call?
response = model_client.chat.completions.create(
model="databricks-claude-sonnet-4-5",
messages=messages,
tools=[tool. ? for tool in tools_by_name.values()],
)The loop passes tool.spec, the full specification, for every tool in tools_by_name on each model call. That means the agent pays for every definition on every turn, even for tools it never calls. This is the raw-dump pattern that staged discovery replaces.
Checkpoint 2 of 8· Check yourself
To cut token cost, a team splits one 300-tool MCP server into six registered servers of 50 tools each. Tool selection is left at its default. Their agent connects to all six, uses the loop above, and calls only 3 tools in a session. How many tool definitions are in each model call?
Splitting the tools changes which server holds them, not when their details enter context. Each registered server exposes all of its tools unless someone restricts them, so all 300 definitions still go into every call.
“Registered MCPs expose all server tools by default.”Source: docs.databricks.com
Checkpoint 3 of 8· Exam question
A context engineer is redesigning tool access for an agent that previously received full definitions for 300 MCP tools in every system prompt. To apply progressive disclosure, which staged-discovery pattern should the engineer implement?
Correct answer: A — Expose a lightweight discovery step (e.g., listing/searching tool names/summaries) and allow the agent to fetch a tool's full schema only when it deems that tool relevant.
- A. Correct. This pattern directly implements progressive disclosure by providing a cheap, initial index of tool names or summaries, drastically reducing initial context size. The full schema is retrieved only when the agent identifies a relevant tool, conserving context window tokens and aligning with staged discovery principles.
- B. Incorrect. Partitioning tools across servers and adding authentication addresses access control, not progressive disclosure. After authentication, the agent still receives all tools from a server at once, failing to reduce the initial context load or implement on-demand schema retrieval.
- C. Incorrect. Embedding schemas in model weights via fine-tuning eliminates runtime context tokens, but it is not a staged discovery mechanism. The model would not dynamically fetch tool definitions on demand; rather, it relies on static, pre-trained knowledge, missing the essential progressive disclosure pattern of runtime tool exploration.
- D. Incorrect. Compressing descriptions into abbreviations still sends all tools' identifiers at startup, effectively dumping them into the initial context. Expanding on invocation does not prevent the upfront token cost for every tool, whereas progressive disclosure requires a selective discovery step (like searching) before any full schemas are loaded.
Sources1
2.Stage one: connect fewer servers and filter their tools
The first stage happens before the agent sees any tool. The general principle is covered in Minimal tool sets. For MCP it means two controls: connect only the servers this task needs, and limit each server to the tools the task can use. Each connected server adds its whole tool surface to what the agent carries, so a server attached "in case" costs tokens on every turn whether or not it is used. Genie Code's consumption guidance makes the same point and tells users to turn off servers a chat doesn't need.
Tool selection is the filter for each server. When an MCP is registered in Unity Gateway, you can pick tools individually or by exact names and prefixes such as get_*. You can also leave off the option that automatically includes tools added to the server later. Exclusion patterns such as !delete_* are not supported, so a filter lists what to keep, not what to drop. Unselected tools are removed from tools/list, and any call to one is rejected. To change the selection later, update config.include_tool_selectors. An empty list exposes every tool again, which takes you back to the raw dump.
Checkpoint 4 of 8· Check yourself
An admin is registering a 300-tool MCP server in Unity Gateway. The agent only needs the read tools, and every one of their names starts with get_. Which tool-selection setup exposes only those tools?
Tool selection lists what to keep, by exact names or prefixes such as get_*. Leaving auto-include off stops new tools from slipping in. An empty selector list exposes every tool again, and exclusion patterns like !delete_* are not supported.
“Choose Advanced to enter exact names or prefixes such as get_*.”Source: docs.databricks.com
3.Stages two and three: list lightweight summaries, fetch schemas on demand
MCP already makes the tool surface discoverable at run time, so staging it is a design choice, not a workaround. Calling tools/list, or list_tools() on a DatabricksMCPClient, returns three levels of detail for each tool: a name, a description, and an input schema. Databricks recommends discovering tools this way instead of hardcoding names or argument shapes, because each MCP Service exposes a different set. These three fields are also what you split into stages.
tools = mcp_client.list_tools()
for tool in tools:
print(tool.name, tool.description, tool.inputSchema, sep="\n")The basic staged pattern runs this listing in your agent code and keeps the full result out of the prompt. The model gets a discovery capability instead, such as a tool that lists or searches the available tools and returns names and summaries. When one looks relevant, the model asks for that tool's full schema, which the agent code then adds to the tool list for the next call. Everything else stays out of context.
The saving comes from one property: context holds only the schemas the current task needs. A session that calls one Salesforce tool pays for one Salesforce schema, not for the whole server. The efficiency does not come from caching, a special schema format, or skipping authentication. Remove the on-demand step and the saving disappears.
A discovery tool can go further and let the agent choose how much detail it gets back: just names, names with short descriptions, or the full input schema. This sets the price of each decision. A name or one-line summary is usually enough to rule a tool out. The larger cost of a full schema is paid only after the agent has committed to calling that tool. This does not guarantee a correct choice, though. Tools with overlapping descriptions still get confused, which is a separate problem.
| Stage | Mechanism | What the model sees |
|---|---|---|
| 1. Narrow | Connect only needed servers; restrict tools with config.include_tool_selectors | Nothing yet. Unselected tools never appear in tools/list |
| 2. List or search | Agent code calls list_tools(); the model gets a discovery step returning name and description | Short summaries for candidate tools |
| 3. Fetch | Agent code adds the chosen tool's inputSchema to the next model call | One full schema, for the tool about to be called |
Staging changes the context, not the security model. Whether a tool was listed upfront or found by search, the call still goes through Unity Gateway. The gateway checks that the caller has EXECUTE on the MCP Service, exposes only the selected tools, and applies any attached service policy. A discovery step cannot pre-authorize tools, skip the per-call permission check, or let the agent call the underlying API directly based on something it read in a description.
Checkpoint 5 of 8· Match them up
Your agent finds tools with a search step and then calls one of them through Unity Gateway. Match each piece of the setup to the job it does.
Tap a term, then the definition that fits it.
Staged discovery only changes what is in context. Every call still goes through Unity Gateway, which checks EXECUTE, exposes only the selected tools and applies any service policy, so a search step cannot pre-authorize a tool or skip the per-call permission check.
“Authorize and govern: The gateway checks that the caller has EXECUTE on the MCP Service in Unity Catalog.”Source: docs.databricks.com
Checkpoint 6 of 8· Exam question
A team benchmarks two approaches for an agent that must occasionally use one tool from a Salesforce MCP server after already working with a Google Drive MCP server: (1) loading full definitions for both servers' tools at session start, and (2) using a search-based discovery step that only pulls the Salesforce tool's schema when needed. Approach (2) uses dramatically fewer tokens. What underlying property of progressive disclosure explains this result?
Correct answer: A — Only the schemas relevant to the current task are pulled into context, so token cost scales with actual usage, a core property of progressive disclosure that explains the result.
- A. Correct. Progressive disclosure ensures that only schemas relevant to the current task are loaded into context, meaning token cost scales with actual tool usage rather than the total catalog size. This explains why the search-based approach dramatically reduces tokens when only one Salesforce tool is needed among many from both servers.
- B. Incorrect. Indexing tool schemas into a vector database for fast retrieval is an implementation choice, not the underlying property that explains the token savings. The savings in approach (2) result from avoiding loading unused schemas into context, not from caching or eliminating reloads.
- C. Incorrect. Schema compactness is a server-specific detail and not a general property guaranteed by the MCP protocol. The token savings here are due to progressive disclosure, not because one server's schemas are smaller; the key is that unused schemas aren't loaded at all.
- D. Incorrect. OAuth handshakes handle authentication and are negligible compared to the token cost of loading large tool definitions. Approach (2) saves tokens primarily by omitting unused schemas, not by avoiding authentication overhead.
Checkpoint 7 of 8· Exam question
An engineer implements a search_tools capability that lets the agent request just a tool's name, just its short description, or its complete input schema, depending on what the agent needs at that moment. What progressive-disclosure benefit does this granular detail-level control add beyond basic staged discovery?
Correct answer: A — It lets the agent spend the fewest tokens needed to judge relevance first and only pay the larger cost of a full schema once it has committed to using that tool.
- A. Correct. This design lets the agent request only the minimal information (name and/or short description) to judge relevance, avoiding upfront full-schema retrieval. Full input schemas are fetched only once the agent has committed to a tool, conserving tokens during the search phase.
- B. Incorrect. Granular tool search detail does not alter the authorization model; Unity Catalog permission checks are still performed per tool invocation regardless of how much description is retrieved during discovery.
- C. Incorrect. While fetching only tool names or short descriptions helps the agent narrow down candidates, it does not guarantee correct tool selection. The agent may still misinterpret names or lack full understanding without the schema, but the approach reduces ambiguity, not eliminates it.
- D. Incorrect. Progressive disclosure only controls what information the MCP server sends about tools; all tool invocations still go through the MCP server. The agent cannot bypass the server and call underlying APIs directly based on the search results.
4.Context-efficient execution: lean inputs, results instead of raw data
Discovery controls what tool definitions cost. Execution controls what each call costs, in the arguments the model writes and the output it reads back. Both add up turn after turn, so a well-staged agent can still fill its context if every call sends large inputs and returns raw data.
Keep tool inputs lean by taking out anything the model doesn't need to decide. Databricks managed MCP servers split parameters into two kinds. Tool call arguments are what the model generates from the user's request. _meta parameters are configuration you preset in agent code to set behavior deterministically. Anything that never changes between calls belongs in _meta or in code. Then the model doesn't spend output tokens repeating it, and can't get it wrong. Which _meta parameters a server supports is listed on that server's own page.
Process bulky data outside the context and return only the result. When a task means filtering, joining, or aggregating a large intermediate dataset, pasting that data into the conversation for the model to read is the expensive way to do it. A better pattern is for the agent to send code to an execution tool and read back only the answer. The system.ai.sandbox MCP runs Python, SQL, or shell code in an isolated environment. Databricks' own example connects an agent to it and asks: "Run Python code to calculate the mean of [12, 18, 24]." The agent discovers the sandbox's tools, runs the Python there, and returns the mean, 18, so the model gets one number back instead of the work behind it. The same applies to SQL: the model should see an aggregate, not the rows it was computed from.
Run the aggregation where the data lives, for example a SQL query through the Databricks SQL server or code in the sandbox MCP, and return only the per-region counts to the model. The 40,000 rows never enter the context. Neither does any schema for tools the agent did not need.
Checkpoint 8 of 8· Match them up
A staged agent runs AI Search queries with the same index settings every time, and some tasks need large intermediate tables. Match each mechanism to the cost it controls or the job it does.
Tap a term, then the definition that fits it.
The model should write only what changes with the user's request. Fixed settings belong in _meta parameters preset in agent code. Bulky data should be processed in an execution tool such as the sandbox, which returns only the result. Staged discovery is a separate saving: it cuts the cost of tool definitions, not the cost of each call's inputs and outputs.
“_meta parameters: Configuration parameters that you can preset in your agent code to set behavior deterministically”Source: docs.databricks.com
Sources
(6)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“Registered MCPs expose all server tools by default.”
↩︎ From a raw tool dump to staged discovery“Unselected tools don't appear in tools/list, and calls to them return Tool not allowed by MCP service configuration.”
↩︎ Stage one: connect fewer servers and filter their tools“To change tool selection later, update the MCP configuration with config.include_tool_selectors.”
↩︎ Stage one: connect fewer servers and filter their tools“Registered MCPs expose all server tools by default.”
↩︎ Exam trap 1“Choose Advanced to enter exact names or prefixes such as get_*.”
↩︎ Checkpoint - 2.
“Each connected MCP server adds its tools to what Genie Code carries in context.”
↩︎ Stage one: connect fewer servers and filter their tools“Each connected MCP server adds its tools to what Genie Code carries in context.”
↩︎ Prediction - 3.
“Every MCP Service exposes a different set of tools, so discover them at runtime instead of hardcoding names.”
↩︎ Stages two and three: list lightweight summaries, fetch schemas on demand“The service exposes only the tools you selected and evaluates any attached service policy”
↩︎ Stages two and three: list lightweight summaries, fetch schemas on demand“The gateway checks that the caller has EXECUTE on the MCP Service in Unity Catalog.”
↩︎ Exam trap 2“Authorize and govern: The gateway checks that the caller has EXECUTE on the MCP Service in Unity Catalog.”
↩︎ Checkpoint - 4.
“call list_tools() to get each tool's name, description, and input schema at runtime”
↩︎ Stages two and three: list lightweight summaries, fetch schemas on demand“call list_tools() to get each tool's name, description, and input schema at runtime”
↩︎ Key concept“call list_tools() to get each tool's name, description, and input schema at runtime”
↩︎ Exam trap 3 - 5.
“Tool call arguments: Parameters that an LLM typically generates dynamically based on user input”
↩︎ Context-efficient execution: lean inputs, results instead of raw data“_meta parameters: Configuration parameters that you can preset in your agent code to set behavior deterministically”
↩︎ Exam trap 4“_meta parameters: Configuration parameters that you can preset in your agent code to set behavior deterministically”
↩︎ Checkpoint - 6.
“Use the system.ai.sandbox MCP to let your agent run Python, SQL, or shell code in an isolated environment.”
↩︎ Context-efficient execution: lean inputs, results instead of raw data“The agent discovers the MCP's tools, runs Python code, and returns a mean of 18.”
↩︎ Context-efficient execution: lean inputs, results instead of raw data