delete_dashboard
Remove a dashboard from a base by providing the app token and dashboard block ID.
Instructions
Delete a dashboard from a base
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_token | Yes | Base app token | |
| dashboard_id | Yes | Dashboard block ID to delete |
Implementation Reference
- src/mcp-server.ts:300-316 (registration)MCP tool registration and input schema for 'delete_dashboard'
name: 'delete_dashboard', description: 'Delete a dashboard from a base', inputSchema: { type: 'object', properties: { app_token: { type: 'string', description: 'Base app token', }, dashboard_id: { type: 'string', description: 'Dashboard block ID to delete', }, }, required: ['app_token', 'dashboard_id'], }, }, - src/mcp-server.ts:507-520 (handler)MCP handler case for 'delete_dashboard' - calls client.deleteDashboard
case 'delete_dashboard': { await client.deleteDashboard(args.app_token as string, args.dashboard_id as string); return { content: [ { type: 'text', text: JSON.stringify({ success: true, message: 'Dashboard deleted successfully', }, null, 2), }, ], }; } - src/api/client.ts:310-315 (helper)API client method that sends DELETE request to /bitable/v1/apps/{appToken}/dashboards/{dashboardId}
async deleteDashboard(appToken: string, dashboardId: string): Promise<void> { await this.request({ method: 'DELETE', url: `/bitable/v1/apps/${appToken}/dashboards/${dashboardId}`, }); } - bot/bot-dashboard-assistant.ts:42-42 (schema)Intent enum value for DELETE_DASHBOARD
DELETE_DASHBOARD = 'delete_dashboard', - bot/bot-dashboard-assistant.ts:943-968 (handler)Bot handler for delete dashboard intent - calls client.deleteBlock
private async handleDeleteDashboard( intent: ParsedIntent, context: ConversationContext, chatId: string ): Promise<void> { const { appToken, dashboardId } = intent.entities; if (!appToken || !dashboardId) { await this.sendMessage(chatId, '❓ I need both app_token and dashboard_id to delete.'); return; } try { await this.dashboardClient.deleteBlock(appToken, dashboardId); // Clear context if this was the current dashboard if (context.currentDashboard?.dashboardId === dashboardId) { this.updateContext(context, { currentDashboard: undefined }); } await this.sendMessage(chatId, '✅ Dashboard deleted successfully!'); } catch (error: any) { await this.sendMessage(chatId, `❌ Failed to delete dashboard: ${error.message}`); } }