Skip to main content
Glama
mwhesse

Dataverse MCP Server

by mwhesse

remove_role_from_team

Remove security role assignments from teams to revoke permissions when access levels need adjustment or during team restructuring.

Instructions

Removes a security role assignment from a team, revoking the permissions granted by that role for all team members. Use this when teams no longer need certain access levels or when restructuring team permissions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roleIdYesID of the role to remove
teamIdYesID of the team to remove the role from

Implementation Reference

  • The asynchronous handler function that executes the tool logic: deletes the team-role association using the Dataverse client's delete method on the association reference.
    async (params) => { try { await client.delete(`teams(${params.teamId})/teamroles_association(${params.roleId})/$ref`); return { content: [ { type: "text", text: `Successfully removed role from team.` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error removing role from team: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } }
  • Zod input schema defining the required parameters: roleId and teamId as strings.
    inputSchema: { roleId: z.string().describe("ID of the role to remove"), teamId: z.string().describe("ID of the team to remove the role from") }
  • The MCP server.registerTool call that registers the 'remove_role_from_team' tool, including name, schema, title, description, and handler.
    server.registerTool( "remove_role_from_team", { title: "Remove Role from Team", description: "Removes a security role assignment from a team, revoking the permissions granted by that role for all team members. Use this when teams no longer need certain access levels or when restructuring team permissions.", inputSchema: { roleId: z.string().describe("ID of the role to remove"), teamId: z.string().describe("ID of the team to remove the role from") } }, async (params) => { try { await client.delete(`teams(${params.teamId})/teamroles_association(${params.roleId})/$ref`); return { content: [ { type: "text", text: `Successfully removed role from team.` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error removing role from team: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } } );
  • src/index.ts:196-196 (registration)
    Top-level invocation of the removeRoleFromTeamTool function, which performs the actual tool registration on the main MCP server instance.
    removeRoleFromTeamTool(server, dataverseClient);

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