lowlevel Server: widen on_* return types for InputRequiredResult; add subscriptions/listen slot
Type-only changes to the lowlevel Server constructor for the 2026-07-28 protocol revision.
Changes
Return-type widening — three on_* handlers can now return InputRequiredResult in addition to their concrete result type, matching MONOLITH_RESULTS in src/mcp/types/methods.py:
on_call_tool→CallToolResult | InputRequiredResulton_get_prompt→GetPromptResult | InputRequiredResulton_read_resource→ReadResourceResult | InputRequiredResult
These are the three methods whose request params extend InputResponseRequestParams. Widening is covariant, so existing handlers typed -> CallToolResult etc. still type-check unchanged.
New dispatch slot — on_subscriptions_listen kwarg + _spec_requests row, so subscriptions/listen (the one new-in-2026 client→server request method) reaches a registered handler instead of METHOD_NOT_FOUND.
InputRequiredResult validator — model_validator(mode="after") enforcing the spec's at-least-one-of input_requests / request_state requirement (matches the typescript-sdk and csharp-sdk behaviour).
Not in this PR
tasks/*— moved to theio.modelcontextprotocol/tasksextension; not core 2026-07-28.on_discoveroverride —server/discoverstays the auto-derived built-in.get_capabilities()—ServerCapabilitieshas nosubscriptionsfield; nothing to set.
Part of #2891.