AS AgentScopeAPI 手册 / API Reference

Tool

public abstract class Tool
源码Source io/agentscope/runtime/sandbox/tools/Tool.java:18–49

工具,封装可被智能体调用的能力。位于 io.agentscope.runtime.sandbox.tools 包。核心成员包括 getName、getToolType、getDescription、toString、Tool、name。

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

字段摘要Field Summary

字段Field类型Type说明Description
name
String
名称字段。
The name field.
toolType
String
工具类型字段。
The tool type field.
description
String
`description` 字段。
The description field.

构造器摘要Constructor Summary

构造器Constructor说明Description
protected Tool(String name, String toolType, String description)
初始化 `Tool` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public String getName()
获取名称。
Returns the name.
public String getToolType()
获取工具类型。
Returns the tool type.
public String getDescription()
获取 `getDescription`。
Returns the description.
public String toString()
返回 `toString` 结果。
Returns the to string.

字段详情Field Detail

name

protected String name

名称字段。声明为 protected String name。

The name field.

源码Source io/agentscope/runtime/sandbox/tools/Tool.java:20

toolType

protected String toolType

工具类型字段。声明为 protected String toolType。

The tool type field.

源码Source io/agentscope/runtime/sandbox/tools/Tool.java:22

description

protected String description

description 字段。声明为 protected String description。

The description field.

源码Source io/agentscope/runtime/sandbox/tools/Tool.java:24

构造器详情Constructor Detail

Tool

protected Tool(String name, String toolType, String description)

初始化 Tool 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
nameString名称(类型 `String`)。The name.
toolTypeString工具类型(类型 `String`)。The tool type.
descriptionString描述(类型 `String`)。The description.
源码Source io/agentscope/runtime/sandbox/tools/Tool.java:26–30

方法详情Method Detail

getName

public String getName()

获取名称。

Returns the name.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/runtime/sandbox/tools/Tool.java:32–34

getToolType

public String getToolType()

获取工具类型。

Returns the tool type.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/runtime/sandbox/tools/Tool.java:36–38

getDescription

public String getDescription()

获取 getDescription。

Returns the description.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/runtime/sandbox/tools/Tool.java:40–42

toString

public String toString()

返回 toString 结果。

Returns the to string.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/runtime/sandbox/tools/Tool.java:44–48
基于官方固定版本源码静态生成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.