Skip to content

feat(mcp): retrieve tool definitions by meaning when relevant (shared seam with skills) #875

Open

Description

@ajianaz

Context

Split out of #601 and #750 (owner decision, 2026-11-16): everything else in those issues is built (external-wrapper sandbox for third-party stdio servers, opt-in lazy start, unattended-run rules). Only this feature is missing. It is parked (label pending) until it is unparked.

Problem

Every configured server's tool descriptions share one context. That costs tokens on each turn and enables cross-server shadowing. Lazy start ([sandbox] lazy_start, docs/sandbox-design.md §9.1.2) defers the process but not the descriptions.

Idea

Retrieve tool definitions by meaning when they are relevant to the turn, instead of loading all of them (Tool Search style). Design it as a seam shared with skills, so the same retrieval serves MCP tools and skills.

Open questions

  • Retrieval source: tole-local embeddings, the uteke registry, or a lighter lexical index first.
  • Interaction with the plugin lock and the tool-manifest hash (a retrieved definition must still be the locked one) and with the rug-pull guard.
  • Interaction with lazy start (a retrieved tool whose server is not running).
  • Approval and risk classification stay as they are: MCP tools are always Risk::Write.

Refs #601, #750, #594.

Activity

  1. added
    enhancement
    pending
    on Nov 16, 2026
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

    enhancementpending

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions