AS AgentScopeAPI 手册 / API Reference

McpConnectionException

public final class McpConnectionException extends RuntimeException
源码Source io/agentscope/harness/agent/tools/McpConnectionException.java:19–30

MCP 连接异常,表示执行过程中的错误。位于 io.agentscope.harness.agent.tools 包,继承自 RuntimeException。核心成员包括 getServerName、McpConnectionException。

A connection failure whose public message never contains endpoint credentials.

构造器摘要Constructor Summary

构造器Constructor说明Description
public McpConnectionException(String serverName)
初始化 `McpConnectionException` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public String getServerName()
获取服务端名称。
Returns the server name.

构造器详情Constructor Detail

McpConnectionException

public McpConnectionException(String serverName)

初始化 McpConnectionException 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
serverNameString服务端名称(类型 `String`)。The server name.
源码Source io/agentscope/harness/agent/tools/McpConnectionException.java:22–25

方法详情Method Detail

getServerName

public String getServerName()

获取服务端名称。

Returns the server name.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/tools/McpConnectionException.java:27–29
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.