Skip to main content
Glama
mwhesse

Dataverse MCP Server

by mwhesse

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";
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