Skip to main content
Glama
ennuiii

Azure DevOps MCP Server with PAT Authentication

by ennuiii

core_list_projects

List Azure DevOps projects by state, name, or pagination parameters using PAT authentication. Customize results with filters for project name, state, and pagination.

Instructions

Retrieve a list of projects in your Azure DevOps organization.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
continuationTokenNoContinuation token for pagination. Used to fetch the next set of results if available.
projectNameFilterNoFilter projects by name. Supports partial matches.
skipNoThe number of projects to skip for pagination. Defaults to 0.
stateFilterNoFilter projects by their state. Defaults to 'wellFormed'.wellFormed
topNoThe maximum number of projects to return. Defaults to 100.

Implementation Reference

  • Handler function that fetches projects from the Azure DevOps organization using the Core API, applies optional filtering and pagination, and returns the results as JSON or an error message.
    async ({ stateFilter, top, skip, continuationToken, projectNameFilter }) => {
      try {
        const connection = await connectionProvider();
        const coreApi = await connection.getCoreApi();
        const projects = await coreApi.getProjects(stateFilter, top, skip, continuationToken, false);
    
        if (!projects) {
          return { content: [{ type: "text", text: "No projects found" }], isError: true };
        }
    
        const filteredProject = projectNameFilter ? filterProjectsByName(projects, projectNameFilter) : projects;
    
        return {
          content: [{ type: "text", text: JSON.stringify(filteredProject, null, 2) }],
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : "Unknown error occurred";
    
        return {
          content: [{ type: "text", text: `Error fetching projects: ${errorMessage}` }],
          isError: true,
        };
      }
    }
  • Zod schema defining the input parameters for the core_list_projects tool.
      stateFilter: z.enum(["all", "wellFormed", "createPending", "deleted"]).default("wellFormed").describe("Filter projects by their state. Defaults to 'wellFormed'."),
      top: z.number().optional().describe("The maximum number of projects to return. Defaults to 100."),
      skip: z.number().optional().describe("The number of projects to skip for pagination. Defaults to 0."),
      continuationToken: z.number().optional().describe("Continuation token for pagination. Used to fetch the next set of results if available."),
      projectNameFilter: z.string().optional().describe("Filter projects by name. Supports partial matches."),
    },
  • Registration of the core_list_projects MCP tool on the server using server.tool(), including schema and handler.
      CORE_TOOLS.list_projects,
      "Retrieve a list of projects in your Azure DevOps organization.",
      {
        stateFilter: z.enum(["all", "wellFormed", "createPending", "deleted"]).default("wellFormed").describe("Filter projects by their state. Defaults to 'wellFormed'."),
        top: z.number().optional().describe("The maximum number of projects to return. Defaults to 100."),
        skip: z.number().optional().describe("The number of projects to skip for pagination. Defaults to 0."),
        continuationToken: z.number().optional().describe("Continuation token for pagination. Used to fetch the next set of results if available."),
        projectNameFilter: z.string().optional().describe("Filter projects by name. Supports partial matches."),
      },
      async ({ stateFilter, top, skip, continuationToken, projectNameFilter }) => {
        try {
          const connection = await connectionProvider();
          const coreApi = await connection.getCoreApi();
          const projects = await coreApi.getProjects(stateFilter, top, skip, continuationToken, false);
    
          if (!projects) {
            return { content: [{ type: "text", text: "No projects found" }], isError: true };
          }
    
          const filteredProject = projectNameFilter ? filterProjectsByName(projects, projectNameFilter) : projects;
    
          return {
            content: [{ type: "text", text: JSON.stringify(filteredProject, null, 2) }],
          };
        } catch (error) {
          const errorMessage = error instanceof Error ? error.message : "Unknown error occurred";
    
          return {
            content: [{ type: "text", text: `Error fetching projects: ${errorMessage}` }],
            isError: true,
          };
        }
      }
    );
  • Helper function used by the handler to filter projects by name.
    function filterProjectsByName(projects: ProjectInfo[], projectNameFilter: string): ProjectInfo[] {
      const lowerCaseFilter = projectNameFilter.toLowerCase();
      return projects.filter((project) => project.name?.toLowerCase().includes(lowerCaseFilter));
    }
  • src/tools.ts:20-20 (registration)
    Invocation of configureCoreTools which registers core tools including core_list_projects.
    configureCoreTools(server, tokenProvider, connectionProvider, userAgentProvider);
Behavior2/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 states this is a retrieval operation, implying read-only behavior, but doesn't disclose important behavioral traits like authentication requirements, rate limits, pagination details (beyond what's in the schema), error conditions, or response format. For a tool with no annotation coverage, this leaves significant gaps.

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 a single, clear sentence with zero waste. It's front-loaded with the core purpose and appropriately sized for a simple list operation. Every word earns its place.

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 the tool's moderate complexity (5 parameters, no output schema, no annotations), the description is minimally adequate but incomplete. It covers the basic purpose but lacks behavioral context, usage guidelines, and output details. For a list tool with filtering and pagination, more guidance would be helpful.

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 description adds no parameter semantics beyond what's already in the schema (which has 100% coverage). It doesn't explain how parameters interact, provide examples, or clarify edge cases. With high schema coverage, the baseline is 3, but the description doesn't compensate with additional insights.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Retrieve') and resource ('list of projects in your Azure DevOps organization'), making the purpose immediately understandable. However, it doesn't differentiate this tool from other list/retrieve tools in the sibling set (like core_list_project_teams or repo_list_repos_by_project), which would require a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any prerequisites, context for filtering, or comparison to sibling tools like core_list_project_teams. The agent must infer usage solely from the tool name and parameters.

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

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