Skip to main content
Glama
mwhesse

Dataverse MCP Server

by mwhesse

Delete Dataverse Column

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);
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively communicates critical behavioral traits: the action is permanent ('cannot be undone'), destructive ('will remove all data stored in this column'), and requires caution. This covers the safety profile that annotations would normally provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with three sentences that each earn their place: the first states the action, the second provides critical warnings, and the third gives usage guidance. It's front-loaded with the core purpose and wastes no words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive tool with no annotations and no output schema, the description does an excellent job covering the essential behavioral context (irreversible, data loss). However, it doesn't mention potential prerequisites (e.g., permissions needed) or what happens upon success/failure, leaving minor gaps in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already documents both parameters ('entityLogicalName' and 'logicalName') adequately. The description doesn't add any additional meaning about the parameters beyond what the schema provides, such as format examples or constraints, which aligns with the baseline score when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('permanently deletes'), the resource ('a column from a Dataverse table'), and distinguishes it from siblings like 'delete_dataverse_table' or 'update_dataverse_column' by focusing on column deletion. It goes beyond just restating the name/title by specifying the scope and irreversible nature.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use it ('only for columns that are no longer needed') and includes a strong warning about irreversible consequences. However, it doesn't explicitly mention when NOT to use it or name specific alternatives like 'update_dataverse_column' for modifications instead of deletion.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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