Add delete_comment tool #22
Labels
No labels
status/paused
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jbr870/forgejo-mcp-server#22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add a
delete_commenttool that wrapsDELETE /repos/{owner}/{repo}/issues/comments/{id}.Background
The Forgejo API supports comment deletion via the standard Gitea-inherited endpoint, but the MCP server does not currently wrap it. Today, once a comment is created, the only mutation tool available is
edit_comment— there is no way to remove a comment via MCP.This is a lower-stakes gap than
delete_issue(#21): comments are routinely deleted (typos, wrong thread, off-topic) and the operation is far less consequential than removing an entire issue.Proposed signature
comment_idis the global comment ID (theidfield returned bycreate_commentandlist_issue_comments), not an issue-scoped index — consistent with howedit_commentalready addresses comments.Return shape:
{"result": {"deleted": true, "comment_id": N}}on success,{"error": "..."}on failure.Notes
commentAssignment()middleware (forgejo/forgejo#2126) that verifies the comment ID belongs to the addressed repository, so the upstream already returns clean error envelopes for cross-repo / non-existent IDs. The MCP wrapper should propagate those as the standard{"error": ...}shape.Related