Skip to main content
Glama

gitlab_create_trigger_token

Generate a pipeline trigger token for GitLab projects to initiate CI/CD workflows. Specify the project ID and a description to create and manage automation triggers.

Instructions

Create a new pipeline trigger token

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionYesThe trigger description
project_idYesThe ID or URL-encoded path of the project

Implementation Reference

  • The main handler function that implements the logic for the 'gitlab_create_trigger_token' tool. It extracts parameters, validates project_id, calls the CI/CD manager to create the trigger token, and formats the response.
    export const createTriggerToken: ToolHandler = async (params, context) => { const { project_id, description } = params.arguments || {}; if (!project_id) { throw new McpError(ErrorCode.InvalidParams, 'project_id is required'); } const data = await context.ciCdManager.createTriggerToken(project_id as string | number, description as string); return formatResponse(data); };
  • The input schema and metadata definition for the 'gitlab_create_trigger_token' tool, including description and required parameters.
    { name: 'gitlab_create_trigger_token', description: 'Create a new pipeline trigger token', inputSchema: { type: 'object', properties: { project_id: { type: 'string', description: 'The ID or URL-encoded path of the project' }, description: { type: 'string', description: 'The trigger description' } }, required: ['project_id', 'description'] } },
  • The registration entry in the tool registry that maps the tool name 'gitlab_create_trigger_token' to its handler function.
    gitlab_create_trigger_token: cicdHandlers.createTriggerToken,

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

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