gitlab_list_trigger_tokens
Retrieve pipeline trigger tokens for a specified GitLab project by providing its ID or URL-encoded path. Use this tool to manage and monitor CI/CD pipeline triggers effectively.
Instructions
List pipeline trigger tokens
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The ID or URL-encoded path of the project |
Input Schema (JSON Schema)
{
"properties": {
"project_id": {
"description": "The ID or URL-encoded path of the project",
"type": "string"
}
},
"required": [
"project_id"
],
"type": "object"
}
Implementation Reference
- src/handlers/cicd-handlers.ts:12-20 (handler)The main handler function for the gitlab_list_trigger_tokens tool. It validates the project_id parameter and calls context.ciCdManager.listTriggerTokens to fetch the list of pipeline trigger tokens, then formats the response.export const listTriggerTokens: ToolHandler = async (params, context) => { const { project_id } = params.arguments || {}; if (!project_id) { throw new McpError(ErrorCode.InvalidParams, 'project_id is required'); } const data = await context.ciCdManager.listTriggerTokens(project_id as string | number); return formatResponse(data); };
- src/utils/tools-data.ts:489-502 (schema)The input schema definition for the gitlab_list_trigger_tokens tool, specifying the required project_id parameter.{ name: 'gitlab_list_trigger_tokens', description: 'List pipeline trigger tokens', inputSchema: { type: 'object', properties: { project_id: { type: 'string', description: 'The ID or URL-encoded path of the project' } }, required: ['project_id'] } },
- src/utils/tool-registry.ts:50-50 (registration)Registration of the gitlab_list_trigger_tokens tool in the tool registry, mapping the tool name to its handler function cicdHandlers.listTriggerTokens.gitlab_list_trigger_tokens: cicdHandlers.listTriggerTokens,