Skip to content

Commit 463d9bf

Browse files
Copilotpontemonti
andcommitted
Remove redundant null check for server_url in Agent Framework service
Co-authored-by: pontemonti <7850950+pontemonti@users.noreply.github.com>
1 parent 6ce6e4f commit 463d9bf

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

  • libraries/microsoft-agents-a365-tooling-extensions-agentframework/microsoft_agents_a365/tooling/extensions/agentframework/services

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,6 @@ async def add_tool_servers_to_agent(
9797
# Add servers as MCPStreamableHTTPTool instances
9898
for config in server_configs:
9999
try:
100-
# Use the URL from config (always populated by the configuration service)
101-
server_url = config.url
102-
if not server_url:
103-
self._logger.warning(f"MCP server config missing server_url: {config}")
104-
continue
105-
106100
# Prepare auth headers
107101
headers = {}
108102
if auth_token:
@@ -119,7 +113,7 @@ async def add_tool_servers_to_agent(
119113
# Create and configure MCPStreamableHTTPTool
120114
mcp_tools = MCPStreamableHTTPTool(
121115
name=server_name,
122-
url=server_url,
116+
url=config.url,
123117
headers=headers,
124118
description=f"MCP tools from {server_name}",
125119
)

0 commit comments

Comments
 (0)