mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-22 12:26:08 +00:00
feat: add tools API endpoint and tools-selector form type (#2103)
* feat: add tools API endpoint and tools-selector form type Backend: - Add GET /api/v1/tools — list all available tools (plugin + MCP) - Add GET /api/v1/tools/<tool_name> — get specific tool details Frontend: - Add TOOLS_SELECTOR form type for plugin config forms - Multi-select dialog with tool name and description - Add PluginTool entity type and API client methods * fix: remove unused quart import, fix prettier formatting * style: ruff format tools.py * chore: bump langbot-plugin to 0.3.7
This commit is contained in:
@@ -41,6 +41,8 @@ import {
|
||||
ApiRespKnowledgeEngines,
|
||||
ApiRespParsers,
|
||||
RagMigrationStatusResp,
|
||||
ApiRespTools,
|
||||
ApiRespToolDetail,
|
||||
} from '@/app/infra/entities/api';
|
||||
import { Plugin } from '@/app/infra/entities/plugin';
|
||||
import { GetBotLogsRequest } from '@/app/infra/http/requestParam/bots/GetBotLogsRequest';
|
||||
@@ -649,6 +651,16 @@ export class BackendClient extends BaseHttpClient {
|
||||
return this.get('/api/v1/mcp/servers');
|
||||
}
|
||||
|
||||
// ========== Tools ==========
|
||||
|
||||
public getTools(): Promise<ApiRespTools> {
|
||||
return this.get('/api/v1/tools');
|
||||
}
|
||||
|
||||
public getToolDetail(toolName: string): Promise<ApiRespToolDetail> {
|
||||
return this.get(`/api/v1/tools/${toolName}`);
|
||||
}
|
||||
|
||||
public getMCPServer(serverName: string): Promise<ApiRespMCPServer> {
|
||||
return this.get(`/api/v1/mcp/servers/${serverName}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user