Skip to main content
Glama
mwhesse

Dataverse MCP Server

by mwhesse

Delete Dataverse Business Unit

delete_dataverse_businessunit

Remove a business unit from Dataverse permanently. This action cannot be undone and may impact associated users and teams.

Instructions

Permanently deletes a business unit from Dataverse. WARNING: This action cannot be undone and may affect users and teams associated with the business unit. Use with extreme caution.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
businessUnitIdYesUnique identifier of the business unit to delete

Implementation Reference

  • The asynchronous handler function that implements the core logic of the delete_dataverse_businessunit tool. It performs a DELETE request to the Dataverse businessunits endpoint using the provided businessUnitId and returns success or error response.
    async (params: any) => {
      try {
        await client.delete(`businessunits(${params.businessUnitId})`);
    
        return {
          content: [
            {
              type: "text",
              text: "Successfully deleted business unit"
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `Error deleting business unit: ${error instanceof Error ? error.message : 'Unknown error'}`
            }
          ],
          isError: true
        };
      }
    }
  • The tool metadata including title, description, and Zod-based input schema validating the required businessUnitId parameter.
    {
      title: "Delete Dataverse Business Unit",
      description: "Permanently deletes a business unit from Dataverse. WARNING: This action cannot be undone and may affect users and teams associated with the business unit. Use with extreme caution.",
      inputSchema: {
        businessUnitId: z.string().describe("Unique identifier of the business unit to delete")
      }
    },
  • The server.registerTool call that registers the delete_dataverse_businessunit tool, including schema and inline handler, within the deleteBusinessUnitTool export function.
    server.registerTool(
      "delete_dataverse_businessunit",
      {
        title: "Delete Dataverse Business Unit",
        description: "Permanently deletes a business unit from Dataverse. WARNING: This action cannot be undone and may affect users and teams associated with the business unit. Use with extreme caution.",
        inputSchema: {
          businessUnitId: z.string().describe("Unique identifier of the business unit to delete")
        }
      },
      async (params: any) => {
        try {
          await client.delete(`businessunits(${params.businessUnitId})`);
    
          return {
            content: [
              {
                type: "text",
                text: "Successfully deleted business unit"
              }
            ]
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error deleting business unit: ${error instanceof Error ? error.message : 'Unknown error'}`
              }
            ],
            isError: true
          };
        }
      }
    );
  • src/index.ts:215-215 (registration)
    Top-level invocation in the main server initialization that calls deleteBusinessUnitTool to register the tool on the MCP server instance.
    deleteBusinessUnitTool(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 and excels at this. It explicitly states the irreversible nature ('cannot be undone'), warns about cascading effects ('may affect users and teams'), and emphasizes the dangerous nature of the operation - all critical behavioral information not captured in the input schema.

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 perfectly front-loaded with the core action first, followed by critical warnings. Every sentence earns its place: the first states the action, the second provides the key behavioral warnings, and the third gives usage guidance. No wasted 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 mutation tool with no annotations and no output schema, the description does an excellent job covering the critical behavioral aspects. It clearly communicates the irreversible nature and potential side effects. The only minor gap is not explicitly mentioning what happens on success/failure or return values, but given the warning-heavy nature, this is acceptable.

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 single parameter 'businessUnitId' well-documented in the schema. The description doesn't add any additional parameter semantics beyond what the schema already provides, so the baseline score of 3 is appropriate.

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') and target resource ('a business unit from Dataverse'), distinguishing it from sibling tools like 'get_dataverse_businessunit' or 'update_dataverse_businessunit'. It precisely communicates the destructive nature of the operation.

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 strong contextual guidance with 'Use with extreme caution' and mentions potential impacts on users and teams, which helps the agent understand when this tool is appropriate. However, it doesn't explicitly state when to use alternatives like 'update_dataverse_businessunit' or 'set_businessunit_parent' for non-destructive changes.

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