Skip to main content
Glama
mwhesse

Dataverse MCP Server

by mwhesse

Delete Dataverse Table

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

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

Since no annotations are provided, the description carries the full burden of behavioral disclosure. It effectively describes critical behavioral traits: the action is permanent ('cannot be undone'), destructive ('will remove all data in the table'), and includes a cautionary note. This compensates well for the lack of annotations like destructiveHint.

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 and front-loaded, with the first sentence stating the core action and the following sentences providing essential warnings and usage context. Every sentence earns its place by adding critical information without redundancy or fluff.

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?

Given the tool's high complexity (destructive deletion) and lack of annotations or output schema, the description does a good job of covering key aspects like permanence and data loss. However, it could be more complete by mentioning prerequisites (e.g., permissions needed) or what happens post-deletion (e.g., confirmation message), slightly reducing the score.

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%, with the parameter 'logicalName' clearly documented in the schema. The description does not add any additional meaning or context about the parameter beyond what the schema provides, such as examples or constraints. Thus, it meets the baseline for high schema coverage.

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 custom table from Dataverse'), and distinguishes it from siblings like 'update_dataverse_table' or 'get_dataverse_table' by emphasizing irreversible removal. It goes beyond just restating the name/title by specifying the scope of deletion.

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 on when to use this tool ('only for tables that are no longer needed') and includes a strong warning about caution. However, it does not explicitly mention alternatives (e.g., archiving or deactivating tables if available) or compare it to sibling tools like 'delete_dataverse_column', leaving some room for improvement.

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