feat: add issue_edit tool (update issue title/body) #34

Closed
opened 2026-06-01 19:02:07 +00:00 by mathias · 0 comments
Owner

Problem

The MCP server exposes issue_create, issue_comment, issue_close, issue_get,
issue_list_comments, and issue_reopen, but there is no tool to edit an existing
issue's title or body
. Once an issue is created, its body is immutable through the MCP
surface — the only way to add information is a comment.

Why it matters (concrete case)

Hit live on 2026-06-01 while maintaining coo-agent #8 and #9. Needed to add backlinks
(brain URL, related-issue refs) into the issue bodies so a future session reading the
issue cold would see them up top. Had to fall back to issue_comment, which works but
buries the backlinks in the comment thread — a session reading only the body misses them.
Editing the canonical body is the correct fix and wasn't available.

Proposed tool

issue_edit (or issue_update), mapping to Gitea's PATCH /repos/{owner}/{repo}/issues/{index}.

Parameters:

  • owner (string, required)
  • name (string, required)
  • number (integer, required)
  • title (string, optional) — new title
  • body (string, optional) — new body (full replacement, matching how Gitea's API behaves)
  • only patch fields explicitly provided, consistent with how repo_update already behaves

Out of scope for this ticket (could be follow-ups): editing labels/assignees/milestone/state
via the same tool — issue_close/issue_reopen already cover state, so keep this focused on
title + body.

Acceptance

  • issue_edit updates title and/or body on an existing issue
  • Omitted fields are left untouched (partial patch, like repo_update)
  • Identity footer behaviour consistent with issue_create/issue_comment (decide: append
    on edit, or leave body verbatim — lean verbatim so edits are idempotent)
  • Tool definition discoverable via tool_search alongside the other issue tools

Note

Full body replacement means a careless edit could clobber content — caller is responsible for
read-modify-write (fetch via issue_get, amend, send back). Worth a one-line warning in the
tool description, as repo_update has for private=false.

## Problem The MCP server exposes `issue_create`, `issue_comment`, `issue_close`, `issue_get`, `issue_list_comments`, and `issue_reopen`, but there is **no tool to edit an existing issue's title or body**. Once an issue is created, its body is immutable through the MCP surface — the only way to add information is a comment. ## Why it matters (concrete case) Hit live on 2026-06-01 while maintaining coo-agent #8 and #9. Needed to add backlinks (brain URL, related-issue refs) into the issue **bodies** so a future session reading the issue cold would see them up top. Had to fall back to `issue_comment`, which works but buries the backlinks in the comment thread — a session reading only the body misses them. Editing the canonical body is the correct fix and wasn't available. ## Proposed tool `issue_edit` (or `issue_update`), mapping to Gitea's `PATCH /repos/{owner}/{repo}/issues/{index}`. Parameters: - `owner` (string, required) - `name` (string, required) - `number` (integer, required) - `title` (string, optional) — new title - `body` (string, optional) — new body (full replacement, matching how Gitea's API behaves) - only patch fields explicitly provided, consistent with how `repo_update` already behaves Out of scope for this ticket (could be follow-ups): editing labels/assignees/milestone/state via the same tool — `issue_close`/`issue_reopen` already cover state, so keep this focused on title + body. ## Acceptance - [ ] `issue_edit` updates title and/or body on an existing issue - [ ] Omitted fields are left untouched (partial patch, like `repo_update`) - [ ] Identity footer behaviour consistent with `issue_create`/`issue_comment` (decide: append on edit, or leave body verbatim — lean verbatim so edits are idempotent) - [ ] Tool definition discoverable via tool_search alongside the other issue tools ## Note Full body replacement means a careless edit could clobber content — caller is responsible for read-modify-write (fetch via `issue_get`, amend, send back). Worth a one-line warning in the tool description, as `repo_update` has for `private=false`.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mathias/gitea-mcp#34