Skip to main content
Glama
mwhesse

Dataverse MCP Server

by mwhesse

Remove Role from Team

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

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

With no annotations provided, the description carries full burden for behavioral disclosure. While it indicates this is a destructive permission-revoking operation, it lacks critical details like required permissions, whether the change is reversible, error conditions, or confirmation prompts. For a security mutation tool, this leaves significant gaps.

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 efficiently structured in two sentences: the first explains the action and effect, the second provides usage guidance. Every phrase adds value with zero wasted words, making it easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive security tool with no annotations and no output schema, the description provides adequate purpose and usage context but lacks behavioral details about permissions, reversibility, and error handling. It's minimally viable but has clear gaps given the tool's complexity.

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?

Schema description coverage is 100%, providing clear documentation for both roleId and teamId parameters. The description adds no additional parameter semantics beyond what the schema already states, so it meets the baseline expectation without adding extra value.

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 ('removes a security role assignment'), target resource ('from a team'), and effect ('revoking the permissions granted by that role for all team members'). It distinguishes from sibling tools like 'remove_role_from_user' by specifying team-level scope.

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 explicit usage context ('when teams no longer need certain access levels or when restructuring team permissions'), which helps the agent understand when to invoke this tool. However, it doesn't mention alternatives like 'remove_privilege_from_role' or 'assign_role_to_team' for comparison.

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