Skip to main content
Glama
mwhesse

Dataverse MCP Server

by mwhesse

delete_dataverse_column

Remove unwanted columns from Dataverse tables to clean up database schema and eliminate unnecessary data storage.

Instructions

Permanently deletes a column from a Dataverse table. WARNING: This action cannot be undone and will remove all data stored in this column. Use with extreme caution and only for columns that are no longer needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entityLogicalNameYesLogical name of the table
logicalNameYesLogical name of the column to delete

Implementation Reference

  • The main handler function that executes the tool logic by deleting the specified Dataverse column using the metadata API.
    async (params) => { try { await client.deleteMetadata( `EntityDefinitions(LogicalName='${params.entityLogicalName}')/Attributes(LogicalName='${params.logicalName}')` ); return { content: [ { type: "text", text: `Successfully deleted column '${params.logicalName}' from table '${params.entityLogicalName}'.` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error deleting column: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } }
  • Input schema and tool metadata (title, description) for the delete_dataverse_column tool using Zod validation.
    { title: "Delete Dataverse Column", description: "Permanently deletes a column from a Dataverse table. WARNING: This action cannot be undone and will remove all data stored in this column. Use with extreme caution and only for columns that are no longer needed.", inputSchema: { entityLogicalName: z.string().describe("Logical name of the table"), logicalName: z.string().describe("Logical name of the column to delete") } },
  • Registers the delete_dataverse_column tool on the MCP server inside the deleteColumnTool function.
    server.registerTool( "delete_dataverse_column", { title: "Delete Dataverse Column", description: "Permanently deletes a column from a Dataverse table. WARNING: This action cannot be undone and will remove all data stored in this column. Use with extreme caution and only for columns that are no longer needed.", inputSchema: { entityLogicalName: z.string().describe("Logical name of the table"), logicalName: z.string().describe("Logical name of the column to delete") } }, async (params) => { try { await client.deleteMetadata( `EntityDefinitions(LogicalName='${params.entityLogicalName}')/Attributes(LogicalName='${params.logicalName}')` ); return { content: [ { type: "text", text: `Successfully deleted column '${params.logicalName}' from table '${params.entityLogicalName}'.` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error deleting column: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } } );
  • src/index.ts:149-149 (registration)
    Top-level call to deleteColumnTool function which triggers the tool registration on the main server instance.
    deleteColumnTool(server, dataverseClient);

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