Skip to content

Only process annotated function parameters #4482

@kylelutze

Description

@kylelutze

Currently a mcp tool call will attempt to deserialize all function parameters, regardless of if they are annotated with @ToolParam or @McpToolParam. This makes it impossible to use other Spring annotations such as @AuthenticationPrincipal.

Just like @RestController and @GetMapping, etc. it should only process function parameters that are annotated appropriately.

Environment:
spring-ai-starter-mcp-server-webmvc:1.1.0-M2
running a stateless mcp server.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions