Skip to main content
Glama
ennuiii

Azure DevOps MCP Server with PAT Authentication

by ennuiii

core_list_project_teams

Retrieve a list of teams for a specific Azure DevOps project, with options to filter by user membership, paginate results, and limit the number of teams returned.

Instructions

Retrieve a list of teams for the specified Azure DevOps project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mineNoIf true, only return teams that the authenticated user is a member of.
projectYesThe name or ID of the Azure DevOps project.
skipNoThe number of teams to skip for pagination. Defaults to 0.
topNoThe maximum number of teams to return. Defaults to 100.

Implementation Reference

  • The handler function that executes the tool logic: connects to Azure DevOps CoreApi, fetches teams for the given project (optionally filtering by membership, paginated), returns JSON string or error.
    async ({ project, mine, top, skip }) => { try { const connection = await connectionProvider(); const coreApi = await connection.getCoreApi(); const teams = await coreApi.getTeams(project, mine, top, skip, false); if (!teams) { return { content: [{ type: "text", text: "No teams found" }], isError: true }; } return { content: [{ type: "text", text: JSON.stringify(teams, null, 2) }], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : "Unknown error occurred"; return { content: [{ type: "text", text: `Error fetching project teams: ${errorMessage}` }], isError: true, }; } }
  • Input schema using Zod for validating tool parameters: project (string, required), mine/top/skip (optional).
    { project: z.string().describe("The name or ID of the Azure DevOps project."), mine: z.boolean().optional().describe("If true, only return teams that the authenticated user is a member of."), top: z.number().optional().describe("The maximum number of teams to return. Defaults to 100."), skip: z.number().optional().describe("The number of teams to skip for pagination. Defaults to 0."), },
  • Registration of the 'core_list_project_teams' tool on the McpServer, including description, schema, and handler.
    server.tool( CORE_TOOLS.list_project_teams, "Retrieve a list of teams for the specified Azure DevOps project.", { project: z.string().describe("The name or ID of the Azure DevOps project."), mine: z.boolean().optional().describe("If true, only return teams that the authenticated user is a member of."), top: z.number().optional().describe("The maximum number of teams to return. Defaults to 100."), skip: z.number().optional().describe("The number of teams to skip for pagination. Defaults to 0."), }, async ({ project, mine, top, skip }) => { try { const connection = await connectionProvider(); const coreApi = await connection.getCoreApi(); const teams = await coreApi.getTeams(project, mine, top, skip, false); if (!teams) { return { content: [{ type: "text", text: "No teams found" }], isError: true }; } return { content: [{ type: "text", text: JSON.stringify(teams, null, 2) }], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : "Unknown error occurred"; return { content: [{ type: "text", text: `Error fetching project teams: ${errorMessage}` }], isError: true, }; } } );
  • Constant object mapping internal names to MCP tool names, used in registration.
    const CORE_TOOLS = { list_project_teams: "core_list_project_teams", list_projects: "core_list_projects", get_identity_ids: "core_get_identity_ids", };
  • src/tools.ts:20-20 (registration)
    Invocation of configureCoreTools which registers the core tools including core_list_project_teams.
    configureCoreTools(server, tokenProvider, connectionProvider, userAgentProvider);

Other Tools

Related 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/ennuiii/DevOpsMcpPAT'

If you have feedback or need assistance with the MCP directory API, please join our Discord server