Skip to main content
Glama
mwhesse

Dataverse MCP Server

by mwhesse

Get Dataverse Team

get_dataverse_team

Retrieve detailed team information including properties, administrators, business unit associations, and configuration settings to inspect team definitions and understand organizational structure.

Instructions

Retrieves detailed information about a specific team including its properties, administrator, business unit association, and configuration settings. Use this to inspect team definitions and understand team structure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamIdYesID of the team to retrieve

Implementation Reference

  • Executes the tool logic: fetches detailed team information from Dataverse using the teamId, formats it into a structured object, and returns it as text content.
      async (params) => {
        try {
          const team = await client.get(`teams(${params.teamId})?$select=teamid,name,description,teamtype,membershiptype,emailaddress,yominame,azureactivedirectoryobjectid,businessunitid,administratorid,queueid,delegatedauthorizationid,transactioncurrencyid,createdon,modifiedon,createdby,modifiedby,isdefault,systemmanaged&$expand=administratorid($select=fullname),businessunitid($select=name),createdby($select=fullname),modifiedby($select=fullname)`);
    
          const teamInfo = {
            teamId: team.teamid,
            name: team.name,
            description: team.description,
            teamType: team.teamtype,
            teamTypeLabel: getTeamTypeLabel(team.teamtype),
            membershipType: team.membershiptype,
            membershipTypeLabel: getMembershipTypeLabel(team.membershiptype),
            emailAddress: team.emailaddress,
            yomiName: team.yominame,
            azureActiveDirectoryObjectId: team.azureactivedirectoryobjectid,
            businessUnitId: team.businessunitid,
            businessUnitName: team.businessunitid?.name,
            administratorId: team.administratorid,
            administratorName: team.administratorid?.fullname,
            queueId: team.queueid,
            teamTemplateId: team.teamtemplateid,
            delegatedAuthorizationId: team.delegatedauthorizationid,
            transactionCurrencyId: team.transactioncurrencyid,
            createdOn: team.createdon,
            modifiedOn: team.modifiedon,
            createdBy: team.createdby?.fullname,
            modifiedBy: team.modifiedby?.fullname,
            isDefault: team.isdefault,
            systemManaged: team.systemmanaged
          };
    
          return {
            content: [
              {
                type: "text",
                text: `Team information:\n\n${JSON.stringify(teamInfo, null, 2)}`
              }
            ]
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error retrieving team: ${error instanceof Error ? error.message : 'Unknown error'}`
              }
            ],
            isError: true
          };
        }
      }
    );
  • Defines the tool's input schema (teamId), title, and description.
    {
      title: "Get Dataverse Team",
      description: "Retrieves detailed information about a specific team including its properties, administrator, business unit association, and configuration settings. Use this to inspect team definitions and understand team structure.",
      inputSchema: {
        teamId: z.string().describe("ID of the team to retrieve")
      }
    },
  • Registers the 'get_dataverse_team' tool with the MCP server using server.registerTool, including schema and handler.
      server.registerTool(
        "get_dataverse_team",
        {
          title: "Get Dataverse Team",
          description: "Retrieves detailed information about a specific team including its properties, administrator, business unit association, and configuration settings. Use this to inspect team definitions and understand team structure.",
          inputSchema: {
            teamId: z.string().describe("ID of the team to retrieve")
          }
        },
        async (params) => {
          try {
            const team = await client.get(`teams(${params.teamId})?$select=teamid,name,description,teamtype,membershiptype,emailaddress,yominame,azureactivedirectoryobjectid,businessunitid,administratorid,queueid,delegatedauthorizationid,transactioncurrencyid,createdon,modifiedon,createdby,modifiedby,isdefault,systemmanaged&$expand=administratorid($select=fullname),businessunitid($select=name),createdby($select=fullname),modifiedby($select=fullname)`);
    
            const teamInfo = {
              teamId: team.teamid,
              name: team.name,
              description: team.description,
              teamType: team.teamtype,
              teamTypeLabel: getTeamTypeLabel(team.teamtype),
              membershipType: team.membershiptype,
              membershipTypeLabel: getMembershipTypeLabel(team.membershiptype),
              emailAddress: team.emailaddress,
              yomiName: team.yominame,
              azureActiveDirectoryObjectId: team.azureactivedirectoryobjectid,
              businessUnitId: team.businessunitid,
              businessUnitName: team.businessunitid?.name,
              administratorId: team.administratorid,
              administratorName: team.administratorid?.fullname,
              queueId: team.queueid,
              teamTemplateId: team.teamtemplateid,
              delegatedAuthorizationId: team.delegatedauthorizationid,
              transactionCurrencyId: team.transactioncurrencyid,
              createdOn: team.createdon,
              modifiedOn: team.modifiedon,
              createdBy: team.createdby?.fullname,
              modifiedBy: team.modifiedby?.fullname,
              isDefault: team.isdefault,
              systemManaged: team.systemmanaged
            };
    
            return {
              content: [
                {
                  type: "text",
                  text: `Team information:\n\n${JSON.stringify(teamInfo, null, 2)}`
                }
              ]
            };
          } catch (error) {
            return {
              content: [
                {
                  type: "text",
                  text: `Error retrieving team: ${error instanceof Error ? error.message : 'Unknown error'}`
                }
              ],
              isError: true
            };
          }
        }
      );
    }
  • Helper function to convert team type numeric value to human-readable label, used in the handler.
    function getTeamTypeLabel(teamType: number): string {
      switch (teamType) {
        case 0: return 'Owner';
        case 1: return 'Access';
        case 2: return 'Security Group';
        case 3: return 'Office Group';
        default: return 'Unknown';
      }
    }
  • Helper function to convert membership type numeric value to human-readable label, used in the handler.
    function getMembershipTypeLabel(membershipType: number): string {
      switch (membershipType) {
        case 0: return 'Members and guests';
        case 1: return 'Members';
        case 2: return 'Owners';
        case 3: return 'Guests';
        default: return 'Unknown';
      }
    }
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 correctly indicates this is a read operation ('retrieves'), but doesn't mention potential authentication requirements, rate limits, error conditions, or what happens if the team doesn't exist. The description adds some context about what information is returned, but leaves behavioral aspects incomplete.

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 efficiently structured in two sentences: the first states the core functionality and scope, the second provides usage guidance. Every sentence earns its place with no redundant information, making it appropriately sized and front-loaded.

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?

For a read operation with no annotations and no output schema, the description provides adequate but incomplete context. It specifies what information is returned, but doesn't describe the response format, potential pagination, or error handling. Given the tool's relative simplicity and complete parameter documentation, this represents a minimum viable level of 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?

The input schema has 100% description coverage, with the 'teamId' parameter clearly documented. The description doesn't add any parameter-specific information beyond what the schema already provides, such as format examples or constraints. With complete schema coverage, the baseline score of 3 is appropriate.

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 ('specific team'), specifies the scope of information returned ('properties, administrator, business unit association, and configuration settings'), and distinguishes from siblings like 'list_dataverse_teams' by focusing on a single team's details rather than listing multiple teams.

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 this tool ('to inspect team definitions and understand team structure'), which implicitly differentiates it from list operations. However, it doesn't explicitly mention when not to use it or name specific alternatives like 'list_dataverse_teams' for bulk retrieval.

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