Skip to main content
Glama
mwhesse

Dataverse MCP Server

by mwhesse

set_businessunit_parent

Change the parent business unit to reorganize organizational hierarchy and reporting relationships in Microsoft Dataverse.

Instructions

Changes the parent business unit for a given business unit, effectively moving it within the organizational hierarchy. Use this to reorganize business unit structure and reporting relationships.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
businessUnitIdYesUnique identifier of the business unit
parentBusinessUnitIdYesUnique identifier of the new parent business unit

Implementation Reference

  • The core handler function that calls the Dataverse 'SetParentBusinessUnit' action using the provided businessUnitId and parentBusinessUnitId parameters, handling success and error responses.
    async (params: any) => { try { // Use the SetParentBusinessUnit action await client.callAction('SetParentBusinessUnit', { BusinessUnitId: params.businessUnitId, ParentId: params.parentBusinessUnitId }); return { content: [ { type: "text", text: "Successfully set business unit parent" } ] }; } catch (error) { return { content: [ { type: "text", text: `Error setting business unit parent: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } }
  • Tool metadata including title, description, and Zod input schema validating businessUnitId and parentBusinessUnitId as required strings.
    { title: "Set Business Unit Parent", description: "Changes the parent business unit for a given business unit, effectively moving it within the organizational hierarchy. Use this to reorganize business unit structure and reporting relationships.", inputSchema: { businessUnitId: z.string().describe("Unique identifier of the business unit"), parentBusinessUnitId: z.string().describe("Unique identifier of the new parent business unit") } },
  • The server.registerTool call that registers the 'set_businessunit_parent' tool with its schema and handler function.
    server.registerTool( "set_businessunit_parent", { title: "Set Business Unit Parent", description: "Changes the parent business unit for a given business unit, effectively moving it within the organizational hierarchy. Use this to reorganize business unit structure and reporting relationships.", inputSchema: { businessUnitId: z.string().describe("Unique identifier of the business unit"), parentBusinessUnitId: z.string().describe("Unique identifier of the new parent business unit") } }, async (params: any) => { try { // Use the SetParentBusinessUnit action await client.callAction('SetParentBusinessUnit', { BusinessUnitId: params.businessUnitId, ParentId: params.parentBusinessUnitId }); return { content: [ { type: "text", text: "Successfully set business unit parent" } ] }; } catch (error) { return { content: [ { type: "text", text: `Error setting business unit parent: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } } );
  • src/index.ts:220-220 (registration)
    Invocation of setBusinessUnitParentTool to register the tool on the MCP server during server initialization.
    setBusinessUnitParentTool(server, dataverseClient);
  • src/index.ts:82-82 (registration)
    Import of the setBusinessUnitParentTool function from businessunit-tools.
    setBusinessUnitParentTool,

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