通过


Utility class

方法

BuildMcpServerUrl(string)

生成用于访问特定 MCP 服务器的完整 URL。

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

GetMcpBaseUrl()

获取用于查询 MCP 环境的基本 URL。

GetToolingGatewayForDigitalWorker(string)

构造给定代理标识的工具网关 URL。 此终结点用于发现与指定代理标识关联的 MCP 服务器。

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

GetToolsMode()
ValidateAuthToken(undefined | string)

验证 JWT 身份验证令牌。 检查令牌是否为有效的 JWT 且未过期。

方法详细信息

BuildMcpServerUrl(string)

生成用于访问特定 MCP 服务器的完整 URL。

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

static function BuildMcpServerUrl(serverName: string): string

参数

serverName

string

MCP 服务器资源名称。

返回

string

完全限定的 MCP 服务器 URL,包括尾部斜杠。

GetMcpBaseUrl()

获取用于查询 MCP 环境的基本 URL。

static function GetMcpBaseUrl(): string

返回

string

基本 MCP 环境 URL。

GetToolingGatewayForDigitalWorker(string)

构造给定代理标识的工具网关 URL。 此终结点用于发现与指定代理标识关联的 MCP 服务器。

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

static function GetToolingGatewayForDigitalWorker(agenticAppId: string): string

参数

agenticAppId

string

代理标识的唯一标识符。

返回

string

指向代理的工具网关的完全限定 URL。

GetToolsMode()

static function GetToolsMode(): ToolsMode

返回

ValidateAuthToken(undefined | string)

验证 JWT 身份验证令牌。 检查令牌是否为有效的 JWT 且未过期。

static function ValidateAuthToken(authToken: undefined | string)

参数

authToken

undefined | string

要验证的 JWT 令牌。