Skip to content

Commit 7830c4a

Browse files
committed
Fix McpTool constructor parameters
1 parent 8ffa798 commit 7830c4a

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

debug_scripts/test_azure_ai.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,20 @@ def test_azure_ai_mcp():
6969
# Test MCP tool creation
7070
print("\n--- Testing MCP Tool Creation ---")
7171
try:
72-
mcp_url = f"{app_url}/mcp/stream"
73-
print(f"MCP URL: {mcp_url}")
74-
75-
mcp_tool = McpTool(mcp_server_url=mcp_url)
76-
print(f"✅ MCP Tool created: {mcp_tool}")
72+
app_url = os.getenv('AZURE_APP_SERVICE_URL')
73+
if app_url:
74+
mcp_url = f"{app_url}/mcp/stream"
75+
print(f"MCP URL: {mcp_url}")
76+
77+
# Use correct parameter names
78+
mcp_tool = McpTool(
79+
server_label="todo-mcp-server",
80+
server_url=mcp_url
81+
)
82+
print(f"✅ MCP Tool created: {mcp_tool}")
83+
else:
84+
print("❌ No AZURE_APP_SERVICE_URL")
85+
7786
except Exception as e:
7887
print(f"❌ MCP Tool creation error: {e}")
7988
import traceback

0 commit comments

Comments
 (0)