Skip to main content
Glama

create_issue

Create a new issue in a GitLab project by specifying project ID, title, description, assignees, labels, and milestone. Streamline issue tracking and collaboration directly through the gitlab-mcp-server.

Instructions

Create a new issue in a GitLab project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assignee_idsNo
descriptionNo
labelsNo
milestone_idNo
project_idNo
titleNo

Implementation Reference

  • MCP tool handler in the switch statement that parses arguments, extracts project_id and options, calls gitlabApi.createIssue, and returns the JSON response.
    case "create_issue": {
      const args = CreateIssueSchema.parse(request.params.arguments);
      const { project_id, ...options } = args;
      const issue = await gitlabApi.createIssue(project_id, options);
      return { content: [{ type: "text", text: JSON.stringify(issue, null, 2) }] };
  • Zod schema for create_issue tool input: requires project_id and merges CreateIssueOptionsSchema (title, description, etc.). CreateIssueOptionsSchema defined lines 374-380.
    export const CreateIssueSchema = z.object({
      project_id: z.string()
    }).merge(CreateIssueOptionsSchema);
  • src/index.ts:138-142 (registration)
    Tool registration in ALL_TOOLS array, defining name, description, input schema, and readOnly flag.
    {
      name: "create_issue",
      description: "Create a new issue in a GitLab project",
      inputSchema: createJsonSchema(CreateIssueSchema),
      readOnly: false
  • GitLab API helper method that performs the POST request to create an issue, handles response and validation.
    async createIssue(
      projectId: string,
      options: z.infer<typeof CreateIssueOptionsSchema>
    ): Promise<GitLabIssue> {
      const response = await fetch(
        `${this.apiUrl}/projects/${encodeURIComponent(projectId)}/issues`,
        {
          method: "POST",
          headers: {
            "Authorization": `Bearer ${this.token}`,
            "Content-Type": "application/json"
          },
          body: JSON.stringify({
            title: options.title,
            description: options.description,
            assignee_ids: options.assignee_ids,
            milestone_id: options.milestone_id,
            labels: options.labels?.join(',')
          })
        }
      );
    
      if (!response.ok) {
        throw new McpError(
          ErrorCode.InternalError,
          `GitLab API error: ${response.statusText}`
        );
      }
    
      return GitLabIssueSchema.parse(await response.json());
    }
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. It states this is a creation operation, implying mutation, but doesn't describe what happens upon creation (e.g., whether it returns the new issue ID, error handling for invalid inputs, or rate limits). For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 gets straight to the point with no wasted words. It's appropriately sized for a basic tool definition, though it could benefit from additional context.

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 6 parameters, 0% schema description coverage, no annotations, and no output schema, the description is incomplete. It doesn't explain parameter meanings, behavioral outcomes, or usage context, leaving the agent with insufficient information to use the tool effectively beyond knowing it creates issues.

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?

The input schema has 6 parameters with 0% description coverage, so the schema provides no semantic information. The description doesn't mention any parameters, failing to compensate for this gap. It doesn't explain what 'project_id', 'title', or other fields mean in the context of GitLab issue creation.

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 ('Create a new issue') and the target resource ('in a GitLab project'), which provides a specific verb+resource combination. However, it doesn't distinguish this tool from its sibling 'create_merge_request' or other creation tools, which would require mentioning what makes an issue different from other GitLab entities.

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 like 'create_merge_request' or 'list_issues'. It doesn't mention prerequisites (e.g., needing a valid project_id) or contextual factors like permissions required for issue creation in GitLab projects.

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/yoda-digital/mcp-gitlab-server'

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