AS AgentScopeAPI 手册 / API Reference

Builder

public static class Builder
源码Source io/agentscope/runtime/sandbox/tools/McpConfigConverter.java:224–264

构建器,用于构建并配置目标实例。位于 io.agentscope.runtime.sandbox.tools 包。核心成员包括 serverConfigs、sandboxType、whitelist、blacklist、sandboxService、build。

A class in io.agentscope.runtime.sandbox.tools that lets agents invoke external capabilities under control. Declared in io.agentscope.runtime.sandbox.tools.

方法摘要Method Summary

方法Method说明Description
public Builder serverConfigs(Map<String, Object> serverConfigs)
设置该配置项。
Performs the server configs operation.
public Builder serverConfigs(String serverConfigsStr)
设置该配置项。
Performs the server configs operation.
public Builder sandboxType(String sandboxType)
设置沙箱类型。
Performs the sandbox type operation.
public Builder whitelist(Set<String> whitelist)
设置该配置项。
Performs the whitelist operation.
public Builder blacklist(Set<String> blacklist)
设置该配置项。
Performs the blacklist operation.
public Builder sandboxService(SandboxService sandboxService)
设置沙箱服务。
Performs the sandbox service operation.
public McpConfigConverter build()
构建并返回最终实例。
Creates and returns an instance.

方法详情Method Detail

serverConfigs

public Builder serverConfigs(Map<String, Object> serverConfigs)

设置该配置项。

Performs the server configs operation.

参数Parameters
名称Name类型Type说明Description
serverConfigsMap<String, Object>服务端 Configs(类型 `Map`)。The server configs.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/tools/McpConfigConverter.java:231–234

serverConfigs

public Builder serverConfigs(String serverConfigsStr)

设置该配置项。

Performs the server configs operation.

参数Parameters
名称Name类型Type说明Description
serverConfigsStrString服务端 Configs Str(类型 `String`)。The server configs str.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/tools/McpConfigConverter.java:236–239

sandboxType

public Builder sandboxType(String sandboxType)

设置沙箱类型。

Performs the sandbox type operation.

参数Parameters
名称Name类型Type说明Description
sandboxTypeString沙箱类型(类型 `String`)。The sandbox type.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/tools/McpConfigConverter.java:241–244

whitelist

public Builder whitelist(Set<String> whitelist)

设置该配置项。

Performs the whitelist operation.

参数Parameters
名称Name类型Type说明Description
whitelistSet<String>whitelist(类型 `Set`)。The whitelist.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/tools/McpConfigConverter.java:246–249

blacklist

public Builder blacklist(Set<String> blacklist)

设置该配置项。

Performs the blacklist operation.

参数Parameters
名称Name类型Type说明Description
blacklistSet<String>blacklist(类型 `Set`)。The blacklist.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/tools/McpConfigConverter.java:251–254

sandboxService

public Builder sandboxService(SandboxService sandboxService)

设置沙箱服务。

Performs the sandbox service operation.

参数Parameters
名称Name类型Type说明Description
sandboxServiceSandboxService沙箱服务(类型 `SandboxService`)。The sandbox service.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/tools/McpConfigConverter.java:256–259

build

public McpConfigConverter build()

构建并返回最终实例。

Creates and returns an instance.

返回Returns McpConfigConverter
返回McpConfigConverter。Returns mcp config converter.
源码Source io/agentscope/runtime/sandbox/tools/McpConfigConverter.java:261–263
基于官方固定版本源码静态生成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.