All posts
Architecture8 May 2026 · 2 min read

Progressive Disclosure Over MCP

How three MCP tools and a fetch-only-what-you-need flow keep agent context small, cheap, and fast.

By ContextPie

The fastest way to ruin an agent is to bury it in context. ContextPie serves skills over MCP using progressive disclosure: the agent pulls only the detail it needs, exactly when it needs it, and never carries the rest.

Three tools, three altitudes

The hosted MCP endpoint exposes exactly three tools, each returning more detail than the last:

  • find_skills(query) → lightweight descriptors only: {name, description, score}. No bodies, no files. Just enough to choose.
  • get_skill(id) → the chosen skill's SKILL.md body plus a manifest of its supporting files.
  • get_skill_file(id, path) → one file, on demand.

Each step is a deliberate widening. Search to shortlist, load to read, fetch to drill in. See the MCP tools reference for full signatures.

Why this beats dumping everything

The naive approach concatenates every skill — bodies, scripts, templates — into the agent's context window at startup. That's expensive on every single turn, it's slow, and it drowns the signal: the model now has to find the relevant skill inside a wall of irrelevant ones.

Progressive disclosure inverts that. The agent spends a handful of tokens on descriptors, decides what's relevant, and only then pays for a body. A skill's 4,000-token reference doc costs nothing until the one moment it's actually needed. Context stays lean, cost scales with relevance instead of catalog size, and the model's attention stays on the task. Read more in progressive disclosure.

The flow

agent: "extract tables from a pdf"
        |
        v
  find_skills(query)              -> [ {name, description, score: 0.89},
                                       {name, description, score: 0.61}, ... ]
        |   (picks the top descriptor — cheap, no bodies loaded)
        v
  get_skill(id)                   -> SKILL.md body
                                     + file manifest:
                                       - reference/table-formats.md
                                       - scripts/extract.py
        |   (reads the body, sees it needs the script)
        v
  get_skill_file(id, "scripts/extract.py")  -> just that one file

At no point did the agent load the second-ranked skill's body, the other manifest entries, or any file it didn't reach for. Three tools, three escalating commitments of context — and a catalog that can grow indefinitely without growing the prompt.

Because every find_skills call is also a measurement, this same flow feeds your analytics: what got surfaced, what got loaded, what got ignored. That's the query is the telemetry — the architecture that keeps context cheap is the same one that tells you what to build next.