gitlab_update_trigger_token
Modify a pipeline trigger token's description in a GitLab project by specifying the project ID and trigger ID. Essential for updating trigger details in CI/CD workflows.
Instructions
Update a pipeline trigger token
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | The new trigger description | |
| 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": {
"description": {
"description": "The new trigger description",
"type": "string"
},
"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",
"description"
],
"type": "object"
}
Implementation Reference
- src/handlers/cicd-handlers.ts:51-59 (handler)The main handler function that executes the gitlab_update_trigger_token tool logic. It validates input parameters (project_id, trigger_id required; description optional) and delegates to the ciCdManager.updateTriggerToken method.export const updateTriggerToken: ToolHandler = async (params, context) => { const { project_id, trigger_id, description } = params.arguments || {}; if (!project_id || !trigger_id) { throw new McpError(ErrorCode.InvalidParams, 'project_id and trigger_id are required'); } const data = await context.ciCdManager.updateTriggerToken(project_id as string | number, trigger_id as number, description as string); return formatResponse(data); };
- src/utils/tools-data.ts:539-559 (schema)JSON schema defining the input parameters for the gitlab_update_trigger_token tool: project_id (string, required), trigger_id (number, required), description (string, required). Note: handler makes description optional.{ name: 'gitlab_update_trigger_token', description: 'Update 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' }, description: { type: 'string', description: 'The new trigger description' } }, required: ['project_id', 'trigger_id', 'description'] }
- src/utils/tool-registry.ts:53-53 (registration)Maps the tool name 'gitlab_update_trigger_token' to its handler function cicdHandlers.updateTriggerToken in the central tool registry.gitlab_update_trigger_token: cicdHandlers.updateTriggerToken,