Skip to content

Commit 0c93147

Browse files
betegoncodex
andauthored
fix(alerts): accept string Sentry App statuses (#1338)
Fix `get_alert_options` for organizations with Sentry Apps. Sentry returns app status as a string such as `published`; expecting a number rejected the entire actions page, including paginated and provider-filtered requests. Match the native status type in API parsing and the generated output schema. The existing mixed-provider pagination test now uses the real status shape and validates the output contract. Verified with TypeScript, lint, build and 2,184 passing tests. Read-only local MCP QA against live data passed full discovery, both cursor pages and the Sentry App filter. Related to #1074. Co-authored-by: GPT-6 (Codex) <noreply@openai.com>
1 parent 83f6f30 commit 0c93147

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎packages/mcp-core/src/api-client/schema.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ export const AlertActionOptionSchema = z.object({
323323
name: z.string(),
324324
installationId: z.string(),
325325
installationUuid: z.string(),
326-
status: z.number(),
326+
status: z.string(),
327327
settings: z.record(z.string(), z.unknown()).optional(),
328328
title: z.string().optional(),
329329
})

‎packages/mcp-core/src/toolDefinitions.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4438,7 +4438,7 @@
44384438
"type": "string"
44394439
},
44404440
"status": {
4441-
"type": "number"
4441+
"type": "string"
44424442
},
44434443
"settings": {
44444444
"type": "object",

‎packages/mcp-core/src/tools/catalog/get-alert-options.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ describe("get_alert_options", () => {
135135
name: "Ticket app",
136136
installationId: "44",
137137
installationUuid: "installation-uuid",
138-
status: 0,
138+
status: "published",
139139
settings: {
140140
required_fields: [
141141
{
@@ -173,6 +173,7 @@ describe("get_alert_options", () => {
173173
limit: 5,
174174
}),
175175
);
176+
expect(getAlertOptionsOutputSchema.parse(result)).toEqual(result);
176177
expect(result).toMatchObject({
177178
section: "actions",
178179
actions,

0 commit comments

Comments
 (0)