McpToolRegistrationService Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Service for registering and validating MCP tool servers for Agent Framework scenarios.
public class McpToolRegistrationService : Microsoft.Agents.A365.Tooling.Extensions.AgentFramework.Services.IMcpToolRegistrationService
type McpToolRegistrationService = class
interface IMcpToolRegistrationService
Public Class McpToolRegistrationService
Implements IMcpToolRegistrationService
- Inheritance
-
McpToolRegistrationService
- Implements
Constructors
| Name | Description |
|---|---|
| McpToolRegistrationService(ILogger<IMcpToolRegistrationService>, IMcpToolServerConfigurationService, IConfiguration) |
Initializes a new instance of the McpToolRegistrationService class. |
Methods
| Name | Description |
|---|---|
| AddToolServersToAgent(IChatClient, String, IList<AITool>, String, UserAuthorization, String, ITurnContext, String) |
Add new MCP servers to the agent by creating a new Agent instance. Note: Due to Microsoft.Extensions.AI framework limitations, MCP tools must be set during Agent creation. If new tools are found, this method creates a new Agent instance with all tools (existing + new) properly initialized. |
| GetMcpToolsAsync(String, UserAuthorization, String, ITurnContext, String) |
Returns a List of MCP tools to be added to the agent. |