Skip to main content
Glama

retry_pipeline

Restart a failed GitLab CI/CD pipeline by specifying the project and pipeline ID to resume automated testing and deployment processes.

Instructions

重試 Pipeline

Args: project_id: 專案 ID 或路徑 pipeline_id: Pipeline ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
pipeline_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler for the retry_pipeline tool, which calls the GitLab client to perform the API request.
    def retry_pipeline(project_id: int | str, pipeline_id: int) -> str:
        """重試 Pipeline
    
        Args:
            project_id: 專案 ID 或路徑
            pipeline_id: Pipeline ID
        """
        try:
            client = get_client()
            p = client.retry_pipeline(project_id, pipeline_id)
            return f"✓ Pipeline #{p['id']} 已重試 | 狀態: {p.get('status', 'N/A')}"
        except GitLabAPIError as e:
            return f"重試 Pipeline 失敗: {str(e)}"
  • Registration of the retry_pipeline function as an MCP tool.
    @mcp.tool()
  • The GitLab client method that executes the POST request to retry a pipeline.
    def retry_pipeline(self, project_id: int | str, pipeline_id: int) -> dict:
        """POST /projects/:id/pipelines/:pipeline_id/retry"""
        pid = self._resolve_project_id(project_id)
        return self._post_json(f"/projects/{pid}/pipelines/{pipeline_id}/retry")
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the action ('重試 Pipeline') but doesn't disclose behavioral traits such as what 'retry' entails (e.g., re-running failed jobs, permissions required, side effects, or response format). This is inadequate for a mutation tool with zero 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.

Conciseness4/5

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

The description is brief and front-loaded with the tool's purpose, followed by parameter names. It avoids unnecessary fluff, but the parameter section is minimal and could be more informative without sacrificing conciseness.

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

Completeness3/5

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

Given a mutation tool with no annotations, 0% schema coverage, and an output schema (which reduces need to describe returns), the description is incomplete. It states the action but lacks details on behavior, parameters, and usage context, making it minimally viable but with clear gaps.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It lists parameters ('project_id' and 'pipeline_id') but adds no meaning beyond their names—no explanation of what they represent, valid formats (e.g., integer vs. string for project_id), or where to find them. This fails to address the coverage gap.

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

Purpose3/5

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

The description states the tool '重試 Pipeline' (retry pipeline), which is a clear verb+resource combination. However, it doesn't differentiate from sibling tools like 'retry_job' or 'cancel_pipeline', leaving ambiguity about when to use each. The purpose is understandable but lacks sibling distinction.

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?

No guidance is provided on when to use this tool versus alternatives like 'retry_job', 'cancel_pipeline', or 'create_pipeline'. The description only lists parameters without context about prerequisites, timing, or relationships to other pipeline operations.

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

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/snowild/gitlab-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server