Skip to main content
Glama
mwhesse

Dataverse MCP Server

by mwhesse

get_team_members

Retrieve all users who are members of a specific team to audit membership and understand team-based access permissions.

Instructions

Retrieves a list of all users who are members of a specific team, including their basic information and status. Use this to audit team membership and understand who has team-based access.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamIdYesID of the team to retrieve members for

Implementation Reference

  • Full implementation of getTeamMembersTool, which registers the 'get_team_members' MCP tool. Includes schema definition and the core handler logic that queries the Dataverse API for team members via the teammembership_association relationship.
    export function getTeamMembersTool(server: McpServer, client: DataverseClient) { server.registerTool( "get_team_members", { title: "Get Team Members", description: "Retrieves a list of all users who are members of a specific team, including their basic information and status. Use this to audit team membership and understand who has team-based access.", inputSchema: { teamId: z.string().describe("ID of the team to retrieve members for") } }, async (params) => { try { // Get team members through the many-to-many relationship const response = await client.get(`teams(${params.teamId})/teammembership_association?$select=systemuserid,fullname,domainname,businessunitid,isdisabled&$expand=businessunitid($select=name)`); const members = response.value?.map((member: any) => ({ userId: member.systemuserid, fullName: member.fullname, domainName: member.domainname, businessUnitId: member.businessunitid, businessUnitName: member.businessunitid?.name, isDisabled: member.isdisabled })) || []; return { content: [ { type: "text", text: `Team has ${members.length} member(s):\n\n${JSON.stringify(members, null, 2)}` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error retrieving team members: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } } ); }
  • Input schema for the 'get_team_members' tool using Zod validation, requiring a teamId string.
    { title: "Get Team Members", description: "Retrieves a list of all users who are members of a specific team, including their basic information and status. Use this to audit team membership and understand who has team-based access.", inputSchema: { teamId: z.string().describe("ID of the team to retrieve members for") } },
  • src/index.ts:208-208 (registration)
    Invocation of getTeamMembersTool in the main server setup, which triggers the registration of the 'get_team_members' tool with the MCP server.
    getTeamMembersTool(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