Skip to content

Commit 1942d4f

Browse files
committed
Update get_tooling_gateway_for_digital_worker
Also get the platform scope from env similar to dotnet sdk.
1 parent 7a19369 commit 1942d4f

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • libraries/microsoft-agents-a365-tooling/microsoft_agents_a365/tooling/utils

libraries/microsoft-agents-a365-tooling/microsoft_agents_a365/tooling/utils/utility.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def get_tooling_gateway_for_digital_worker(agent_user_id: str) -> str:
3333
str: The tooling gateway URL for the digital worker.
3434
"""
3535
# The endpoint needs to be updated based on the environment (prod, dev, etc.)
36-
return f"{_get_mcp_platform_base_url()}/agentGateway/agentApplicationInstances/{agent_user_id}/mcpServers"
36+
return f"{_get_mcp_platform_base_url()}/agents/{agent_user_id}/mcpServers"
3737

3838

3939
def get_mcp_base_url() -> str:
@@ -136,6 +136,11 @@ def get_ppapi_token_scope():
136136
"""
137137
environment = _get_current_environment().lower()
138138

139+
envScope = os.getenv("MCP_PLATFORM_AUTHENTICATION_SCOPE", "")
140+
141+
if envScope:
142+
return envScope;
143+
139144
if environment == "development":
140145
return [PPAPI_TEST_TOKEN_SCOPE + "/.default"]
141146
else:

0 commit comments

Comments
 (0)