Skip to content

Commit 7f20410

Browse files
committed
warn that issue_write body REPLACES content, not appends
The `body` parameter on `issue_write` (method='update') replaces the entire issue body, matching REST API semantics. However, LLM agents frequently misinterpret `body` as "add a note about this issue" and end up silently destroying the original issue description (#2410). Update the parameter description to make the replace-not-append semantics explicit and to point users at `add_issue_comment` for the common "leave a note" use case. Updates the issue_write toolsnap and README accordingly. Fixes #2410.
1 parent 1add5fe commit 7f20410

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ The following sets of tools are available:
853853
- **issue_write** - Create or update issue
854854
- **Required OAuth Scopes**: `repo`
855855
- `assignees`: Usernames to assign to this issue (string[], optional)
856-
- `body`: Issue body content (string, optional)
856+
- `body`: Issue body content (Markdown). When method='update', this REPLACES the entire issue body rather than appending to it; to add a comment without modifying the body, use the add_issue_comment tool. (string, optional)
857857
- `duplicate_of`: Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'. (number, optional)
858858
- `issue_number`: Issue number to update (number, optional)
859859
- `labels`: Labels to apply to this issue (string[], optional)

docs/feature-flags.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ runtime behavior (such as output formatting) won't appear here.
5454
- **Required OAuth Scopes**: `repo`
5555
- **MCP App UI**: `ui://github-mcp-server/issue-write`
5656
- `assignees`: Usernames to assign to this issue (string[], optional)
57-
- `body`: Issue body content (string, optional)
57+
- `body`: Issue body content (Markdown). When method='update', this REPLACES the entire issue body rather than appending to it; to add a comment without modifying the body, use the add_issue_comment tool. (string, optional)
5858
- `duplicate_of`: Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'. (number, optional)
5959
- `issue_number`: Issue number to update (number, optional)
6060
- `labels`: Labels to apply to this issue (string[], optional)

docs/insiders-features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ The list below is generated from the Go source. It covers tool **inventory and s
4848
- **Required OAuth Scopes**: `repo`
4949
- **MCP App UI**: `ui://github-mcp-server/issue-write`
5050
- `assignees`: Usernames to assign to this issue (string[], optional)
51-
- `body`: Issue body content (string, optional)
51+
- `body`: Issue body content (Markdown). When method='update', this REPLACES the entire issue body rather than appending to it; to add a comment without modifying the body, use the add_issue_comment tool. (string, optional)
5252
- `duplicate_of`: Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'. (number, optional)
5353
- `issue_number`: Issue number to update (number, optional)
5454
- `labels`: Labels to apply to this issue (string[], optional)

pkg/github/__toolsnaps__/issue_write.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"type": "array"
2323
},
2424
"body": {
25-
"description": "Issue body content",
25+
"description": "Issue body content (Markdown). When method='update', this REPLACES the entire issue body rather than appending to it; to add a comment without modifying the body, use the add_issue_comment tool.",
2626
"type": "string"
2727
},
2828
"duplicate_of": {

pkg/github/issues.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1471,7 +1471,7 @@ Options are:
14711471
},
14721472
"body": {
14731473
Type: "string",
1474-
Description: "Issue body content",
1474+
Description: "Issue body content (Markdown). When method='update', this REPLACES the entire issue body rather than appending to it; to add a comment without modifying the body, use the add_issue_comment tool.",
14751475
},
14761476
"assignees": {
14771477
Type: "array",

0 commit comments

Comments
 (0)