CertSafari
    Databricks Certified Context Engineer Associate· Lessons

    Domain 5 · Lesson 29/45

    Progressive disclosure for MCP tools on Databricks

    Apply a progressive-disclosure approach to MCP tool access (staged tool discovery with context-efficient execution) to reduce token usage compared to raw tool dumps.

    16 min read
    2.17% of exam
    6 sources
    Published 22 Oct 2026
    Docs as of 17 Oct 2026

    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.

    A tool-calling loop that sends every discovered tool's full spec to the model on each iteration: the raw-dump pattern.python
    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()],
        )

    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?

    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?

    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?

    Sources21

    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.

    Listing a server's tools at run time. Each tool carries a name, a description, and an input schema, the three levels of detail a staged design separates.python
    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.

    What enters the model's context at each stage of staged MCP discovery
    StageMechanismWhat the model sees
    1. NarrowConnect only needed servers; restrict tools with config.include_tool_selectorsNothing yet. Unselected tools never appear in tools/list
    2. List or searchAgent code calls list_tools(); the model gets a discovery step returning name and descriptionShort summaries for candidate tools
    3. FetchAgent code adds the chosen tool's inputSchema to the next model callOne 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.

    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?

    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?

    Sources34

    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.

    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.

    Sources56

    Sources

    (6)

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

    1. 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. 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. 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. 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. 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. 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

    Ready to test yourself?

    Practise Databricks Certified Context Engineer Associate in quiz mode.

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