Skip to main content
Glama
Alosies
by Alosies

create_issue

Create a new issue in a GitLab project by specifying project ID, title, description, labels, assignees, and milestone to track tasks and bugs.

Instructions

Create a new issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assignee_idsNoArray of user IDs to assign
descriptionNoIssue description
labelsNoComma-separated list of labels
milestone_idNoMilestone ID
project_idYesProject ID or path
titleYesIssue title

Implementation Reference

  • The main handler function that implements the create_issue tool logic by posting to the GitLab API to create a new issue.
    async createIssue(args: CreateIssueParams) { const requestData: any = { title: args.title, }; if (args.description) requestData.description = args.description; if (args.labels) requestData.labels = args.labels; if (args.assignee_ids) requestData.assignee_ids = args.assignee_ids; if (args.milestone_id) requestData.milestone_id = args.milestone_id; const data = await this.client.post(`/projects/${encodeURIComponent(args.project_id)}/issues`, requestData); return { content: [ { type: 'text', text: JSON.stringify(data, null, 2), }, ], }; }
  • Tool registration definition including name, description, and input schema for 'create_issue'.
    { name: 'create_issue', description: 'Create a new issue', inputSchema: { type: 'object', properties: { project_id: { type: 'string', description: 'Project ID or path', }, title: { type: 'string', description: 'Issue title', }, description: { type: 'string', description: 'Issue description', }, labels: { type: 'string', description: 'Comma-separated list of labels', }, assignee_ids: { type: 'array', items: { type: 'number' }, description: 'Array of user IDs to assign', }, milestone_id: { type: 'number', description: 'Milestone ID', }, }, required: ['project_id', 'title'], }, },
  • TypeScript interface defining the parameters for creating an issue, used in handler and tool schema.
    export interface CreateIssueParams { project_id: string; title: string; description?: string; labels?: string; assignee_ids?: number[]; milestone_id?: number; }
  • src/server.ts:171-174 (registration)
    Dispatch/registration in the main server switch statement that routes 'create_issue' calls to the handler.
    case "create_issue": return await this.issueHandlers.createIssue( args as unknown as CreateIssueParams );

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

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