Skip to main content
Glama

create_jira_issue

Create new JIRA issues from Markdown descriptions, automatically converting content to Atlassian Document Format for project tracking.

Instructions

Creates a new JIRA issue from Markdown description.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYes
summaryYes
descriptionYes
issue_typeNoTask
site_aliasNo
assigneeNo
additional_fieldsNo

Implementation Reference

  • The primary handler function for the 'create_jira_issue' MCP tool. It is decorated with @mcp_server.tool for registration, handles input parameters, delegates to the helper function in jira_tools, manages errors, and returns formatted MCP TextContent response.
        @mcp_server.tool(
            name="create_jira_issue",
            description="Creates a new JIRA issue from Markdown description.",
        )
        def create_jira_issue_tool(
            project: str,
            summary: str,
            description: str, # This will be Markdown input
            issue_type: str = "Task",
            site_alias: str = None,
            assignee: str = None,
            additional_fields: Dict[str, Any] = None # For future flexibility
        ) -> types.TextContent:
            """
    Instruction to LLM (for Jira ADF compatibility):
    
    When passing content that includes code, always use fenced code blocks
    formatted like this Markdown example:
    
    Example content:
    
    This is a paragraph introducing a code block.
    
    ```python
    def hello():
        print("Hello, world!")
    ```
    
    Create a JIRA issue with markdown description converted to ADF.
    """
            logger.debug(
                f"create_jira_issue_tool received: project={project}, summary={summary}, "
                f"issue_type={issue_type}, site_alias={site_alias}, assignee={assignee}, additional_fields_present={additional_fields is not None}"
            )
            try:
                # Call the business logic function directly
                result = jira_tools.create_jira_issue(
                    project=project,
                    summary=summary,
                    description=description,
                    issue_type=issue_type,
                    site_alias=site_alias,
                    assignee=assignee,
                    additional_fields=additional_fields,
                    server_config=config
                )
                
                logger.info(f"JIRA issue creation result: {result}")
                
                issue_key = result.get('key')
                issue_id = result.get('id')
                browse_url = result.get('url', "N/A")
    
                return types.TextContent(
                    type="text",
                    text=f"Successfully created JIRA issue: {issue_key} (ID: {issue_id}). URL: {browse_url}",
                    format="text/plain"
                )
            except JiraServiceError as e:
                logger.error(f"JiraServiceError in create_jira_issue_tool: {e}", exc_info=True)
                return types.TextContent(
                    type="text",
                    text=f"Error creating JIRA issue: {e}",
                    format="text/plain"
                )
            except Exception as e:
                logger.error(f"Unexpected error in create_jira_issue_tool: {e}", exc_info=True)
                return types.TextContent(
                    type="text",
                    text=f"An unexpected error occurred: {e}",
                    format="text/plain"
                )
  • Helper function implementing the core logic for creating a JIRA issue. Resolves configuration, instantiates JiraClient, and invokes the create_issue method.
    def create_jira_issue(
        project: str, 
        summary: str, 
        description: str, 
        issue_type: str = "Task", 
        site_alias: Optional[str] = None,
        assignee: Optional[str] = None,
        additional_fields: Optional[Dict[str, Any]] = None,
        server_config: Optional[ServerConfig] = None
    ) -> Dict[str, Any]:
        """
        Create a JIRA issue with markdown description converted to ADF.
        
        Args:
            project: Project key (e.g., 'ABC')
            summary: Issue summary/title
            description: Issue description in markdown format
            issue_type: Type of issue (default: "Task")
            site_alias: Optional site alias for multi-site configurations
            assignee: Optional assignee email address
            additional_fields: Optional dict of additional JIRA fields
            server_config: Server configuration object
            
        Returns:
            Dict containing created issue information (id, key, url)
            
        Raises:
            JiraServiceError: If issue creation fails
        """
        try:
            # Get active JIRA site configuration
            active_site_config = get_active_jira_config(alias=site_alias, server_config=server_config)
            
            # Create JiraClient instance
            jira_client = JiraClient(site_config=active_site_config)
            
            # Create the issue
            result = jira_client.create_issue(
                project_key=project,
                summary=summary,
                description=description,  # Will be converted to ADF by JiraClient
                issue_type=issue_type,
                assignee=assignee,
                **(additional_fields or {})
            )
            
            return result
            
        except JiraServiceError:
            # Re-raise JiraServiceError as-is
            raise
        except Exception as e:
            # Wrap unexpected errors
            raise JiraServiceError(f"Unexpected error creating JIRA issue: {e}")
Behavior2/5

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

With no annotations provided, the description carries full burden but only states it creates an issue from Markdown. It doesn't disclose behavioral traits like authentication needs, rate limits, error handling, or what happens on success/failure. For a mutation tool with zero annotation coverage, this is a significant gap.

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 with zero waste. It's appropriately sized and front-loaded, directly stating the tool's core function without unnecessary elaboration.

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 7-parameter mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavior, parameter meanings, and expected outcomes, making it inadequate for an AI agent to use the tool effectively without additional context.

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?

Schema description coverage is 0%, so the description must compensate but only mentions 'Markdown description' for the 'description' parameter. It doesn't explain the meaning of other 6 parameters (e.g., 'project', 'summary', 'issue_type'), leaving most semantics undocumented.

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 ('Creates') and resource ('new JIRA issue'), specifying it's from Markdown description. It distinguishes from sibling 'update_jira_issue' by focusing on creation rather than modification, though it doesn't explicitly contrast with 'search_jira_issues' or 'echo'.

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 on when to use this tool versus alternatives like 'search_jira_issues' or 'update_jira_issue'. The description implies usage for creating issues from Markdown, but lacks explicit context, prerequisites, or exclusions for tool selection.

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/codingthefuturewithai/mcp_jira'

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