Share via


Utility class

Methods

BuildMcpServerUrl(string)

Build the full URL for accessing a specific MCP server.

Example: Utility.BuildMcpServerUrl('MyServer') // => "https://agent365.svc.cloud.microsoft/agents/servers/MyServer/"

GetMcpBaseUrl()

Get the base URL used to query MCP environments.

GetToolingGatewayForDigitalWorker(string)

Construct the tooling gateway URL for a given agent identity. This endpoint is used to discover MCP servers associated with the specified agent identity.

Example: Utility.GetToolingGatewayForDigitalWorker(agenticAppId) // => "https://agent365.svc.cloud.microsoft/agents/{agenticAppId}/mcpServers"

GetToolsMode()
ValidateAuthToken(undefined | string)

Validates a JWT authentication token. Checks that the token is a valid JWT and is not expired.

Method Details

BuildMcpServerUrl(string)

Build the full URL for accessing a specific MCP server.

Example: Utility.BuildMcpServerUrl('MyServer') // => "https://agent365.svc.cloud.microsoft/agents/servers/MyServer/"

static function BuildMcpServerUrl(serverName: string): string

Parameters

serverName

string

The MCP server resource name.

Returns

string

The fully-qualified MCP server URL including trailing slash.

GetMcpBaseUrl()

Get the base URL used to query MCP environments.

static function GetMcpBaseUrl(): string

Returns

string

The base MCP environments URL.

GetToolingGatewayForDigitalWorker(string)

Construct the tooling gateway URL for a given agent identity. This endpoint is used to discover MCP servers associated with the specified agent identity.

Example: Utility.GetToolingGatewayForDigitalWorker(agenticAppId) // => "https://agent365.svc.cloud.microsoft/agents/{agenticAppId}/mcpServers"

static function GetToolingGatewayForDigitalWorker(agenticAppId: string): string

Parameters

agenticAppId

string

The unique identifier for the agent identity.

Returns

string

A fully-qualified URL pointing at the tooling gateway for the agent.

GetToolsMode()

static function GetToolsMode(): ToolsMode

Returns

ValidateAuthToken(undefined | string)

Validates a JWT authentication token. Checks that the token is a valid JWT and is not expired.

static function ValidateAuthToken(authToken: undefined | string)

Parameters

authToken

undefined | string

The JWT token to validate.