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
| Name | Required | Description | Default |
|---|---|---|---|
| teamId | Yes | ID of the team to retrieve |
Implementation Reference
- src/tools/team-tools.ts:103-154 (handler)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 }; } } );
- src/tools/team-tools.ts:96-102 (schema)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") } },
- src/tools/team-tools.ts:94-155 (registration)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 }; } } ); }
- src/tools/team-tools.ts:531-539 (helper)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'; } }
- src/tools/team-tools.ts:541-549 (helper)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'; } }