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,
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states a read operation ('Get details'). It lacks behavioral details such as authentication requirements, rate limits, error conditions, or what specific details are returned (e.g., token value, permissions). This is inadequate for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It is front-loaded with the core action and resource, making it easy to parse quickly, though it could benefit from more detail given the lack of annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete. It doesn't explain what details are returned (e.g., token string, metadata), behavioral traits, or error handling. For a tool that likely returns sensitive data like a trigger token, this leaves significant gaps for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, clearly documenting both parameters. The description adds no additional parameter semantics beyond implying a pipeline trigger token is fetched, which the schema already covers. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get details') and resource ('pipeline trigger token'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'gitlab_get_cicd_variable' or 'gitlab_get_webhook' beyond the resource name, missing explicit distinction in functionality scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites like needing a project and trigger ID, nor does it compare to related tools such as 'gitlab_list_trigger_tokens' or 'gitlab_update_trigger_token', leaving usage context unclear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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