Skip to main content
Glama
Tiberriver256

Azure DevOps MCP Server

get_pipeline

Retrieve details of a specific Azure DevOps pipeline by providing its ID, including project context and optional version specification.

Instructions

Get details of a specific pipeline

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdNoThe ID or name of the project (Default: MyProject)
pipelineIdYesThe numeric ID of the pipeline to retrieve
pipelineVersionNoThe version of the pipeline to retrieve (latest if not specified)

Implementation Reference

  • The main handler function 'getPipeline' that executes the tool logic, fetching pipeline details from Azure DevOps API.
    export async function getPipeline(
      connection: WebApi,
      options: GetPipelineOptions,
    ): Promise<Pipeline> {
      try {
        const pipelinesApi = await connection.getPipelinesApi();
        const { projectId, pipelineId, pipelineVersion } = options;
    
        // Call the pipelines API to get the pipeline
        const pipeline = await pipelinesApi.getPipeline(
          projectId,
          pipelineId,
          pipelineVersion,
        );
    
        // If pipeline not found, API returns null instead of throwing error
        if (pipeline === null) {
          throw new AzureDevOpsResourceNotFoundError(
            `Pipeline not found with ID: ${pipelineId}`,
          );
        }
    
        return pipeline;
      } 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(
              `Pipeline or project not found: ${error.message}`,
            );
          }
        }
    
        // Otherwise, wrap it in a generic error
        throw new AzureDevOpsError(
          `Failed to get pipeline: ${error instanceof Error ? error.message : String(error)}`,
        );
      }
    }
  • Zod schema defining the input parameters for the 'get_pipeline' tool: projectId, pipelineId, pipelineVersion.
    export const GetPipelineSchema = z.object({
      // The project containing the pipeline
      projectId: z
        .string()
        .optional()
        .describe(`The ID or name of the project (Default: ${defaultProject})`),
      // The ID of the pipeline to retrieve
      pipelineId: z
        .number()
        .int()
        .positive()
        .describe('The numeric ID of the pipeline to retrieve'),
      // The version of the pipeline to retrieve
      pipelineVersion: z
        .number()
        .int()
        .positive()
        .optional()
        .describe(
          'The version of the pipeline to retrieve (latest if not specified)',
        ),
    });
  • Registration of the 'get_pipeline' tool in the pipelinesTools array, including name, description, and input schema.
    {
      name: 'get_pipeline',
      description: 'Get details of a specific pipeline',
      inputSchema: zodToJsonSchema(GetPipelineSchema),
      mcp_enabled: true,
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states it 'gets details' but doesn't clarify what details are returned, whether authentication is needed, if there are rate limits, or how errors are handled. This leaves significant gaps for a tool that likely interacts with a pipeline system.

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 no wasted words. It's front-loaded with the core action and resource, making it highly efficient and easy to parse.

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 insufficient. It doesn't explain what 'details' include, potential side effects, or error conditions. For a tool that retrieves pipeline information in a system with many related tools, more context is needed to ensure proper use.

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?

Schema description coverage is 100%, so parameters are well-documented in the schema itself. The description adds no additional meaning about parameters beyond implying retrieval of a 'specific' pipeline, which aligns with the schema but doesn't provide extra context. This meets the baseline for high schema coverage.

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 ('Get') and resource ('details of a specific pipeline'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'get_pipeline_run' or 'list_pipelines', which would require explicit comparison to achieve a perfect score.

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 like 'list_pipelines' (for overviews) or 'get_pipeline_run' (for execution details). The description assumes context but offers no explicit usage rules or exclusions.

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