Skip to main content
Glama

create_issue

Creates a new issue in a GitLab project with required title and optional description.

Instructions

Create a new issue in a GitLab project.

Args:
    project_id: GitLab project ID
    title: Issue title
    description: Issue description (optional)
    token: GitLab Personal Access Token (optional)
    ctx: MCP context (automatically injected)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
titleYes
descriptionNo
tokenNo
ctxNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The create_issue tool handler function. It takes project_id, title, description, token, and ctx parameters. It makes a POST request to GitLab API endpoint /projects/{project_id}/issues with the title and description, and returns the created issue info or an error message.
    @mcp.tool()
    async def create_issue(project_id: int, title: str, description: str = "", token: str = None, ctx=None) -> str:
        """Create a new issue in a GitLab project.
        
        Args:
            project_id: GitLab project ID
            title: Issue title
            description: Issue description (optional)
            token: GitLab Personal Access Token (optional)
            ctx: MCP context (automatically injected)
        """
        endpoint = f"/projects/{project_id}/issues"
        data = {
            "title": title,
            "description": description
        }
        
        result = await make_gitlab_request(endpoint, "POST", data, ctx=ctx, token=token)
        
        if isinstance(result, dict) and "error" in result:
            return f"Error creating issue: {result['error']}"
        
        return f"Issue created successfully: #{result['iid']} - {result['title']}"
  • The create_issue function is registered as an MCP tool via the @mcp.tool() decorator on line 171.
    @mcp.tool()
Behavior2/5

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

No annotations are provided, and the description lacks behavioral details such as authentication requirements, side effects (e.g., whether issue creation is immediate), or rate limits. The optional token parameter is mentioned but not explained in terms of necessity.

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 concise, using a docstring format with an Args section. It front-loads the main purpose in one sentence. However, it could be more informative without adding excessive length.

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 the tool has an output schema, return values need not be explained. However, the description lacks explanation of error handling, success indications, or any constraints. With 5 parameters and no annotations, more completeness would be beneficial.

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?

Input schema coverage is 0%, so the description must compensate. It lists parameters with brief descriptions (e.g., 'project_id: GitLab project ID'), but these add little beyond the schema's titles. The optional 'description' and 'token' are noted but no additional semantics.

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

Purpose5/5

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

The description clearly states 'Create a new issue in a GitLab project.' which is a specific verb (create) and resource (issue) within a GitLab project. It effectively differentiates from sibling tools like close_issue and update_issue.

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 such as close_issue or update_issue. There are no prerequisites, context conditions, or usage examples.

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

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