diff --git a/packages/mcp-core/src/api-client/schema.ts b/packages/mcp-core/src/api-client/schema.ts index bd1f456e3..85167b782 100644 --- a/packages/mcp-core/src/api-client/schema.ts +++ b/packages/mcp-core/src/api-client/schema.ts @@ -1347,7 +1347,8 @@ export const EventAttachmentSchema = z.object({ size: z.number(), mimetype: z.string(), dateCreated: z.string().datetime(), - sha1: z.string(), + // Objectstore-backed attachments do not store a usable SHA1 (checksum is + // unavailable), so we neither require nor surface it from this endpoint. headers: z.record(z.string(), z.string()).optional(), }); diff --git a/packages/mcp-core/src/tools/catalog/get-event-attachment.test.ts b/packages/mcp-core/src/tools/catalog/get-event-attachment.test.ts index b1b9b9ebe..280ad211a 100644 --- a/packages/mcp-core/src/tools/catalog/get-event-attachment.test.ts +++ b/packages/mcp-core/src/tools/catalog/get-event-attachment.test.ts @@ -36,7 +36,6 @@ describe("get_event_attachment", () => { **Size:** 1024 bytes **MIME Type:** image/png **Created:** 2025-04-08T21:15:04.000Z - **SHA1:** abc123def456 To download this attachment with the attachmentId provided: Use the Sentry tool \`get_event_attachment\` @@ -87,7 +86,6 @@ describe("get_event_attachment", () => { **Size:** 1024 bytes **MIME Type:** image/png **Created:** 2025-04-08T21:15:04.000Z - **SHA1:** abc123def456 **Download URL:** https://sentry.io/api/0/projects/sentry-mcp-evals/cloudflare-mcp/events/7ca573c0f4814912aaa9bdc77d1a7d51/attachments/123/?download=1 diff --git a/packages/mcp-core/src/tools/catalog/get-event-attachment.ts b/packages/mcp-core/src/tools/catalog/get-event-attachment.ts index 4527c7015..a50e971f6 100644 --- a/packages/mcp-core/src/tools/catalog/get-event-attachment.ts +++ b/packages/mcp-core/src/tools/catalog/get-event-attachment.ts @@ -117,8 +117,7 @@ export default defineTool({ output += `**Type:** ${attachment.attachment.type}\n`; output += `**Size:** ${attachment.attachment.size} bytes\n`; output += `**MIME Type:** ${effectiveMimeType}\n`; - output += `**Created:** ${attachment.attachment.dateCreated}\n`; - output += `**SHA1:** ${attachment.attachment.sha1}\n\n`; + output += `**Created:** ${attachment.attachment.dateCreated}\n\n`; output += `**Download URL:** ${attachment.downloadUrl}\n\n`; if (isBinary) { @@ -166,8 +165,7 @@ export default defineTool({ output += `**Type:** ${attachment.type}\n`; output += `**Size:** ${attachment.size} bytes\n`; output += `**MIME Type:** ${attachment.mimetype}\n`; - output += `**Created:** ${attachment.dateCreated}\n`; - output += `**SHA1:** ${attachment.sha1}\n\n`; + output += `**Created:** ${attachment.dateCreated}\n\n`; output += "To download this attachment with the attachmentId provided:\n"; output += `${formatToolCallInstruction({ toolName: "get_event_attachment", diff --git a/packages/mcp-server-mocks/src/fixtures/event-attachments.json b/packages/mcp-server-mocks/src/fixtures/event-attachments.json index 7ce9f8a5f..d0d591052 100644 --- a/packages/mcp-server-mocks/src/fixtures/event-attachments.json +++ b/packages/mcp-server-mocks/src/fixtures/event-attachments.json @@ -6,7 +6,6 @@ "size": 1024, "mimetype": "image/png", "dateCreated": "2025-04-08T21:15:04.000Z", - "sha1": "abc123def456", "headers": { "Content-Type": "image/png" } diff --git a/packages/mcp-server-mocks/src/index.ts b/packages/mcp-server-mocks/src/index.ts index 69bea77aa..e97c1757c 100644 --- a/packages/mcp-server-mocks/src/index.ts +++ b/packages/mcp-server-mocks/src/index.ts @@ -1607,7 +1607,6 @@ export const restHandlers = buildHandlers([ size: 1024, mimetype: "application/octet-stream", dateCreated: "2025-04-08T21:15:04.000Z", - sha1: "abc123def456", headers: { "Content-Type": "application/octet-stream" }, }, ]),