Skip to main content
Glama
mwhesse

Dataverse MCP Server

by mwhesse

Get Team Members

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

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

No annotations are provided, so the description carries full burden. It implies a read-only operation ('Retrieves') and hints at output content ('basic information and status'), but lacks details on permissions, rate limits, pagination, or error handling. The description adds some behavioral context but leaves gaps for a tool with no annotation coverage.

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 two sentences, front-loaded with the core purpose and followed by usage context. Every sentence adds value without redundancy, making it efficient and well-structured.

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 no annotations and no output schema, the description adequately covers the tool's purpose and usage but lacks details on behavioral traits like authentication needs or return format. It is complete enough for a simple read operation but could be more informative for agent invocation.

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 the single parameter 'teamId' well-documented in the schema. The description does not add any parameter-specific details beyond what the schema provides, such as format examples or constraints, so it meets the baseline for high schema coverage.

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 verb ('Retrieves') and resource ('list of all users who are members of a specific team'), specifying the scope ('including their basic information and status'). It distinguishes from siblings like 'get_businessunit_users' by focusing on team membership rather than business unit affiliation.

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 usage ('to audit team membership and understand who has team-based access'), but does not explicitly state when NOT to use it or name specific alternatives among the many sibling tools, such as 'get_businessunit_users' for a different organizational scope.

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