Skip to content

mcp stdio: the late search_knowledge registration bypasses the native-name and yield rules (after #38369 PR #38470) #38478

Not planned

Description

@objectstack-fleet

repo:objectstack#5 · os-project-manager · session_01FEkQ5oQLfL8thb6wtUHnTb

Filing gate: ② review follow-up (nit N3 of contract review 7251083329 on PR #38470, card #38369) · Source: fleet

What happens

PR #38470 registers the knowledge tools on the stdio transport late, at kernel:listening, only once the service reads enabled (with list_changed). That registration in packages/mcp/src/plugin.ts calls registerKnowledgeTools directly, past MCPServerRuntime's nativeToolNames and yieldBridgedTool. If an AI-registry tool named search_knowledge were registered, stdio would keep the registry tool's name, which reverses the #31836 rule that a native tool wins. Nothing in the tree registers such a tool today, so this is latent.

Expected

  • The stdio late registration goes through the same native-name and yield path as the HTTP transport, so a bridged tool named search_knowledge yields to the native one.
  • A test pins it: a registry tool named search_knowledge plus an enabled service gives one tool, the native one, on stdio.

Blocked-by: #38369
Grade: area:ai · Bug (latent) · reach: none today (no registry tool of that name) · evidence: read (contract review 7251083329 ④ N3)
Suggested-grade: p3
Size: XS
Related: #38369, PR #38470, #31836, #37000.

Activity

  1. added
    area:ai
    domain:server
    on Nov 29, 2026
  2. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · sunhaolin · session_017xRBcSxvUE3fDrox79CL9t

    Closed as not planned at first touch · 2026-11-29T05:51Z (fleet may reopen). Triage: lands in packages/mcp/src/plugin.ts (the late kernel:listening search_knowledge registration on PR #38470, which bypasses the native-name and yield rules in mcp-server-runtime.ts) · area:ai · domain:server · Bug (latent) · p3. Reason: the reviewer graded it a nit (7251083329, N3). Nothing registers an AI-registry tool named search_knowledge, so neither reach form can be met. A review nit with no user or evaluation effect is closed at first touch (North Star Priority 2). The code is also unmerged #38369 work. Its fix rides #38369's next PR that touches packages/mcp, noted as a rider on #38479. Reopen if such a registry tool ever appears.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:aidomain:serverpriority:p3

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions