Skip to content

Conversation

@tzolov
Copy link
Contributor

@tzolov tzolov commented Sep 5, 2025

  • Introduce McpToolNamePrefixGenerator interface for flexible tool naming
  • Add default and no-prefix generator implementations
  • Update SyncMcpToolCallback and AsyncMcpToolCallback to accept prefixed names
  • Enhance tool callback providers to use the prefix generator
  • Add comprehensive tests for prefix generation functionality
  • Update documentation with tool name prefix generation examples
  • Rename McpMetadata to McpConnectionInfo with builder pattern

This change allows users to customize how MCP tool names are prefixed, helping to avoid naming conflicts when integrating tools from multiple MCP servers. By default, the MCP client name is used as a prefix, but users can provide custom implementations or disable prefixing entirely.

The McpConnectionInfo record now provides a cleaner API with a builder pattern and better encapsulates the connection metadata including client capabilities, client info, and initialization results.

BREAKING CHANGE: McpMetadata renamed to McpConnectionInfo. Constructors for SyncMcpToolCallback and AsyncMcpToolCallback that don't accept prefixedToolName parameter are deprecated.

- Introduce McpToolNamePrefixGenerator interface for flexible tool naming
- Add default and no-prefix generator implementations
- Update SyncMcpToolCallback and AsyncMcpToolCallback to accept prefixed names
- Enhance tool callback providers to use the prefix generator
- Add comprehensive tests for prefix generation functionality
- Update documentation with tool name prefix generation examples
- Rename McpMetadata to McpConnectionInfo with builder pattern

This change allows users to customize how MCP tool names are prefixed,
helping to avoid naming conflicts when integrating tools from multiple
MCP servers. By default, the MCP client name is used as a prefix, but
users can provide custom implementations or disable prefixing entirely.

The McpConnectionInfo record now provides a cleaner API with a builder
pattern and better encapsulates the connection metadata including client
capabilities, client info, and initialization results.

BREAKING CHANGE: McpMetadata renamed to McpConnectionInfo.
Constructors for SyncMcpToolCallback and AsyncMcpToolCallback that
don't accept prefixedToolName parameter are deprecated.

Signed-off-by: Christian Tzolov <[email protected]>
@tzolov tzolov added this to the 1.1.0.M1 milestone Sep 5, 2025
@ilayaperumalg ilayaperumalg self-assigned this Sep 5, 2025
@ilayaperumalg ilayaperumalg merged commit 3a1fe1f into spring-projects:main Sep 5, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants