pipelines_get_run
Retrieve detailed information about a specific Azure DevOps pipeline run, including status, logs, and execution data for monitoring and analysis.
Instructions
Gets details of a specific pipeline run
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| organization | Yes | The name of the Azure DevOps organization | |
| project | Yes | Project ID or name to run the build in | |
| pipelineId | Yes | ID of the pipeline to run | |
| runId | Yes | ID of the run to get |
Implementation Reference
- src/tools/pipelines.ts:266-273 (handler)The handler function for the pipelines_get_run tool. It retrieves a connection, gets the Pipelines API client, fetches the specific pipeline run by project, pipelineId, and runId, and returns the details as a JSON string in the tool response format.async ({ organization, project, pipelineId, runId }) => { const connection = await connectionManager.getConnection(organization); const pipelinesApi = await connection.getPipelinesApi(); const pipelineRun = await pipelinesApi.getRun(project, pipelineId, runId); return { content: [{ type: "text", text: JSON.stringify(pipelineRun, null, 2) }], }; }
- src/tools/pipelines.ts:260-265 (schema)Zod input schema for the pipelines_get_run tool, validating organization (string), project (string), pipelineId (number), and runId (number).{ 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"), runId: z.number().describe("ID of the run to get"), },
- src/tools/pipelines.ts:257-274 (registration)Registration of the pipelines_get_run tool within the registerPipelineTools function using McpServer's server.tool method, including the tool name, description, input schema, and handler implementation.server.tool( "pipelines_get_run", "Gets details of a specific pipeline run", { 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"), runId: z.number().describe("ID of the run to get"), }, async ({ organization, project, pipelineId, runId }) => { const connection = await connectionManager.getConnection(organization); const pipelinesApi = await connection.getPipelinesApi(); const pipelineRun = await pipelinesApi.getRun(project, pipelineId, runId); return { content: [{ type: "text", text: JSON.stringify(pipelineRun, null, 2) }], }; } );