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
| Name | Required | Description | Default |
|---|---|---|---|
| businessUnitId | Yes | Unique identifier of the business unit to delete |
Implementation Reference
- src/tools/businessunit-tools.ts:379-402 (handler)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") } },
- src/tools/businessunit-tools.ts:370-403 (registration)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);