Skip to main content
Glama
nikydobrev

Azure DevOps Multi-Organization MCP Server

by nikydobrev

pipelines_run_pipeline

Trigger Azure DevOps pipeline runs with custom parameters, variables, and resource configurations to automate build and deployment workflows.

Instructions

Triggers a new pipeline run with optional parameters and variables

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationYesThe name of the Azure DevOps organization
projectYesProject ID or name to run the build in
pipelineIdYesID of the pipeline to run
pipelineVersionNoVersion of the pipeline to run. If not provided, the latest version will be used.
previewRunNoIf true, returns the final YAML document after parsing templates without creating a new run.
resourcesNoA dictionary of resources to pass to the pipeline.
stagesToSkipNoA list of stages to skip.
templateParametersNoCustom build parameters as key-value pairs
variablesNoA dictionary of variables to pass to the pipeline.
yamlOverrideNoYAML override for the pipeline run.

Implementation Reference

  • The handler function that executes the tool: validates yamlOverride with previewRun, constructs the runRequest, calls pipelinesApi.runPipeline, and returns the pipeline run as JSON text.
    async ({ organization, project, pipelineId, pipelineVersion, previewRun, resources, stagesToSkip, templateParameters, variables, yamlOverride }) => {
        if (!previewRun && yamlOverride) {
            throw new Error("Parameter 'yamlOverride' can only be specified together with parameter 'previewRun'.");
        }
        const connection = await connectionManager.getConnection(organization);
        const pipelinesApi = await connection.getPipelinesApi();
        const runRequest = {
            previewRun: previewRun,
            resources: {
                ...resources,
            },
            stagesToSkip: stagesToSkip,
            templateParameters: templateParameters,
            variables: variables,
            yamlOverride: yamlOverride,
        };
        const pipelineRun = await pipelinesApi.runPipeline(runRequest as any, project, pipelineId, pipelineVersion);
        return {
            content: [{ type: "text", text: JSON.stringify(pipelineRun, null, 2) }],
        };
    }
  • Zod schema defining the input parameters for the pipelines_run_pipeline tool, including organization, project, pipelineId, and optional parameters like variables, resources, etc.
    {
        organization: z.string().describe("The name of the Azure DevOps organization"),
        project: z.string().describe("Project ID or name to run the build in"),
        pipelineId: z.number().describe("ID of the pipeline to run"),
        pipelineVersion: z.number().optional().describe("Version of the pipeline to run. If not provided, the latest version will be used."),
        previewRun: z.boolean().optional().describe("If true, returns the final YAML document after parsing templates without creating a new run."),
        resources: resourcesSchema.optional().describe("A dictionary of resources to pass to the pipeline."),
        stagesToSkip: z.array(z.string()).optional().describe("A list of stages to skip."),
        templateParameters: z.record(z.string(), z.string()).optional().describe("Custom build parameters as key-value pairs"),
        variables: z.record(z.string(), variableSchema).optional().describe("A dictionary of variables to pass to the pipeline."),
        yamlOverride: z.string().optional().describe("YAML override for the pipeline run."),
    },
  • The server.tool call that registers the pipelines_run_pipeline tool with its schema and handler function.
    server.tool(
      "pipelines_run_pipeline",
      "Triggers a new pipeline run with optional parameters and variables",
      {
          organization: z.string().describe("The name of the Azure DevOps organization"),
          project: z.string().describe("Project ID or name to run the build in"),
          pipelineId: z.number().describe("ID of the pipeline to run"),
          pipelineVersion: z.number().optional().describe("Version of the pipeline to run. If not provided, the latest version will be used."),
          previewRun: z.boolean().optional().describe("If true, returns the final YAML document after parsing templates without creating a new run."),
          resources: resourcesSchema.optional().describe("A dictionary of resources to pass to the pipeline."),
          stagesToSkip: z.array(z.string()).optional().describe("A list of stages to skip."),
          templateParameters: z.record(z.string(), z.string()).optional().describe("Custom build parameters as key-value pairs"),
          variables: z.record(z.string(), variableSchema).optional().describe("A dictionary of variables to pass to the pipeline."),
          yamlOverride: z.string().optional().describe("YAML override for the pipeline run."),
      },
      async ({ organization, project, pipelineId, pipelineVersion, previewRun, resources, stagesToSkip, templateParameters, variables, yamlOverride }) => {
          if (!previewRun && yamlOverride) {
              throw new Error("Parameter 'yamlOverride' can only be specified together with parameter 'previewRun'.");
          }
          const connection = await connectionManager.getConnection(organization);
          const pipelinesApi = await connection.getPipelinesApi();
          const runRequest = {
              previewRun: previewRun,
              resources: {
                  ...resources,
              },
              stagesToSkip: stagesToSkip,
              templateParameters: templateParameters,
              variables: variables,
              yamlOverride: yamlOverride,
          };
          const pipelineRun = await pipelinesApi.runPipeline(runRequest as any, project, pipelineId, pipelineVersion);
          return {
              content: [{ type: "text", text: JSON.stringify(pipelineRun, null, 2) }],
          };
      }
    );
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It mentions 'triggers a new pipeline run' which implies a write/mutation operation, but doesn't disclose critical traits like authentication requirements, rate limits, whether it's asynchronous, what happens on failure, or if it returns a run ID. The optional 'previewRun' parameter hints at a dry-run capability, but this isn't explained in the description.

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 that gets straight to the point with zero wasted words. It's appropriately sized for a tool with comprehensive schema documentation and is front-loaded with the core action.

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?

For a complex mutation tool with 10 parameters, nested objects, no annotations, and no output schema, the description is inadequate. It doesn't explain what happens after triggering (e.g., returns a run ID, is asynchronous), error conditions, or operational constraints. The agent would struggle to use this tool effectively without trial and error.

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 the schema fully documents all 10 parameters. The description adds minimal value beyond the schema, mentioning 'optional parameters and variables' which loosely references some parameters but doesn't provide additional context about their purpose or relationships. Baseline 3 is appropriate when the schema does the heavy lifting.

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 action ('Triggers a new pipeline run') and mentions optional parameters and variables, which gives a good sense of scope. However, it doesn't explicitly differentiate this tool from sibling pipeline tools like 'pipelines_get_builds' or 'pipelines_list_runs', which are read operations versus this write operation.

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 prerequisites (e.g., needing a pipeline ID), when not to use it (e.g., for read-only operations), or refer to sibling tools for related tasks like checking pipeline status or listing runs.

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

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