Skip to main content
Glama

create_issue

Create new issues in GitLab projects to track bugs, tasks, or feature requests with titles, descriptions, assignees, labels, and milestones.

Instructions

Create a new issue in a GitLab project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesProject ID or URL-encoded path
titleYesIssue title
descriptionNoIssue description
assignee_idsNoArray of user IDs to assign
labelsNoArray of label names
milestone_idNoMilestone ID to assign

Implementation Reference

  • The implementation of the 'createIssue' function, which handles sending the POST request to the GitLab API to create an issue.
    export async function createIssue(projectId: string, options: CreateIssueOptions): Promise<GitLabIssue> {
      if (!projectId?.trim()) {
        throw new Error("Project ID is required");
      }
      if (!options?.title?.trim()) {
        throw new Error("Issue title is required");
      }
    
      const endpoint = `/projects/${encodeProjectId(projectId)}/issues`;
    
      const issue = await gitlabPost<GitLabIssue>(endpoint, {
        title: options.title,
        description: options.description,
        assignee_ids: options.assignee_ids,
        milestone_id: options.milestone_id,
        labels: options.labels?.join(",")
      });
    
      return GitLabIssueSchema.parse(issue);
    }
  • The schema definition for the 'create_issue' tool's input arguments.
    export const CreateIssueSchema = ProjectParamsSchema.extend({
      title: z.string().describe("Issue title"),
      description: z.string().optional().describe("Issue description"),
      assignee_ids: z.array(z.number()).optional().describe("Array of user IDs to assign"),
      labels: z.array(z.string()).optional().describe("Array of label names"),
      milestone_id: z.number().optional().describe("Milestone ID to assign")
    });
    
    export const CreateMergeRequestSchema = ProjectParamsSchema.extend({
  • src/server.ts:89-97 (registration)
    Tool registration for 'create_issue' in the server implementation.
    {
      name: "create_issue",
      description: "Create a new issue in a GitLab project",
      inputSchema: zodToJsonSchema(CreateIssueSchema)
    },
    {
      name: "create_merge_request",
      description: "Create a new merge request in a GitLab project",
      inputSchema: zodToJsonSchema(CreateMergeRequestSchema)
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. It states the tool creates an issue but lacks critical details: required permissions (e.g., developer access), whether creation is idempotent, error handling (e.g., duplicate titles), or rate limits. The description covers basic intent but misses operational context needed for safe use.

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, direct sentence with zero wasted words. It front-loads the core purpose ('Create a new issue') and specifies the context ('in a GitLab project') efficiently. Every element earns its place without redundancy or ambiguity.

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 happens post-creation (e.g., returns issue ID or object), error conditions, or side effects. Given the complexity of creating an issue with multiple optional fields, more behavioral and output context is needed for completeness.

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%, providing clear documentation for all 6 parameters. The description adds no parameter-specific information beyond what the schema already states (e.g., it doesn't clarify format examples or constraints). This meets the baseline score of 3 since the schema handles parameter semantics adequately.

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') and resource ('new issue in a GitLab project'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'update_issue' or 'list_issues', but the verb 'Create' inherently distinguishes it from read/update operations.

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), contrast with 'update_issue' for modifications, or indicate when 'list_issues' might be more appropriate for retrieval. Usage context is entirely implied rather than stated.

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

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