Skip to content

Commit bd46a0c

Browse files
author
Jesus Terrazas
committed
format
1 parent a2b446b commit bd46a0c

File tree

5 files changed

+17
-5
lines changed

5 files changed

+17
-5
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class McpToolRegistrationService:
2727
This service handles registration and management of MCP (Model Context Protocol)
2828
tool servers with Agent Framework agents.
2929
"""
30+
3031
_orchestrator_name: str = "AgentFramework"
3132

3233
def __init__(self, logger: Optional[logging.Logger] = None):
@@ -82,7 +83,7 @@ async def add_tool_servers_to_agent(
8283
server_configs = await self._mcp_server_configuration_service.list_tool_servers(
8384
agentic_app_id=agentic_app_id,
8485
auth_token=auth_token,
85-
orchestrator_name=self._orchestrator_name
86+
orchestrator_name=self._orchestrator_name,
8687
)
8788

8889
self._logger.info(f"Loaded {len(server_configs)} MCP server configurations")

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class McpToolRegistrationService:
4444
>>> service = McpToolRegistrationService()
4545
>>> service.add_tool_servers_to_agent(project_client, agent_id, token)
4646
"""
47+
4748
_orchestrator_name: str = "AzureAIFoundry"
4849

4950
def __init__(

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class MCPServerInfo:
3838

3939
class McpToolRegistrationService:
4040
"""Service for managing MCP tools and servers for an agent"""
41+
4142
_orchestrator_name: str = "OpenAI"
4243

4344
def __init__(self, logger: Optional[logging.Logger] = None):
@@ -135,9 +136,13 @@ async def add_tool_servers_to_agent(
135136
# Prepare headers with authorization
136137
headers = si.headers or {}
137138
if auth_token:
138-
headers[Constants.Headers.AUTHORIZATION] = f"{Constants.Headers.BEARER_PREFIX} {auth_token}"
139+
headers[Constants.Headers.AUTHORIZATION] = (
140+
f"{Constants.Headers.BEARER_PREFIX} {auth_token}"
141+
)
139142

140-
headers[Constants.Headers.USER_AGENT] = Utility.get_user_agent_header(self._orchestrator_name)
143+
headers[Constants.Headers.USER_AGENT] = Utility.get_user_agent_header(
144+
self._orchestrator_name
145+
)
141146

142147
# Create MCPServerStreamableHttpParams with proper configuration
143148
params = MCPServerStreamableHttpParams(url=si.url, headers=headers)

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class McpToolRegistrationService:
3535
This service handles registration and management of MCP (Model Context Protocol)
3636
tool servers with Semantic Kernel agents.
3737
"""
38+
3839
_orchestrator_name: str = "SemanticKernel"
3940

4041
def __init__(

libraries/microsoft-agents-a365-tooling/microsoft_agents_a365/tooling/services/mcp_tool_server_configuration_service.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ async def list_tool_servers(
9494
if self._is_development_scenario():
9595
return self._load_servers_from_manifest()
9696
else:
97-
return await self._load_servers_from_gateway(agentic_app_id, auth_token, orchestrator_name)
97+
return await self._load_servers_from_gateway(
98+
agentic_app_id, auth_token, orchestrator_name
99+
)
98100

99101
# --------------------------------------------------------------------------
100102
# ENVIRONMENT DETECTION
@@ -326,7 +328,9 @@ async def _load_servers_from_gateway(
326328

327329
return mcp_servers
328330

329-
def _prepare_gateway_headers(self, auth_token: str, orchestrator_name: Optional[str] = None) -> Dict[str, str]:
331+
def _prepare_gateway_headers(
332+
self, auth_token: str, orchestrator_name: Optional[str] = None
333+
) -> Dict[str, str]:
330334
"""
331335
Prepares headers for tooling gateway requests.
332336

0 commit comments

Comments
 (0)