Skip to main content
Glama

gitlab_update_issue

Modify GitLab issue details including title, description, labels, assignees, and state to keep project tracking current.

Instructions

Updates an existing GitLab issue.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYesThe path of the GitLab project.
issueIidYesThe internal ID of the issue.
updatesYesFields to update.

Implementation Reference

  • Core implementation of the gitlab_update_issue tool. This method constructs the update payload and makes the PUT request to the GitLab API to update the specified issue.
    async updateIssue(projectPath: string, issueIid: number, updates: {
      title?: string;
      description?: string;
      labels?: string[];
      assigneeIds?: number[];
      state?: 'close' | 'reopen';
    }): Promise<any> {
      const encodedProjectPath = encodeURIComponent(projectPath);
      const body: any = {};
      
      if (updates.title) body.title = updates.title;
      if (updates.description) body.description = updates.description;
      if (updates.labels) body.labels = updates.labels.join(',');
      if (updates.assigneeIds) body.assignee_ids = updates.assigneeIds;
      if (updates.state) body.state_event = updates.state;
      
      return this.callGitLabApi<any>(
        `projects/${encodedProjectPath}/issues/${issueIid}`,
        'PUT',
        body,
      );
    }
  • src/index.ts:897-925 (registration)
    Registers the 'gitlab_update_issue' tool in the MCP server, defining its name, description, and input schema.
    {
      name: 'gitlab_update_issue',
      description: 'Updates an existing GitLab issue.',
      inputSchema: {
        type: 'object',
        properties: {
          projectPath: {
            type: 'string',
            description: 'The path of the GitLab project.',
          },
          issueIid: {
            type: 'number',
            description: 'The internal ID of the issue.',
          },
          updates: {
            type: 'object',
            properties: {
              title: { type: 'string' },
              description: { type: 'string' },
              labels: { type: 'array', items: { type: 'string' } },
              assigneeIds: { type: 'array', items: { type: 'number' } },
              state: { type: 'string', enum: ['close', 'reopen'] },
            },
            description: 'Fields to update.',
          },
        },
        required: ['projectPath', 'issueIid', 'updates'],
      },
    },
  • MCP tool call handler that extracts parameters from the request and delegates to GitLabService.updateIssue, returning the result.
    case 'gitlab_update_issue': {
      if (!gitlabService) {
        throw new Error('GitLab service is not initialized.');
      }
      const { projectPath, issueIid, updates } = args as { 
        projectPath: string; 
        issueIid: number; 
        updates: {
          title?: string;
          description?: string;
          labels?: string[];
          assigneeIds?: number[];
          state?: 'close' | 'reopen';
        };
      };
      const result = await gitlabService.updateIssue(projectPath, issueIid, updates);
      return {
        content: [
          {
            type: 'text',
            text: `Issue updated successfully: ${JSON.stringify(result, null, 2)}`,
          },
        ],
      };
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Updates' implies mutation but doesn't specify required permissions, whether changes are reversible, error handling, or what happens to fields not mentioned in updates. For a mutation tool with zero annotation coverage, this is a significant gap.

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 that states the core purpose without any wasted words. It's appropriately sized and front-loaded with the essential information.

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?

For a mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the tool returns, error conditions, authentication requirements, or how it differs from sibling tools. The description should provide more context given the complexity of updating issues in GitLab.

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?

Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description adds no additional parameter information beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in description.

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 ('Updates') and resource ('an existing GitLab issue'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its sibling 'gitlab_close_issue', which could also be considered an issue update operation.

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 an existing issue), doesn't contrast with 'gitlab_close_issue' for state changes, and offers no context about when this general update tool is preferable to more specific tools.

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

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