You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ServerHandler defaults answer prompts/list and completion/complete when neither capability is declared #1445
In rmcp 3.9.0 (and on main), the default ServerHandler::list_prompts answers Ok(ListPromptsResult::default()) and the default complete answers Ok(CompleteResult::default()) (crates/rmcp/src/handler/server.rs), while get_prompt, set_level and subscribe default to method_not_found.
So a server whose get_info() declares neither the prompts nor the completions capability still answers prompts/list with {"prompts":[]} and completion/complete with {"completion":{"values":[]}}.
Why it matters
Spec 2026-07-28, Prompts: servers that support prompts MUST declare the prompts capability; its error handling lists -32601 for a capability not supported.
Spec 2025-11-25, Lifecycle: both parties MUST only use capabilities that were successfully negotiated.
The conformance suite (0.2.0-alpha.12) check sep-2575-server-declares-prompts-in-discover fails such a server ("Server handles prompts but does not declare the prompts capability").
Suggestion
Default both to method_not_found unless the matching capability is declared in get_info(), as validate_tasks_capability already does for tasks. list_resources, list_resource_templates and list_tools have the same Ok(default) defaults and may deserve the same treatment.
Workaround
Override list_prompts and complete to return Err(McpError::method_not_found::<…>()).
Activity