jira_add_comment
Add comments to Jira issues to provide updates, share information, or document progress on tasks and tickets.
Instructions
Add a comment to a Jira issue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issue_key | Yes | Issue key (e.g., PROJ-123) | |
| comment | Yes | Comment text |
Implementation Reference
- src/jira_server.py:333-343 (handler)The handler function that executes the jira_add_comment tool. It extracts issue_key and comment from arguments, calls the Jira client's issue_add_comment method, and returns a success message.async def _add_comment(self, arguments: dict) -> List[TextContent]: """Add a comment to an issue""" issue_key = arguments["issue_key"] comment = arguments["comment"] self.jira_client.issue_add_comment(issue_key, comment) return [TextContent( type="text", text=f"Added comment to issue: {issue_key}" )]
- src/jira_server.py:148-161 (schema)Input schema defining the parameters for the jira_add_comment tool: issue_key (string) and comment (string), both required.inputSchema={ "type": "object", "properties": { "issue_key": { "type": "string", "description": "Issue key (e.g., PROJ-123)" }, "comment": { "type": "string", "description": "Comment text" } }, "required": ["issue_key", "comment"] }
- src/jira_server.py:145-162 (registration)Registers the jira_add_comment tool with the MCP server by including it in the list_tools() response, specifying name, description, and input schema.Tool( name="jira_add_comment", description="Add a comment to a Jira issue", inputSchema={ "type": "object", "properties": { "issue_key": { "type": "string", "description": "Issue key (e.g., PROJ-123)" }, "comment": { "type": "string", "description": "Comment text" } }, "required": ["issue_key", "comment"] } ),
- src/jira_server.py:205-206 (registration)Dispatches the tool call to the _add_comment handler function in the call_tool method.elif name == "jira_add_comment": return await self._add_comment(arguments)