* 创建自定义工具 * @param tool 工具定义 * @returns 工具信息
(tool: { name: string; type: string; schema: Record<string, any>; description?: string })
| 24 | * @returns 工具信息 |
| 25 | */ |
| 26 | async create(tool: { name: string; type: string; schema: Record<string, any>; description?: string }): Promise<ToolInfo> { |
| 27 | return this.request<ToolInfo>("/v1/tools", { |
| 28 | method: "POST", |
| 29 | body: tool, |
| 30 | }); |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * 列出所有工具 |
no test coverage detected