delete_table
Remove a table from a NocoDB database by specifying its table ID to manage database structure and clean up unused data.
Instructions
Delete a table from the database
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table_id | Yes | The ID of the table to delete |
Implementation Reference
- src/tools/table.ts:184-190 (handler)The handler function that implements the delete_table tool logic by invoking the NocoDB client's deleteTable method and returning a success message.handler: async (client: NocoDBClient, args: { table_id: string }) => { await client.deleteTable(args.table_id); return { message: "Table deleted successfully", table_id: args.table_id, }; },
- src/tools/table.ts:174-183 (schema)The input schema defining the required table_id parameter for the delete_table tool.inputSchema: { type: "object", properties: { table_id: { type: "string", description: "The ID of the table to delete", }, }, required: ["table_id"], },
- src/index.ts:55-62 (registration)Registration of tableTools (which includes delete_table) into the allTools array, used for listing and calling tools in MCP server handlers.const allTools = [ ...databaseTools, ...tableTools, ...recordTools, ...viewTools, ...queryTools, ...attachmentTools, ];
- src/nocodb-api.ts:100-102 (helper)NocoDBClient helper method that executes the HTTP DELETE request to the NocoDB API endpoint for deleting a table.async deleteTable(tableId: string): Promise<void> { await this.client.delete(`/api/v1/db/meta/tables/${tableId}`); }