fix(mcp sampling): Disable MCP tool callbacks to prevent cyclic dependencies

- Add note in documentation about preventing cyclic dependencies
- Disable mcp tool callback auto-configuration:  spring.ai.mcp.client.toolcallback.enabled=false

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
This commit is contained in:
Christian Tzolov
2025-05-13 17:50:06 +02:00
parent ffd8def9eb
commit 21c661eda7
5 changed files with 20 additions and 8 deletions

View File

@@ -140,6 +140,8 @@ McpSyncClientCustomizer samplingCustomizer(Map<String, ChatClient> chatClients)
}
```
NOTE: To prevent cyclic dependencies you have to disable MCP tool callbacks auto-configuration: `spring.ai.mcp.client.toolcallback.enabled=false`
## Running the Examples
### Prerequisites