Skip to content
This repository was archived by the owner on Apr 11, 2026. It is now read-only.
This repository was archived by the owner on Apr 11, 2026. It is now read-only.

McpAsyncRequestContext not excluded from Json schema with @McpPrompt #97

@mdangl

Description

@mdangl

According to the documentation, McpAsyncRequestContext should be supported for @McpPrompt.
But when we add a parameter of type McpAsyncRequestContext to a method annotated with @McpPrompt, it is turned into a prompt argument.

Might this be caused by this code, which does not check for McpAsyncRequestContext (nor McpSyncRequestContext either, for that matter), but only for the deprecated McpAsyncServerExchange?

if (McpAsyncServerExchange.class.isAssignableFrom(parameter.getType())

Also, I am not sure this code even works for McpAsyncServerExchange, because it uses its own private "helper interface" instead of the real McpAsyncServerExchange one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions