Skip to main content
Glama
mwhesse

Dataverse MCP Server

by mwhesse

delete_dataverse_table

Permanently 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
logicalNameYesLogical name of the table to delete

Implementation Reference

  • 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 }; } } );
  • 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 }; } }
  • Input schema defining the required 'logicalName' parameter using Zod.
    inputSchema: { logicalName: z.string().describe("Logical name of the table to delete") }
  • 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 }; } } ); }

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mwhesse/mcp-dataverse'

If you have feedback or need assistance with the MCP directory API, please join our Discord server