Skip to content

Commit 5cb7e41

Browse files
Pr comment
1 parent 9f16dee commit 5cb7e41

File tree

1 file changed

+5
-3
lines changed
  • libraries/microsoft-agents-a365-tooling-extensions-agentframework/microsoft_agents_a365/tooling/extensions/agentframework/services

1 file changed

+5
-3
lines changed

libraries/microsoft-agents-a365-tooling-extensions-agentframework/microsoft_agents_a365/tooling/extensions/agentframework/services/mcp_tool_registration_service.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Copyright (c) Microsoft. All rights reserved.
22

3-
from typing import Optional, List, Any
3+
from typing import Optional, List, Any, Union
44
import logging
55

66
from agent_framework import ChatAgent, MCPStreamableHTTPTool
7+
from agent_framework.azure import AzureOpenAIChatClient
8+
from agent_framework.openai import OpenAIChatClient
79

810
from microsoft_agents.hosting.core import Authorization, TurnContext
911

@@ -36,7 +38,7 @@ def __init__(self, logger: Optional[logging.Logger] = None):
3638

3739
async def add_tool_servers_to_agent(
3840
self,
39-
chat_client: Any, # OpenAIChatClient or AzureOpenAIChatClient
41+
chat_client: Union[OpenAIChatClient, AzureOpenAIChatClient],
4042
agent_instructions: str,
4143
initial_tools: List[Any],
4244
agent_user_id: str,
@@ -49,7 +51,7 @@ async def add_tool_servers_to_agent(
4951
Add MCP tool servers to a chat agent (mirrors .NET implementation).
5052
5153
Args:
52-
chat_client: The chat client instance (OpenAI or Azure OpenAI)
54+
chat_client: The chat client instance (Union[OpenAIChatClient, AzureOpenAIChatClient])
5355
agent_instructions: Instructions for the agent behavior
5456
initial_tools: List of initial tools to add to the agent
5557
agent_user_id: Unique identifier for the agent user

0 commit comments

Comments
 (0)