Skip to main content
Glama
mwhesse

Dataverse MCP Server

by mwhesse

Add Members to Team

add_members_to_team

Add users to a team to grant them access to team-owned records and team-based permissions, expanding membership for resource sharing.

Instructions

Adds users as members to a team, granting them access to team-owned records and team-based permissions. Use this to expand team membership and provide users with team-level access to resources.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
memberIdsYesArray of user IDs to add as team members
teamIdYesID of the team to add members to

Implementation Reference

  • Full implementation of the 'add_members_to_team' tool handler, including registration, input schema, and the core logic that invokes the Dataverse 'AddMembersTeam' action to add users to a team.
    export function addMembersToTeamTool(server: McpServer, client: DataverseClient) {
      server.registerTool(
        "add_members_to_team",
        {
          title: "Add Members to Team",
          description: "Adds users as members to a team, granting them access to team-owned records and team-based permissions. Use this to expand team membership and provide users with team-level access to resources.",
          inputSchema: {
            teamId: z.string().describe("ID of the team to add members to"),
            memberIds: z.array(z.string()).describe("Array of user IDs to add as team members")
          }
        },
        async (params) => {
          try {
            await client.callAction('AddMembersTeam', {
              TeamId: params.teamId,
              MemberIds: params.memberIds
            });
    
            return {
              content: [
                {
                  type: "text",
                  text: `Successfully added ${params.memberIds.length} member(s) to team.`
                }
              ]
            };
          } catch (error) {
            return {
              content: [
                {
                  type: "text",
                  text: `Error adding members to team: ${error instanceof Error ? error.message : 'Unknown error'}`
                }
              ],
              isError: true
            };
          }
        }
      );
    }
  • Input schema definition for the 'add_members_to_team' tool using Zod, specifying teamId and array of memberIds.
    {
      title: "Add Members to Team",
      description: "Adds users as members to a team, granting them access to team-owned records and team-based permissions. Use this to expand team membership and provide users with team-level access to resources.",
      inputSchema: {
        teamId: z.string().describe("ID of the team to add members to"),
        memberIds: z.array(z.string()).describe("Array of user IDs to add as team members")
      }
    },
  • src/index.ts:206-206 (registration)
    Registration of the 'add_members_to_team' tool by calling the addMembersToTeamTool helper function with the MCP server and Dataverse client.
    addMembersToTeamTool(server, dataverseClient);
  • Import of the addMembersToTeamTool helper from team-tools.ts.
      addMembersToTeamTool,
      removeMembersFromTeamTool,
      getTeamMembersTool,
      convertOwnerTeamToAccessTeamTool
    } from "./tools/team-tools.js";
Behavior2/5

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

With no annotations provided, the description carries full burden but offers limited behavioral disclosure. It mentions the effect ('granting them access'), but doesn't specify whether this is a mutating operation (implied by 'Adds'), potential side effects (e.g., notifications, permission changes), error conditions (e.g., invalid IDs, duplicates), or response format. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with two sentences: the first states the purpose and outcome, the second provides usage context. It's front-loaded with the core action and avoids unnecessary details. However, the second sentence could be more direct, and there's minor redundancy ('team membership' and 'team-level access').

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 moderate complexity (mutation with 2 parameters), no annotations, and no output schema, the description is minimally adequate. It covers the basic purpose and usage but lacks details on behavioral aspects like permissions needed, error handling, or return values. For a mutation tool, this leaves room for improvement in completeness.

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%, with clear parameter descriptions in the input schema ('Array of user IDs to add as team members', 'ID of the team to add members to'). The description adds no additional parameter semantics beyond what the schema provides, such as ID formats or constraints. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Adds users as members to a team') and the resource ('team'), specifying the outcome ('granting them access to team-owned records and team-based permissions'). It distinguishes from sibling 'remove_members_from_team' by focusing on addition, but doesn't explicitly differentiate from other team/user management tools like 'assign_role_to_team' or 'assign_role_to_user'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides implied usage context ('Use this to expand team membership and provide users with team-level access to resources'), suggesting when to use it. However, it lacks explicit guidance on when not to use it or alternatives (e.g., vs. 'assign_role_to_user' for individual permissions), and doesn't mention prerequisites like required permissions or existing team/user status.

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