manage_comment
Manage pull request comments: create, edit, delete, and add or remove emoji reactions. Supports inline, threaded, and task comments with thread resolution.
Instructions
Manage pull request comments. Actions: "create" (general, inline, threaded, or tasks), "edit" (update text/severity/state/threadResolved), "delete", "react" (add emoji reaction), "unreact" (remove reaction). state: RESOLVED toggles the task checkbox on a BLOCKER comment; threadResolved: true closes the conversation (the "Resolve" button in the UI). They are independent and can be passed together.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | No | Line number for inline comments (create only). | |
| prId | Yes | Pull request ID. | |
| text | No | Comment text (required for create and edit). | |
| state | No | Comment state. PENDING = draft (create only). RESOLVED = mark as resolved (edit only). OPEN = reopen (edit only). | |
| action | Yes | Operation to perform on the comment. | |
| project | No | Project key. Defaults to BITBUCKET_DEFAULT_PROJECT. | |
| version | No | Comment version for optimistic locking (required for edit and delete). | |
| diffType | No | Which diff to anchor the comment on. EFFECTIVE = overall PR diff (default). COMMIT = a single commit's diff. RANGE = diff between two specific commits. | |
| emoticon | No | Emoticon shortcut for react/unreact (e.g. thumbsup, heart, tada). Use search_emoticons to find available options. | |
| filePath | No | File path for inline comments (create only). | |
| fileType | No | Which side of the diff. TO = new version (default). FROM = old version (useful for renames). | |
| lineType | No | Type of line being commented on. ADDED = new line, REMOVED = deleted line, CONTEXT = unchanged line visible in the diff. | |
| parentId | No | Parent comment ID for threaded replies (create only). | |
| severity | No | Comment severity. BLOCKER marks it as a task (create and edit). | |
| commentId | No | Comment ID (required for edit, delete, react, unreact). | |
| repository | Yes | Repository slug. | |
| threadResolved | No | Close or reopen the comment thread (edit only). Independent of `state`. Requires Bitbucket Data Center >= 8.9; older servers accept the PUT but ignore the field. |