Skip to content

Commit 1385af0

Browse files
fix(update-issue): drop isError from partial-success link failure path
Returning isError: true when the Sentry issue update already succeeded signals a full tool failure to MCP clients, which may retry the call and re-apply the already-committed status/assignment change. Drop isError from the partial-success return; the text content clearly describes the partial failure. Update the two affected tests to assert isError is absent and use getTextToolResult instead of getErrorToolResult.
1 parent d005fa2 commit 1385af0

2 files changed

Lines changed: 27 additions & 28 deletions

File tree

‎packages/mcp-core/src/tools/update-issue.test.ts‎

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,20 +1137,20 @@ describe("update_issue", () => {
11371137
),
11381138
);
11391139

1140-
const result = getErrorToolResult(
1141-
await updateIssue.handler(
1142-
{
1143-
organizationSlug: "sentry-mcp-evals",
1144-
issueId: "CLOUDFLARE-MCP-41",
1145-
status: "resolved",
1146-
externalIssueUrl: "https://github.com/getsentry/sentry/issues/123",
1147-
assignedTo: undefined,
1148-
issueUrl: undefined,
1149-
regionUrl: null,
1150-
},
1151-
serverContext,
1152-
),
1140+
const raw = await updateIssue.handler(
1141+
{
1142+
organizationSlug: "sentry-mcp-evals",
1143+
issueId: "CLOUDFLARE-MCP-41",
1144+
status: "resolved",
1145+
externalIssueUrl: "https://github.com/getsentry/sentry/issues/123",
1146+
assignedTo: undefined,
1147+
issueUrl: undefined,
1148+
regionUrl: null,
1149+
},
1150+
serverContext,
11531151
);
1152+
expect(raw).not.toHaveProperty("isError");
1153+
const result = getTextToolResult(raw);
11541154

11551155
expect(result).toContain("Partially Updated");
11561156
expect(result).toContain("The Sentry issue update succeeded.");
@@ -1170,21 +1170,21 @@ describe("update_issue", () => {
11701170
),
11711171
);
11721172

1173-
const result = getErrorToolResult(
1174-
await updateIssue.handler(
1175-
{
1176-
organizationSlug: "sentry-mcp-evals",
1177-
issueId: "CLOUDFLARE-MCP-41",
1178-
status: "resolved",
1179-
externalIssueUrl: "https://github.com/getsentry/sentry/issues/123",
1180-
reason: "Fixing in linked ticket",
1181-
assignedTo: undefined,
1182-
issueUrl: undefined,
1183-
regionUrl: null,
1184-
},
1185-
serverContext,
1186-
),
1173+
const raw = await updateIssue.handler(
1174+
{
1175+
organizationSlug: "sentry-mcp-evals",
1176+
issueId: "CLOUDFLARE-MCP-41",
1177+
status: "resolved",
1178+
externalIssueUrl: "https://github.com/getsentry/sentry/issues/123",
1179+
reason: "Fixing in linked ticket",
1180+
assignedTo: undefined,
1181+
issueUrl: undefined,
1182+
regionUrl: null,
1183+
},
1184+
serverContext,
11871185
);
1186+
expect(raw).not.toHaveProperty("isError");
1187+
const result = getTextToolResult(raw);
11881188

11891189
expect(result).toContain("Partially Updated");
11901190
expect(result).toContain("The Sentry issue update succeeded.");

‎packages/mcp-core/src/tools/update-issue.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,6 @@ export default defineTool({
965965
output += "\n## Response Notes\n\n";
966966
output += `- Full issue details: \`get_sentry_resource(resourceType="issue", organizationSlug="${orgSlug}", resourceId="${updatedIssue.shortId}")\`\n`;
967967
return {
968-
isError: true,
969968
content: [
970969
{
971970
type: "text",

0 commit comments

Comments
 (0)