everything server: instructions unconditionally reference sampling/elicitation tools that only exist when the client declares those capabilities
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 75/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- backend
Direzione di ricerca
Inizia in server/index.ts, concentrandoti su registerConditionalTools() all'interno di oninitialized e sulla stringa instructions statica. Esegui la riproduzione npx fornita del server con capabilities vuote e con sampling/elicitation capabilities, quindi verifica che le instructions descrivano in modo coerente se trigger-sampling-request e trigger-elicitation-request sono disponibili.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Factual issue
The @modelcontextprotocol/server-everything v2026.8.31 instructions string unconditionally tells integrating agents to use trigger-sampling-request and trigger-elicitation-request:
## Constraints & Limitations
- Sampling requests (`trigger-sampling-request`) require client sampling capability
- Elicitation requests (`trigger-elicitation-request`) require client elicitation capability
These tools are registered through registerConditionalTools() inside oninitialized, gated on the client's declared capabilities (server/index.ts). For a client that declares no sampling/elicitation capability — e.g. the majority of clients today, and verified by a capability sweep across 12 popular MCP servers — the tools never appear in tools/list, and the instructions reference tools that do not exist for that session:
- initialize with
capabilities: {}→tools/listreturns 13 tools, none of themtrigger-sampling-requestortrigger-elicitation-request - initialize with
capabilities: {sampling:{}, elicitation:{}}→ 16 tools, both present
Suggested fixes (pick any)
- Make the instructions conditional-aware — e.g. "when your client declares the sampling capability,
trigger-sampling-requestis available" — so the guidance matches what an agent can actually call. - Compose the instructions per session — the instructions string is static, but it could be built from the registered-tools state after
oninitialized, or the conditionality could be stated in one sentence. - At minimum, add the phrase "if your client declares the corresponding capability" to the two bullets.
Why this matters beyond this server
The instructions field exists to orient agents; an agent that follows these instructions on a non-capability client will attempt to call a tool that is not in its catalog — a coherence class that deterministic batteries (this was found with mcp-eval's catalog-vs-instructions checks) can expose mechanically.
Repro
npx -y @modelcontextprotocol/server-everything
# initialize with capabilities: {} ; then tools/list -> 13 tools, no trigger-sampling-request
# initialize with capabilities: {sampling:{},elicitation:{}} ; wait ~1.5s after notifications/initialized ; tools/list -> 16 tools, both present
Environment: server-everything v2026.8.31 (npm), server self-reports 2.0.0; verified against the published dist (registerConditionalTools in dist/server/index.js).
- Lingua principale
- TypeScript
- Stelle
- 90.5k
- Fork
- 11.7k
- Merge medio
- 5g 19h
- PR unite (30g)
- 6
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di modelcontextprotocol/servers
-
Docs: `fetch` installs npm packages during a tool call, which is worth stating for deployments Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
modelcontextprotocol/servers#4830 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
modelcontextprotocol/servers#4829 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
modelcontextprotocol/servers#4812 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
modelcontextprotocol/servers#4804 · 1 commento ·
-
README gate confirmation command can be used by any commenter, bypassing the "readme: pending" gate Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
modelcontextprotocol/servers#4796 ·
Tutte le issue di modelcontextprotocol/servers
Issue simili
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
Mend: dependency security vulnerability untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100