Skip to main content
Glama

create_issue

Create new Jira issues with required fields like project key, summary, and issue type. Use get_create_metadata first to discover required fields and allowed values.

Instructions

Create a new Jira issue with specified fields. IMPORTANT: Always use get_create_metadata first to discover required fields, custom fields, and allowed values for the project and issue type.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectKeyYesThe project key where the issue will be created (e.g., PROJ, DEV)
summaryYesThe issue summary/title
issueTypeYesThe issue type (e.g., Bug, Task, Story)
descriptionNoThe issue description in Atlassian Document Format (ADF). Can be a simple string for plain text, or an ADF object for rich formatting. Example ADF: {"type":"doc","version":1,"content":[{"type":"paragraph","content":[{"type":"text","text":"Description text"}]}]}
priorityNoPriority name (e.g., High, Medium, Low) - optional
assigneeNoAssignee account ID or email (will auto-lookup account ID from email) - optional
labelsNoArray of labels - optional
customFieldsNoCustom fields as key-value pairs (e.g., {"customfield_10000": "value"}) - optional. Use get_create_metadata to discover available fields.

Implementation Reference

  • The handler function that executes the create_issue tool. It validates required parameters, constructs the issue payload (converting description to ADF if needed, resolving assignee to account ID), posts to the Jira API, and returns a formatted success or error response.
    async handleCreateIssue(args: any) {
      try {
        const { projectKey, summary, issueType, description, priority, assignee, labels, customFields } = args;
    
        if (!projectKey || !summary || !issueType) {
          throw new Error('projectKey, summary, and issueType are required');
        }
    
        const issueData: any = {
          fields: {
            project: { key: projectKey },
            summary,
            issuetype: { name: issueType },
          },
        };
    
        // Handle description - convert to ADF format if it's plain text
        if (description) {
          if (typeof description === 'string') {
            // Convert plain text to Atlassian Document Format
            issueData.fields.description = {
              type: 'doc',
              version: 1,
              content: [
                {
                  type: 'paragraph',
                  content: [
                    {
                      type: 'text',
                      text: description,
                    },
                  ],
                },
              ],
            };
          } else {
            // Already in ADF format
            issueData.fields.description = description;
          }
        }
    
        if (priority) {
          issueData.fields.priority = { name: priority };
        }
    
        if (assignee) {
          // Auto-resolve email to account ID if needed
          const accountId = await this.userHandlers.resolveUserToAccountId(assignee);
          issueData.fields.assignee = { id: accountId };
        }
    
        if (labels && Array.isArray(labels)) {
          issueData.fields.labels = labels;
        }
    
        // Merge custom fields
        if (customFields && typeof customFields === 'object') {
          Object.assign(issueData.fields, customFields);
        }
    
        const result = await this.apiClient.post('/issue', issueData);
    
        return {
          content: [
            {
              type: 'text',
              text: `✅ Issue created successfully!\n\n**Key**: ${result.key}\n**ID**: ${result.id}\n**URL**: ${this.apiClient.getBaseUrl()}/browse/${result.key}`,
            },
          ],
        };
      } catch (error: any) {
        return {
          content: [
            {
              type: 'text',
              text: JiraFormatters.formatError(error),
            },
          ],
          isError: true,
        };
      }
    }
  • The input schema definition for the create_issue tool, specifying parameters like projectKey, summary, issueType (required), and optional fields like description, priority, assignee, labels, customFields.
    {
      name: 'create_issue',
      description: 'Create a new Jira issue with specified fields. IMPORTANT: Always use get_create_metadata first to discover required fields, custom fields, and allowed values for the project and issue type.',
      inputSchema: {
        type: 'object',
        properties: {
          projectKey: {
            type: 'string',
            description: 'The project key where the issue will be created (e.g., PROJ, DEV)',
          },
          summary: {
            type: 'string',
            description: 'The issue summary/title',
          },
          issueType: {
            type: 'string',
            description: 'The issue type (e.g., Bug, Task, Story)',
          },
          description: {
            description: 'The issue description in Atlassian Document Format (ADF). Can be a simple string for plain text, or an ADF object for rich formatting. Example ADF: {"type":"doc","version":1,"content":[{"type":"paragraph","content":[{"type":"text","text":"Description text"}]}]}',
          },
          priority: {
            type: 'string',
            description: 'Priority name (e.g., High, Medium, Low) - optional',
          },
          assignee: {
            type: 'string',
            description: 'Assignee account ID or email (will auto-lookup account ID from email) - optional',
          },
          labels: {
            type: 'array',
            items: { type: 'string' },
            description: 'Array of labels - optional',
          },
          customFields: {
            type: 'object',
            description: 'Custom fields as key-value pairs (e.g., {"customfield_10000": "value"}) - optional. Use get_create_metadata to discover available fields.',
          },
        },
        required: ['projectKey', 'summary', 'issueType'],
      },
    },
  • src/index.ts:100-101 (registration)
    The switch case in the tool request handler that dispatches create_issue calls to the IssueHandlers.handleCreateIssue method.
    case 'create_issue':
      return this.issueHandlers.handleCreateIssue(request.params.arguments);
Behavior3/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 clearly indicates this is a creation/mutation operation and provides important workflow guidance about using get_create_metadata first. However, it doesn't disclose other behavioral aspects like authentication requirements, rate limits, error handling, or what happens on successful creation.

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 perfectly structured with two sentences: the first states the core purpose, the second provides critical usage guidance. Every word earns its place, and the important 'IMPORTANT' warning is appropriately front-loaded for maximum visibility.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a creation tool with 8 parameters, no annotations, and no output schema, the description does well by providing clear purpose and essential workflow guidance. However, it could be more complete by mentioning what happens on success (e.g., returns issue ID/key) or addressing common failure scenarios, given the tool's complexity.

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%, so the schema already documents all 8 parameters thoroughly. The description adds minimal parameter-specific information beyond the schema, mainly reinforcing the need to use get_create_metadata for customFields discovery. This meets the baseline expectation when schema coverage is high.

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 the specific action ('Create a new Jira issue') and resource ('with specified fields'), distinguishing it from siblings like update_issue, assign_issue, or add_comment. It provides a complete, unambiguous purpose statement.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states 'IMPORTANT: Always use get_create_metadata first' with clear reasoning ('to discover required fields, custom fields, and allowed values'). This provides specific guidance on when to use this tool versus alternatives and establishes a prerequisite workflow.

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/pdogra1299/jira-mcp-server'

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