Skip to main content
Glama

gitlab_create_issue

Create new issues in GitLab projects to track bugs, tasks, or feature requests. Specify project path, title, description, labels, and assignees.

Instructions

Creates a new issue in a GitLab project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYesThe path of the GitLab project.
titleYesThe title of the issue.
descriptionNoThe description of the issue.
labelsNoLabels to assign to the issue.
assigneeIdsNoUser IDs to assign the issue to.

Implementation Reference

  • Core handler function that executes the GitLab API call to create an issue.
    async createIssue(projectPath: string, title: string, description?: string, labels?: string[], assigneeIds?: number[]): Promise<any> {
      const encodedProjectPath = encodeURIComponent(projectPath);
      const body: any = { title };
      if (description) body.description = description;
      if (labels && labels.length > 0) body.labels = labels.join(',');
      if (assigneeIds && assigneeIds.length > 0) body.assignee_ids = assigneeIds;
      
      return this.callGitLabApi<any>(
        `projects/${encodedProjectPath}/issues`,
        'POST',
        body,
      );
    }
  • src/index.ts:865-896 (registration)
    Tool registration including name, description, and input schema.
    {
      name: 'gitlab_create_issue',
      description: 'Creates a new issue in a GitLab project.',
      inputSchema: {
        type: 'object',
        properties: {
          projectPath: {
            type: 'string',
            description: 'The path of the GitLab project.',
          },
          title: {
            type: 'string',
            description: 'The title of the issue.',
          },
          description: {
            type: 'string',
            description: 'The description of the issue.',
          },
          labels: {
            type: 'array',
            items: { type: 'string' },
            description: 'Labels to assign to the issue.',
          },
          assigneeIds: {
            type: 'array',
            items: { type: 'number' },
            description: 'User IDs to assign the issue to.',
          },
        },
        required: ['projectPath', 'title'],
      },
    },
  • MCP server request handler that processes calls to 'gitlab_create_issue' and delegates to GitLabService.
    case 'gitlab_create_issue': {
      if (!gitlabService) {
        throw new Error('GitLab service is not initialized.');
      }
      const { projectPath, title, description, labels, assigneeIds } = args as { 
        projectPath: string; 
        title: string; 
        description?: string; 
        labels?: string[]; 
        assigneeIds?: number[] 
      };
      const result = await gitlabService.createIssue(projectPath, title, description, labels, assigneeIds);
      return {
        content: [
          {
            type: 'text',
            text: `Issue created successfully: ${JSON.stringify(result, null, 2)}`,
          },
        ],
      };
    }
  • Type definitions for the createIssue method parameters.
    async createIssue(projectPath: string, title: string, description?: string, labels?: string[], assigneeIds?: number[]): Promise<any> {
      const encodedProjectPath = encodeURIComponent(projectPath);
      const body: any = { title };
      if (description) body.description = description;
      if (labels && labels.length > 0) body.labels = labels.join(',');
      if (assigneeIds && assigneeIds.length > 0) body.assignee_ids = assigneeIds;
      
      return this.callGitLabApi<any>(
        `projects/${encodedProjectPath}/issues`,
        'POST',
        body,
      );
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It states this is a creation operation, implying mutation, but doesn't cover permissions needed, whether it's idempotent, rate limits, error conditions, or what happens on success (e.g., returns issue ID). For a mutation tool with zero annotation coverage, this is inadequate.

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 unnecessary words. It's appropriately sized for a basic tool definition and front-loads the essential information, making it easy to parse quickly.

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 the tool's complexity (a mutation operation with 5 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like permissions, side effects, or return values, leaving significant gaps for an AI agent to understand how to use it effectively in context.

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 description adds no parameter-specific information beyond what's already in the schema (which has 100% coverage with clear descriptions for all 5 parameters). The baseline score of 3 reflects that the schema does the heavy lifting, and the description doesn't compensate with additional context like format examples or constraints.

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 ('creates') and resource ('new issue in a GitLab project'), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling tools like 'gitlab_update_issue' or 'gitlab_close_issue', which would require specifying it's specifically for initial creation rather than modification or closure.

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 (e.g., needing project access), compare it to sibling tools like 'gitlab_update_issue' for modifications, or indicate when not to use it (e.g., for commenting instead use 'gitlab_add_comment_to_issue'). This leaves the agent without contextual usage information.

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