Skip to main content
Glama
Alosies
by Alosies

cancel_pipeline

Stop a running GitLab pipeline by specifying the project and pipeline ID to halt execution and prevent further resource consumption.

Instructions

Cancel a running pipeline

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pipeline_idYesPipeline ID
project_idYesProject ID or path

Implementation Reference

  • The core handler function for the 'cancel_pipeline' tool. It makes a POST request to the GitLab API to cancel the pipeline and returns the JSON response.
    async cancelPipeline(args: PipelineActionParams) { const data = await this.client.post(`/projects/${encodeURIComponent(args.project_id)}/pipelines/${args.pipeline_id}/cancel`); return { content: [ { type: 'text', text: JSON.stringify(data, null, 2), }, ], }; }
  • TypeScript interface defining the input parameters for pipeline actions, including cancel_pipeline.
    export interface PipelineActionParams { project_id: string; pipeline_id: number; }
  • Tool registration definition including name, description, and input JSON schema.
    { name: 'cancel_pipeline', description: 'Cancel a running pipeline', inputSchema: { type: 'object', properties: { project_id: { type: 'string', description: 'Project ID or path', }, pipeline_id: { type: 'number', description: 'Pipeline ID', }, }, required: ['project_id', 'pipeline_id'], }, },
  • src/server.ts:303-306 (registration)
    Server switch case that routes calls to the cancel_pipeline tool to the appropriate handler.
    case "cancel_pipeline": return await this.pipelineHandlers.cancelPipeline( args as unknown as PipelineActionParams );

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/Alosies/gitlab-mcp-server'

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