类 McpTool

java.lang.Object
io.agentscope.core.tool.ToolBase
io.agentscope.core.tool.mcp.McpTool
所有已实现的接口:
AgentTool

public class McpTool extends ToolBase
ToolBase subclass that wraps an MCP (Model Context Protocol) tool.

Bridges remote MCP tools to the AgentScope tool system so they participate in permission evaluation and the agent's pending-confirmation flow alongside built-in and @Tool tools.

Features:

  • Translates AgentScope tool calls into MCP protocol calls.
  • Merges caller arguments with preset arguments configured at registration time.
  • Converts MCP results into AgentScope ToolResultBlocks.
  • Surfaces permission policy via checkPermissions(Map, PermissionContextState): read-only MCP tools auto-allow; everything else requires explicit user authorization (matches the Python MCPTool default).