Skip to main content
Glama

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

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

Implementation Reference

  • 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);
    };
  • 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']
      }
    },
  • Registration of the gitlab_get_trigger_token tool mapping to its handler function from cicdHandlers.
    gitlab_get_trigger_token: cicdHandlers.getTriggerToken,

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