gitlab_get_trigger_token
Retrieve pipeline trigger token details for a specified project and trigger ID using the GitLab MCP Server. Facilitates access to CI/CD pipeline automation tokens for workflow management.
Instructions
Get details of a pipeline trigger token
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The ID or URL-encoded path of the project | |
| trigger_id | Yes | The ID of the trigger |
Input Schema (JSON Schema)
{
"properties": {
"project_id": {
"description": "The ID or URL-encoded path of the project",
"type": "string"
},
"trigger_id": {
"description": "The ID of the trigger",
"type": "number"
}
},
"required": [
"project_id",
"trigger_id"
],
"type": "object"
}
Implementation Reference
- src/handlers/cicd-handlers.ts:25-33 (handler)The main handler function that implements the gitlab_get_trigger_token tool logic, validating inputs and calling the ciCdManager to retrieve the trigger token.export const getTriggerToken: ToolHandler = async (params, context) => { const { project_id, trigger_id } = params.arguments || {}; if (!project_id || !trigger_id) { throw new McpError(ErrorCode.InvalidParams, 'project_id and trigger_id are required'); } const data = await context.ciCdManager.getTriggerToken(project_id as string | number, trigger_id as number); return formatResponse(data); };
- src/utils/tools-data.ts:503-520 (schema)The input schema definition for the gitlab_get_trigger_token tool, specifying parameters project_id and trigger_id.{ name: 'gitlab_get_trigger_token', description: 'Get details of a pipeline trigger token', inputSchema: { type: 'object', properties: { project_id: { type: 'string', description: 'The ID or URL-encoded path of the project' }, trigger_id: { type: 'number', description: 'The ID of the trigger' } }, required: ['project_id', 'trigger_id'] } },
- src/utils/tool-registry.ts:51-51 (registration)Registration of the gitlab_get_trigger_token tool mapping to its handler function from cicdHandlers.gitlab_get_trigger_token: cicdHandlers.getTriggerToken,