Skip to content

Problems with DefaultTools overloading, and SyncMcpToolCallbackProvider cannot be injected automatically #2543

@Inhenry

Description

@Inhenry

Env:
Image

When I configure the MCP client side using the Auto configuration, only List < McpClients > can find the bean and inject it; but SyncMcpToolCallbackProvider shows that the bean class is not found, unlike a reference archive (although ToolCallBackProvider types of beans can be injected).

Image

Image

In addition, if I use mcpclient's listTools () directly, the overload of .defaultTools() will also choose the parameter Object, causing the tool to fail.
The solution is that .defaultTools ()/.tools () must pass parameters of the form ToolCallback

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions