Skip to main content
Glama
Tiberriver256

Azure DevOps MCP Server

list_pipelines

Retrieve and display Azure DevOps pipeline configurations for a project, enabling users to view pipeline details, filter results, and manage CI/CD workflows.

Instructions

List pipelines in a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdNoThe ID or name of the project (Default: MyProject)
topNoMaximum number of pipelines to return
orderByNoOrder by field and direction (e.g., "createdDate desc")

Implementation Reference

  • The main handler function implementing the list_pipelines tool logic by fetching pipelines via Azure DevOps Pipelines API with error handling.
    export async function listPipelines(
      connection: WebApi,
      options: ListPipelinesOptions,
    ): Promise<Pipeline[]> {
      try {
        const pipelinesApi = await connection.getPipelinesApi();
        const { projectId, orderBy, top, continuationToken } = options;
    
        // Call the pipelines API to get the list of pipelines
        const pipelines = await pipelinesApi.listPipelines(
          projectId,
          orderBy,
          top,
          continuationToken,
        );
    
        return pipelines;
      } catch (error) {
        // Handle specific error types
        if (error instanceof AzureDevOpsError) {
          throw error;
        }
    
        // Check for specific error types and convert to appropriate Azure DevOps errors
        if (error instanceof Error) {
          if (
            error.message.includes('Authentication') ||
            error.message.includes('Unauthorized') ||
            error.message.includes('401')
          ) {
            throw new AzureDevOpsAuthenticationError(
              `Failed to authenticate: ${error.message}`,
            );
          }
    
          if (
            error.message.includes('not found') ||
            error.message.includes('does not exist') ||
            error.message.includes('404')
          ) {
            throw new AzureDevOpsResourceNotFoundError(
              `Project or resource not found: ${error.message}`,
            );
          }
        }
    
        // Otherwise, wrap it in a generic error
        throw new AzureDevOpsError(
          `Failed to list pipelines: ${error instanceof Error ? error.message : String(error)}`,
        );
      }
    }
  • Zod schema for input validation of the list_pipelines tool parameters (projectId, top, orderBy).
    export const ListPipelinesSchema = z.object({
      // The project to list pipelines from
      projectId: z
        .string()
        .optional()
        .describe(`The ID or name of the project (Default: ${defaultProject})`),
      // Maximum number of pipelines to return
      top: z.number().optional().describe('Maximum number of pipelines to return'),
      // Order by field and direction
      orderBy: z
        .string()
        .optional()
        .describe('Order by field and direction (e.g., "createdDate desc")'),
    });
  • ToolDefinition registration for list_pipelines, including name, description, input schema conversion, and MCP flag.
    {
      name: 'list_pipelines',
      description: 'List pipelines in a project',
      inputSchema: zodToJsonSchema(ListPipelinesSchema),
      mcp_enabled: true,
  • Dispatch handler in pipelines feature that handles list_pipelines requests by parsing arguments and calling the listPipelines function.
    case 'list_pipelines': {
      const args = ListPipelinesSchema.parse(request.params.arguments);
      const result = await listPipelines(connection, {
        ...args,
        projectId: args.projectId ?? defaultProject,
      });
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
  • TypeScript interface defining the options structure used by the listPipelines handler.
    export interface ListPipelinesOptions {
      projectId: string;
      orderBy?: string;
      top?: number;
      continuationToken?: string;
    }
Behavior2/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 states a read operation ('List'), implying it's non-destructive, but fails to mention key traits such as pagination behavior, rate limits, authentication requirements, or what the output format looks like. This is insufficient 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 a single, efficient sentence with zero wasted words. It's front-loaded and appropriately sized for its purpose, making it easy to parse quickly without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't address behavioral aspects like pagination, error handling, or output structure, which are critical for a list operation. For a tool with no structured metadata, this leaves significant gaps in understanding.

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, documenting all three parameters clearly. The description adds no additional meaning beyond the schema, such as explaining default behaviors or constraints. This meets the baseline of 3 since the schema does the heavy lifting, but the description doesn't enhance parameter understanding.

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

Purpose3/5

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

The description 'List pipelines in a project' clearly states the verb ('List') and resource ('pipelines'), but it's vague about scope and lacks differentiation from sibling tools like 'list_pipeline_runs' or 'get_pipeline'. It doesn't specify whether it returns active, archived, or all pipelines, making it minimally adequate but with gaps.

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?

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't mention how it differs from 'list_pipeline_runs' or 'get_pipeline', nor does it specify prerequisites like needing project access. This leaves the agent without context for tool selection.

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/Tiberriver256/mcp-server-azure-devops'

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