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
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | The trigger description | |
| project_id | Yes | The ID or URL-encoded path of the project |
Implementation Reference
- src/handlers/cicd-handlers.ts:38-46 (handler)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); };
- src/utils/tools-data.ts:521-538 (schema)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'] } },
- src/utils/tool-registry.ts:52-52 (registration)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,