From 8528ea7da9484f9067c53128f06f850f65992c36 Mon Sep 17 00:00:00 2001 From: sHa Date: Fri, 3 Apr 2026 15:17:34 +0300 Subject: [PATCH] feat: add delete_issue_comment function to remove comments from issues --- app/entities/comments.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/entities/comments.py b/app/entities/comments.py index a130d78..d9569d9 100644 --- a/app/entities/comments.py +++ b/app/entities/comments.py @@ -1,6 +1,6 @@ import json from ..mcp import mcp -from ..client import _get, _put +from ..client import _get, _put, _delete @mcp.tool() @@ -120,3 +120,15 @@ def add_issue_comment(issue_id: int, comment: str) -> str: """ _put(f"/issues/{issue_id}.json", {"issue": {"notes": comment}}) return f"Comment added to issue #{issue_id}." + + +@mcp.tool() +def delete_issue_comment(journal_id: int) -> str: + """ + Delete a comment (journal note) from a Redmine issue. + + Args: + journal_id: The journal entry ID (obtainable from get_issue_comments) + """ + _delete(f"/journals/{journal_id}.json") + return f"Comment #{journal_id} deleted."