Skip to content

fix(mcp): reuse fresh tool discovery across task sessions - #3825

Open
aleksUIX wants to merge 1 commit into
adcontextprotocol:mainfrom
aleksUIX:fix/task-catalog-reuse
Open

aleksUIX wants to merge 1 commit into
adcontextprotocol:mainfrom
aleksUIX:fix/task-catalog-reuse

Conversation

@aleksUIX

Copy link
Copy Markdown
Contributor

Store the complete paginated tool catalog with the existing scoped discovery evidence. Fresh MCP task sessions can restore required-task flags and output validators from that catalog. A missing, expired, invalidated or unusable catalog falls back to live pagination.

The regression opens separate clients against a two-page seller. Repeated tool calls and status polls reuse the first listing. A credential change, invalidation or expiry causes another listing.

The SDK build, typecheck and 178 focused discovery, task and polling tests passed.

Fixes #3722.

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve — clean, well-tested MCP tool-catalog reuse optimization.

Checked:

  • complete/completeClients termination logic mirrors forEachMcpToolsPage (repeated-cursor = incomplete, fail-closed).
  • Restore path is schema-validated, tool-presence-gated, with live-pagination fallback.
  • Read reuse is gated on agent identity + non-scoped transport + wire-version + live non-synthetic evidence + endpoint match — cross-tenant isolation holds.
  • Write merge drops stale catalogs on capability change.
  • Witness-not-translator preserved; no fabrication or re-shaping at the seam.
  • Changeset present and correctly scoped as a patch.

High-risk flag is true only due to (modified) files under src/lib/protocols/**; with no medium-or-higher findings, those modifications are presumed safe (row 5 does not fire without a medium finding). gated_paths is false, no author team gate. No blocking or medium findings → decision table falls through to row 9.

No blocking or medium findings.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP Tasks path lists the whole tool list once per MCP session, ignoring the cached discovery

1 participant