Skip to main content
Glama
mwhesse

Dataverse MCP Server

by mwhesse

Remove Members from Team

remove_members_from_team

Remove users from team membership to revoke their access to team-owned records and team-based permissions when users no longer need access or change roles.

Instructions

Removes users from team membership, revoking their access to team-owned records and team-based permissions. Use this when users no longer need team access or are changing roles.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
memberIdsYesArray of user IDs to remove from team
teamIdYesID of the team to remove members from

Implementation Reference

  • The asynchronous handler function that implements the core logic of the 'remove_members_from_team' tool by calling the Dataverse 'RemoveMembersTeam' action with the provided teamId and array of memberIds.
      async (params) => {
        try {
          await client.callAction('RemoveMembersTeam', {
            TeamId: params.teamId,
            MemberIds: params.memberIds
          });
    
          return {
            content: [
              {
                type: "text",
                text: `Successfully removed ${params.memberIds.length} member(s) from team.`
              }
            ]
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error removing members from team: ${error instanceof Error ? error.message : 'Unknown error'}`
              }
            ],
            isError: true
          };
        }
      }
    );
  • Zod input schema defining the required parameters: teamId (string) and memberIds (array of strings).
    inputSchema: {
      teamId: z.string().describe("ID of the team to remove members from"),
      memberIds: z.array(z.string()).describe("Array of user IDs to remove from team")
    }
  • The server.registerTool call that registers the 'remove_members_from_team' tool, including its name, metadata, schema, and handler.
      server.registerTool(
        "remove_members_from_team",
        {
          title: "Remove Members from Team",
          description: "Removes users from team membership, revoking their access to team-owned records and team-based permissions. Use this when users no longer need team access or are changing roles.",
          inputSchema: {
            teamId: z.string().describe("ID of the team to remove members from"),
            memberIds: z.array(z.string()).describe("Array of user IDs to remove from team")
          }
        },
        async (params) => {
          try {
            await client.callAction('RemoveMembersTeam', {
              TeamId: params.teamId,
              MemberIds: params.memberIds
            });
    
            return {
              content: [
                {
                  type: "text",
                  text: `Successfully removed ${params.memberIds.length} member(s) from team.`
                }
              ]
            };
          } catch (error) {
            return {
              content: [
                {
                  type: "text",
                  text: `Error removing members from team: ${error instanceof Error ? error.message : 'Unknown error'}`
                }
              ],
              isError: true
            };
          }
        }
      );
    }
  • src/index.ts:207-207 (registration)
    Call to the removeMembersFromTeamTool registration function during MCP server initialization, which triggers the tool registration.
    removeMembersFromTeamTool(server, dataverseClient);
  • src/index.ts:71-71 (registration)
    Import of the removeMembersFromTeamTool function from team-tools.js.
    removeMembersFromTeamTool,
Behavior3/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. It effectively describes the destructive nature of the action ('revoking their access'), which is crucial for a mutation tool. However, it lacks details on permissions required, error conditions (e.g., if users are not in the team), or what happens to associated data, leaving some behavioral 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 front-loaded with the core purpose in the first sentence, followed by usage guidance in the second. Both sentences are essential, with no redundant information, making it efficiently structured and appropriately sized for the tool's complexity.

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?

Given the tool's complexity as a destructive mutation with no annotations and no output schema, the description is moderately complete. It covers the purpose and usage context well but lacks details on behavioral aspects like error handling, permissions, or return values, which would be beneficial for full contextual understanding.

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%, so the schema already documents both parameters ('memberIds' and 'teamId') adequately. The description does not add any additional semantic details about these parameters beyond what the schema provides, such as format examples or constraints, resulting in a baseline score of 3.

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 users from team membership') and the resource ('team'), distinguishing it from siblings like 'remove_role_from_team' or 'delete_dataverse_team'. It explicitly mentions the effect of revoking access to team-owned records and permissions, which adds precision beyond the basic verb.

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 clear context for when to use the tool ('when users no longer need team access or are changing roles'), but it does not explicitly mention when not to use it or name specific alternatives. For example, it doesn't contrast with 'remove_role_from_user' or other sibling tools that might affect user permissions differently.

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