CertSafari
    Databricks Certified Context Engineer Associate· Lessons

    Domain 5 · Lesson 31/45

    Progressive disclosure: staged tool loading to cut agent token cost

    Explain how progressive disclosure can help control how much tool information enters the agent context window at each stage, and why this staged approach reduces token consumption compared to loading full tool schemas upfront.

    14 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 tool schemas loaded upfront are paid for on every turn, used or not
    • Describe the three stages of progressive disclosure and what enters the context window at each
    • Trace how a skill moves from front-matter metadata to full instructions to bundled files
    • Reject fixes that still load every schema upfront, such as compression, a larger window or system-prompt placement

    Key concept

    Progressive disclosure — Tool information goes into the agent's context in stages. First a short name and description, then the full instructions or schema once the tool is relevant, and supporting files only when the task needs them. The agent pays tokens only for the stages it actually reaches.

    1.Why full tool schemas cost tokens on every turn

    Every tool definition in an agent's context is paid for on every turn. An agent doesn't read its context once and then keep it. Each turn sends the whole conversation to the model again, and one agentic task takes several turns to plan, act and check its work. So a tool schema loaded at the start of a chat is billed on turn one, again on turn two, and on every turn after that, whether or not the agent ever calls the tool.

    Connected tool servers add to that baseline. Each connected MCP server adds its tools to what the agent carries in context. Take an agent wired to twelve MCP servers, each exposing several tools with detailed JSON schemas. It starts every conversation with a large block of definitions before the user has typed anything. Because consumption grows with both the length of a chat and the amount of context it carries, the twentieth message costs more than the first. A large fixed tool block makes every one of those messages more expensive.

    The cost isn't only money. When a model gets too many tools at once, it gets more confused and takes longer to decide before any work starts. The design guidance for Databricks agent systems is to give an agent only the tools and context it needs, not an unbounded set of APIs. Upfront loading breaks that rule by default, because it gives the agent the whole catalog on every turn.

    Several fixes that look reasonable leave this cost exactly where it was. Packing every schema into one compressed blob still puts all of it into context upfront. A larger context window lets more schemas fit, but each turn still carries all of them. Moving the schemas into the system prompt doesn't help either, because instructions load with every message. None of these changes what enters the context or when, and that is the only lever that lowers the baseline. For a tool server a chat doesn't need at all, the simplest step is the one given in the Genie Code consumption guide: disable MCP servers you aren't using.

    Upfront loading compared with staged loading, per turn
    QuestionFull schemas upfrontStaged (progressive disclosure)
    What is in context before the first user messageEvery tool's complete definitionShort names and descriptions only
    When a tool's full detail is paid forEvery turn, used or notFrom the turn the agent selects it
    Effect of adding one more MCP serverAll of its tools join the per-turn baselineOnly its short descriptions join the baseline
    How cost grows over a long chatFixed block re-sent with each messageGrows only with tools actually used

    Checkpoint 1 of 7· Check yourself

    An agent connected to twelve MCP servers starts every chat with a large block of tool schemas. The team switches to a model whose context window can hold all of the schemas without truncation. What happens to the per-turn token cost of those schemas?

    Sources123

    2.Three stages: description, full instructions, supporting files

    Progressive disclosure splits a tool's information into layers and loads each layer only when the agent needs it. Three stages are enough to remember:

    1. Discovery. Only a short name and a description of what the tool does and when to use it sit in context. This layer is small and stays visible on every turn.
    2. Selection. When the task matches a description, the agent loads that tool's full instructions or schema, and only that tool's.
    3. Execution detail. Supporting files, such as reference material or scripts, are fetched only if the task needs them.

    The token saving follows directly. Under upfront loading, every tool pays the full price on every turn. Under staged loading, every tool pays the small discovery price, and only the tools the agent actually uses pay for their full detail. When an agent has dozens of tools and a given chat uses two or three of them, nearly all the schema tokens that upfront loading would spend never get spent. That is the main efficiency reason for staging: full loading waits until a tool is needed, so tokens go only to relevant tools.

    The discovery layer has to stay visible. Progressive disclosure doesn't mean deleting descriptions or rotating random subsets of tools in and out. The model picks the right tool by reading the descriptions of all the candidates. A design that uses a vector store to retrieve only the single most similar tool description on each call takes that choice away from the model. The model then sees one candidate and can't compare it with the rest. In staged discovery, the agent still sees the whole catalog in summary form and decides for itself which entry to open. That is why the quality of each description matters. How overlapping descriptions cause wrong selections is covered under ambiguous tool descriptions.

    Checkpoint 2 of 7· Check yourself

    Which design for a forty-tool agent cuts schema tokens and still lets the model pick the right tool on its own?

    Checkpoint 3 of 7· Exam question

    A team builds an agent connected to 12 MCP servers, each exposing multiple tools with detailed JSON schemas. At the start of every conversation, the agent loads all tool definitions into context, and the team notices response latency and token cost growing rapidly even before the user's first message. Which change best embodies progressive disclosure to address this?

    Checkpoint 4 of 7· Exam question

    In the context of agent tool design, what is the primary token-efficiency reason for using progressive disclosure instead of loading every tool's full schema into the agent's context window upfront?

    Sources45

    3.Skills as a worked case of staged loading

    Agent skills on Databricks follow the three stages exactly, which makes them a useful concrete model. A skill is a folder with a required SKILL.md file. That file opens with front-matter metadata giving the skill's name and a description of when and how to use it. Below the front matter is the body of instructions. The folder can also bundle supporting files. Each part enters context at a different time.

    The front matter is the discovery layer. AI coding assistants find and load relevant skills automatically based on the task, and they can only do that because the description is visible to them. The body loads when the skill is invoked. The bundled files load only if the task needs them. Unlike custom instructions, which apply globally on every message, skills load only in the relevant context, which keeps the context window efficient.

    Skill tools on the databricks-skill-registry MCP server, by stage
    StageToolWhat enters context
    Discoverylist_skillsThe skills in one schema, so the agent knows what exists
    Selectionload_skillA skill's instructions, loaded into the current session
    Execution detailget_skill_filesSpecific bundled files from a skill, only when fetched

    Here is an example. Suppose a user asks an agent to review a query using acme.sql_skills.databricks-sql-guide. The agent calls load_skill to load that skill's instructions into context, and calls get_skill_files only if the skill bundles supporting files. Before that request, the only cost was the skill's short description. Every other skill in the schema stays at that small cost for the whole conversation.

    Which capabilities should be packaged as skills in the first place is a separate design question, covered under Agent Skills packaging. How to apply staged discovery to an MCP tool catalog step by step is covered under staged MCP tool discovery.

    Checkpoint 5 of 7· Match them up

    An agent on the databricks-skill-registry MCP server is asked to review a SQL query. Match each piece of the skill workflow to what it brings into the agent's context and when.

    Tap a term, then the definition that fits it.

    Checkpoint 6 of 7· Exam question

    A Databricks Agent Skill is packaged as a SKILL.md file with YAML front matter (name and short description) plus a longer body of instructions and several bundled reference files. Under progressive disclosure, which loading pattern minimizes tokens in the agent's context while still letting the model discover and use the skill correctly?

    Sources564

    4.When staged loading wins, and what it costs

    Staging isn't free, and that tells you where it pays off. Each extra LLM or tool call adds tokens and response time. Fetching a schema or loading a skill on demand is one of those extra calls. So staging trades a one-time fetch for removing a per-turn charge.

    That trade wins when the tool catalog is large and any one conversation uses a small part of it. The twelve-server agent is the typical case: most schemas are irrelevant to a given request, and each one would otherwise be billed on every turn. The trade is weaker for an agent with a few tools it calls on nearly every turn. Their full detail would be loaded almost immediately anyway, so a discovery step only adds a round trip. The question to ask is how much of the catalog a typical chat actually uses.

    Checkpoint 7 of 7· Check yourself

    Two agents are candidates for progressive disclosure. Agent A has three tools and calls them on nearly every turn. Agent B is connected to twelve MCP servers, and a typical chat uses two or three of their tools. Where does staging pay off, and why?

    Sources21

    Sources

    (6)

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

    1. 1.
      “Each turn re-sends the whole chat's context to the model, and an agentic task runs several turns to plan, act, and check its work.”
      ↩︎ Why full tool schemas cost tokens on every turn
      “Each connected MCP server adds its tools to what Genie Code carries in context.”
      ↩︎ Why full tool schemas cost tokens on every turn
      “Consumption grows with both the length of a chat and the amount of context it carries”
      ↩︎ Why full tool schemas cost tokens on every turn
      “Because instructions load with every message, keep them lean.”
      ↩︎ Why full tool schemas cost tokens on every turn
      “Disable MCP servers you aren't using.”
      ↩︎ Why full tool schemas cost tokens on every turn
      “so the twentieth message in a chat costs more than the first”
      ↩︎ When staged loading wins, and what it costs
      “Because instructions load with every message, keep them lean.”
      ↩︎ Exam trap 1
      “Each turn re-sends the whole chat's context to the model, and an agentic task runs several turns to plan, act, and check its work.”
      ↩︎ Exam trap 2
    2. 2.
      “Provide only the tools and context your agent requires, rather than an unbounded set of APIs or large irrelevant context.”
      ↩︎ Why full tool schemas cost tokens on every turn
      “Each additional LLM or tool call increases token usage and response time.”
      ↩︎ When staged loading wins, and what it costs
    3. 3.
      “Giving the model too many tools at once increases confusion and slows decision-making before any work begins.”
      ↩︎ Why full tool schemas cost tokens on every turn
    4. 4.
      “When a task matches a skill's description, the agent loads it on demand”
      ↩︎ Three stages: description, full instructions, supporting files
      “Every skill in acme.sql_skills then appears as a live tool named skill_acme.sql_skills.<skill>.”
      ↩︎ Three stages: description, full instructions, supporting files
      “The agent calls the load_skill MCP tool to load the skill's instructions into context, and get_skill_files if the skill bundles supporting files.”
      ↩︎ Skills as a worked case of staged loading
      “When a task matches a skill's description, the agent loads it on demand”
      ↩︎ Key concept
      “The agent calls the load_skill MCP tool to load the skill's instructions into context, and get_skill_files if the skill bundles supporting files.”
      ↩︎ Exam trap 3
    5. 5.
      “A description of what this skill does and when to use it.”
      ↩︎ Three stages: description, full instructions, supporting files
      “Inside your skill folder, create a SKILL.md file. This file is required and defines the skill.”
      ↩︎ Skills as a worked case of staged loading
      “Unlike custom instructions, which are applied globally, skills are loaded automatically and only in the relevant context.”
      ↩︎ Skills as a worked case of staged loading
      “This maintains an efficient context window and reduces the need to provide the same context across multiple chats.”
      ↩︎ Skills as a worked case of staged loading
    6. 6.
      “Each skill is a Markdown file with front-matter metadata that describes when and how the skill should be used.”
      ↩︎ Skills as a worked case of staged loading
      “AI coding assistants automatically discover and load relevant skills based on the task at hand.”
      ↩︎ Skills as a worked case of staged loading
      “Each skill is a Markdown file with front-matter metadata that describes when and how the skill should be used.”
      ↩︎ Exam trap 4

    Ready to test yourself?

    Practise Databricks Certified Context Engineer Associate in quiz mode.

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