Delete Dataverse Table
delete_dataverse_tablePermanently remove custom tables from Dataverse. This irreversible action deletes all table data and cannot be undone. Use only for tables no longer needed.
Instructions
Permanently deletes a custom table from Dataverse. WARNING: This action cannot be undone and will remove all data in the table. Use with extreme caution and only for tables that are no longer needed.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"logicalName": "<logicalName>"
},
"name": "delete_dataverse_table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| logicalName | Yes | Logical name of the table to delete |
Implementation Reference
- src/tools/table-tools.ts:318-351 (registration)Tool registration for 'delete_dataverse_table', including schema and handler function.
server.registerTool( "delete_dataverse_table", { title: "Delete Dataverse Table", description: "Permanently deletes a custom table from Dataverse. WARNING: This action cannot be undone and will remove all data in the table. Use with extreme caution and only for tables that are no longer needed.", inputSchema: { logicalName: z.string().describe("Logical name of the table to delete") } }, async (params) => { try { await client.deleteMetadata(`EntityDefinitions(LogicalName='${params.logicalName}')`); return { content: [ { type: "text", text: `Successfully deleted table '${params.logicalName}'.` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error deleting table: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } } ); - src/tools/table-tools.ts:327-350 (handler)The handler function that performs the deletion by calling deleteMetadata on the Dataverse client.
async (params) => { try { await client.deleteMetadata(`EntityDefinitions(LogicalName='${params.logicalName}')`); return { content: [ { type: "text", text: `Successfully deleted table '${params.logicalName}'.` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error deleting table: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } } - src/tools/table-tools.ts:323-325 (schema)Input schema defining the required 'logicalName' parameter using Zod.
inputSchema: { logicalName: z.string().describe("Logical name of the table to delete") } - src/tools/table-tools.ts:317-352 (helper)Helper function that registers the delete_dataverse_table tool.
export function deleteTableTool(server: McpServer, client: DataverseClient) { server.registerTool( "delete_dataverse_table", { title: "Delete Dataverse Table", description: "Permanently deletes a custom table from Dataverse. WARNING: This action cannot be undone and will remove all data in the table. Use with extreme caution and only for tables that are no longer needed.", inputSchema: { logicalName: z.string().describe("Logical name of the table to delete") } }, async (params) => { try { await client.deleteMetadata(`EntityDefinitions(LogicalName='${params.logicalName}')`); return { content: [ { type: "text", text: `Successfully deleted table '${params.logicalName}'.` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error deleting table: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } } ); }