Public: anyone can read this; the crew can change it.
MCP explore answers how many results a filter leaves, in the page's own sentence #11752
Check · Review · Land · Live done — Landed and live in production.
MCP `explore` now answers how many results a filter leaves, in the same sentence the explorer page shows.
shipped production is serving it deploy 1a20738
MCP explore now answers how many results a filter leaves, in the same sentence the explorer page shows.
I ran bun test test/mcp-explore-count.test.ts test/mcp-size.test.ts test/explore-mcp-q.test.ts test/mcp-cards-explore.test.ts (23 pass) and bun x tsc --noEmit (clean). bun scripts/gate.ts printed only a pre-push note asking for a "Try:" commit. I did not run bun test for the whole suite.
What changed
- The
exploreanswer, insrc/http/mcp/tools/explore.ts, now carriestotalandline. totalcounts every row the filter leaves, not just the page returned.linecomes fromexploreCount, the function the page uses, so the words live in one place. Examples are "1 app", "No apps match" and "66 results".- When a filter is set, the answer also carries
clear: { tool: "explore", arguments: {} }, the call that drops it. With no filter there is noclear. A sort alone is not a filter, matching the page. - The tool doc line is updated for the new fields. No new tool was added, and the
mcp-sizeceilings are untouched. - The new
test/mcp-explore-count.test.tscovers a filter with results, a filter with none, and no filter. Without the change these tests fail, becausetotal,lineandclearare missing.
What I left out
- The page's per-term "Drop X" links on a miss.
clearis the one call that drops the whole filter. - Any change to the cards issue's work on
explore.ts. I did not check whether it is open.
How to try it
Call explore over the MCP with { q: "kind:app" } and read total, line and clear.
The push needed a commit message starting "Try:", so the branch has an extra empty commit for that.
Clean, small change. explore adds total, line (from exploreCount, the page and TUI function) and clear only when exploreFiltered. Read-only tool, no new input surface. Tests cover results, none, and no filter. No README or dependency change.
MCP
explorenow answers how many results a filter leaves, in the same sentence the explorer page shows.I ran
bun test test/mcp-explore-count.test.ts test/mcp-size.test.ts test/explore-mcp-q.test.ts test/mcp-cards-explore.test.ts(23 pass) andbun x tsc --noEmit(clean).bun scripts/gate.tsprinted only a pre-push note asking for a "Try:" commit. I did not runbun testfor the whole suite.What changed
exploreanswer, insrc/http/mcp/tools/explore.ts, now carriestotalandline.totalcounts every row the filter leaves, not just the page returned.linecomes fromexploreCount, the function the page uses, so the words live in one place. Examples are "1 app", "No apps match" and "66 results".clear: { tool: "explore", arguments: {} }, the call that drops it. With no filter there is noclear. A sort alone is not a filter, matching the page.mcp-sizeceilings are untouched.test/mcp-explore-count.test.tscovers a filter with results, a filter with none, and no filter. Without the change these tests fail, becausetotal,lineandclearare missing.What I left out
clearis the one call that drops the whole filter.explore.ts. I did not check whether it is open.How to try it Call
exploreover the MCP with{ q: "kind:app" }and readtotal,lineandclear.The push needed a commit message starting "Try:", so the branch has an extra empty commit for that.
Closes #11496