Mcp Tool Group
class McpToolGroup(description: ToolGroupDescription, provider: String, name: String, permissions: Set<ToolGroupPermission>, clients: List<<Error class: unknown class>>, filter: (<Error class: unknown class>) -> Boolean, metaConverter: ToolCallContextMcpMetaConverter = ToolCallContextMcpMetaConverter.passThrough()) : ToolGroup
ToolGroup backed by MCP.
Tools are loaded lazily on first access rather than at construction time. This is required when MCP clients are configured with spring.ai.mcp.client.initialized=false so that the user's OAuth token is present in the security context when the MCP handshake occurs.
Kotlin's lazy delegate uses LazyThreadSafetyMode.SYNCHRONIZED by default, so concurrent first-access across threads is safe without additional locking.
Parameters
description
Description of the tool group
provider
Name of the provider of the tool group
name
Name of the tool group
permissions
Permissions the tools requires
clients
List of MCP clients to use to load tools
filter
predicate that returns true to include a tool
Constructors
Link copied to clipboard
constructor(description: ToolGroupDescription, provider: String, name: String, permissions: Set<ToolGroupPermission>, clients: List<<Error class: unknown class>>, filter: (<Error class: unknown class>) -> Boolean, metaConverter: ToolCallContextMcpMetaConverter = ToolCallContextMcpMetaConverter.passThrough())