Skip to content

@Tool returnDirect Attribute Ignored #3481

Open
@mylater

Description

@mylater

@tool returnDirect Attribute Ignored by DefaultToolCallingManager in MCP Integration

Bug description
When integrating an MCP service with Spring AI, the returnDirect attribute in @Tool annotations is being ignored during execution. The DefaultToolCallingManager fails to retain this parameter in method metadata, causing MCP services to ​always perform an extra LLM call even when returnDirect = true.

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