@sentry/mcp-server 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/dist/api-client/client.cjs +1 -1
  2. package/dist/api-client/client.d.cts +3 -3
  3. package/dist/api-client/client.d.ts +3 -3
  4. package/dist/api-client/client.js +1 -1
  5. package/dist/api-client/client.test.cjs +3 -3
  6. package/dist/api-client/client.test.js +3 -3
  7. package/dist/api-client/index.cjs +1 -1
  8. package/dist/api-client/index.d.cts +4 -4
  9. package/dist/api-client/index.d.ts +4 -4
  10. package/dist/api-client/index.js +1 -1
  11. package/dist/api-client/schema.d.cts +1 -1
  12. package/dist/api-client/schema.d.ts +1 -1
  13. package/dist/api-client/types.d.cts +2 -2
  14. package/dist/api-client/types.d.ts +2 -2
  15. package/dist/{client.d-eUhyVsN_.d.ts → client-7aaWrjcF.d.ts} +11 -2
  16. package/dist/client-7aaWrjcF.d.ts.map +1 -0
  17. package/dist/{client-GWxnTlSP.cjs → client-CLuQEpjg.cjs} +12 -5
  18. package/dist/client-CLuQEpjg.cjs.map +1 -0
  19. package/dist/{client.d-ar2BvC_o.d.cts → client-D1qv6QT3.d.cts} +12 -3
  20. package/dist/client-D1qv6QT3.d.cts.map +1 -0
  21. package/dist/{client-CpiyA8FR.js → client-D9mOWh6s.js} +12 -5
  22. package/dist/client-D9mOWh6s.js.map +1 -0
  23. package/dist/{dist-Bewd5-7a.js → dist-BKh-M1A1.js} +11 -11
  24. package/dist/{dist-Bewd5-7a.js.map → dist-BKh-M1A1.js.map} +1 -1
  25. package/dist/{dist-3oa5SxPp.cjs → dist-wiyJYfAH.cjs} +11 -11
  26. package/dist/{dist-3oa5SxPp.cjs.map → dist-wiyJYfAH.cjs.map} +1 -1
  27. package/dist/{formatting-BTSvl7n7.cjs → formatting-BmbJ5-Uh.cjs} +25 -1
  28. package/dist/formatting-BmbJ5-Uh.cjs.map +1 -0
  29. package/dist/formatting-C6Py2iOz.js +46 -0
  30. package/dist/formatting-C6Py2iOz.js.map +1 -0
  31. package/dist/index.cjs +16 -10
  32. package/dist/index.cjs.map +1 -1
  33. package/dist/index.js +16 -10
  34. package/dist/index.js.map +1 -1
  35. package/dist/internal/formatting.cjs +3 -2
  36. package/dist/internal/formatting.d.cts +16 -5
  37. package/dist/internal/formatting.d.cts.map +1 -1
  38. package/dist/internal/formatting.d.ts +16 -5
  39. package/dist/internal/formatting.d.ts.map +1 -1
  40. package/dist/internal/formatting.js +2 -2
  41. package/dist/internal/issue-helpers.test.cjs +2 -2
  42. package/dist/internal/issue-helpers.test.js +2 -2
  43. package/dist/{promptDefinitions.d-DyHOzL57.d.ts → promptDefinitions-C85r2wAk.d.ts} +1 -1
  44. package/dist/promptDefinitions-C85r2wAk.d.ts.map +1 -0
  45. package/dist/{promptDefinitions.d-ByaZdRYv.d.cts → promptDefinitions-CkGJr3c4.d.cts} +1 -1
  46. package/dist/promptDefinitions-CkGJr3c4.d.cts.map +1 -0
  47. package/dist/promptDefinitions.d.cts +1 -1
  48. package/dist/promptDefinitions.d.ts +1 -1
  49. package/dist/{schema.d-DwpHAZsi.d.ts → schema-BnIwkBRb.d.ts} +1 -1
  50. package/dist/schema-BnIwkBRb.d.ts.map +1 -0
  51. package/dist/{schema.d-DJThZSuo.d.cts → schema-aits0AJg.d.cts} +29 -29
  52. package/dist/schema-aits0AJg.d.cts.map +1 -0
  53. package/dist/{server-oefnmsHZ.js → server-0pTMWBNO.js} +11 -9
  54. package/dist/server-0pTMWBNO.js.map +1 -0
  55. package/dist/{server-D-JY6wPp.cjs → server-C9hKLN_c.cjs} +10 -8
  56. package/dist/server-C9hKLN_c.cjs.map +1 -0
  57. package/dist/server.cjs +5 -5
  58. package/dist/server.d.cts +3 -3
  59. package/dist/server.d.cts.map +1 -1
  60. package/dist/server.d.ts +3 -3
  61. package/dist/server.d.ts.map +1 -1
  62. package/dist/server.js +5 -5
  63. package/dist/{stdio-B31CD06F.js → stdio-8gK912aj.js} +2 -2
  64. package/dist/{stdio-B31CD06F.js.map → stdio-8gK912aj.js.map} +1 -1
  65. package/dist/{stdio-BsGPoQfx.cjs → stdio-BsM7bvfc.cjs} +2 -2
  66. package/dist/{stdio-BsGPoQfx.cjs.map → stdio-BsM7bvfc.cjs.map} +1 -1
  67. package/dist/test-setup.cjs +40 -74
  68. package/dist/test-setup.cjs.map +1 -1
  69. package/dist/test-setup.js +40 -74
  70. package/dist/test-setup.js.map +1 -1
  71. package/dist/{toolDefinitions-C0t6Y5Su.cjs → toolDefinitions-CRtHauHJ.cjs} +18 -3
  72. package/dist/toolDefinitions-CRtHauHJ.cjs.map +1 -0
  73. package/dist/{toolDefinitions-DB4pPvgy.js → toolDefinitions-CfNXEIaX.js} +18 -3
  74. package/dist/toolDefinitions-CfNXEIaX.js.map +1 -0
  75. package/dist/{toolDefinitions.d-CsT15_MF.d.cts → toolDefinitions-DPePAe0y.d.cts} +16 -1
  76. package/dist/toolDefinitions-DPePAe0y.d.cts.map +1 -0
  77. package/dist/{toolDefinitions.d-C5JUBInb.d.ts → toolDefinitions-abNbVXb5.d.ts} +16 -1
  78. package/dist/toolDefinitions-abNbVXb5.d.ts.map +1 -0
  79. package/dist/toolDefinitions.cjs +1 -1
  80. package/dist/toolDefinitions.d.cts +1 -1
  81. package/dist/toolDefinitions.d.ts +1 -1
  82. package/dist/toolDefinitions.js +1 -1
  83. package/dist/toolDefinitions.test.cjs +2 -2
  84. package/dist/toolDefinitions.test.js +2 -2
  85. package/dist/{tools-Ck2CHZeM.cjs → tools-2PgtFQ7q.cjs} +65 -46
  86. package/dist/tools-2PgtFQ7q.cjs.map +1 -0
  87. package/dist/{tools-_Y9eV4LR.js → tools-D5yXarBR.js} +65 -47
  88. package/dist/tools-D5yXarBR.js.map +1 -0
  89. package/dist/tools.cjs +3 -3
  90. package/dist/tools.d.cts +18 -3
  91. package/dist/tools.d.cts.map +1 -1
  92. package/dist/tools.d.ts +18 -3
  93. package/dist/tools.d.ts.map +1 -1
  94. package/dist/tools.js +3 -3
  95. package/dist/tools.test.cjs +99 -27
  96. package/dist/tools.test.cjs.map +1 -1
  97. package/dist/tools.test.js +99 -27
  98. package/dist/tools.test.js.map +1 -1
  99. package/dist/transports/stdio.cjs +6 -6
  100. package/dist/transports/stdio.d.cts +3 -3
  101. package/dist/transports/stdio.d.ts +3 -3
  102. package/dist/transports/stdio.js +6 -6
  103. package/dist/{types.d-BfhMPrt_.d.cts → types-DFKY4nvR.d.cts} +4 -3
  104. package/dist/types-DFKY4nvR.d.cts.map +1 -0
  105. package/dist/{types.d-Z5OEf3rw.d.cts → types-Dg6ARePW.d.cts} +2 -2
  106. package/dist/types-Dg6ARePW.d.cts.map +1 -0
  107. package/dist/{types.d-B-acZthg.d.ts → types-RxedZjnY.d.ts} +2 -2
  108. package/dist/types-RxedZjnY.d.ts.map +1 -0
  109. package/dist/{types.d-BeKsSRmy.d.ts → types-X3ot7x0d.d.ts} +4 -3
  110. package/dist/types-X3ot7x0d.d.ts.map +1 -0
  111. package/dist/types.d.cts +3 -3
  112. package/dist/types.d.ts +3 -3
  113. package/dist/{version-BFCcfCIj.cjs → version-B3dZ0aPQ.cjs} +2 -2
  114. package/dist/{version-BFCcfCIj.cjs.map → version-B3dZ0aPQ.cjs.map} +1 -1
  115. package/dist/version-psBzsZ8-.js +6 -0
  116. package/dist/{version-B5Fav38l.js.map → version-psBzsZ8-.js.map} +1 -1
  117. package/dist/version.cjs +1 -1
  118. package/dist/version.js +1 -1
  119. package/dist/{vi.ClIskdbk-Dd6dTM3O.js → vi.ClIskdbk-BbUmO3mx.js} +9 -9
  120. package/dist/{vi.ClIskdbk-Dd6dTM3O.js.map → vi.ClIskdbk-BbUmO3mx.js.map} +1 -1
  121. package/dist/{vi.ClIskdbk-Bn6W0wTE.cjs → vi.ClIskdbk-TqmAThAO.cjs} +9 -9
  122. package/dist/{vi.ClIskdbk-Bn6W0wTE.cjs.map → vi.ClIskdbk-TqmAThAO.cjs.map} +1 -1
  123. package/package.json +8 -8
  124. package/dist/client-CpiyA8FR.js.map +0 -1
  125. package/dist/client-GWxnTlSP.cjs.map +0 -1
  126. package/dist/client.d-ar2BvC_o.d.cts.map +0 -1
  127. package/dist/client.d-eUhyVsN_.d.ts.map +0 -1
  128. package/dist/formatting-BTSvl7n7.cjs.map +0 -1
  129. package/dist/formatting-Bacfde0I.js +0 -28
  130. package/dist/formatting-Bacfde0I.js.map +0 -1
  131. package/dist/promptDefinitions.d-ByaZdRYv.d.cts.map +0 -1
  132. package/dist/promptDefinitions.d-DyHOzL57.d.ts.map +0 -1
  133. package/dist/schema.d-DJThZSuo.d.cts.map +0 -1
  134. package/dist/schema.d-DwpHAZsi.d.ts.map +0 -1
  135. package/dist/server-D-JY6wPp.cjs.map +0 -1
  136. package/dist/server-oefnmsHZ.js.map +0 -1
  137. package/dist/toolDefinitions-C0t6Y5Su.cjs.map +0 -1
  138. package/dist/toolDefinitions-DB4pPvgy.js.map +0 -1
  139. package/dist/toolDefinitions.d-C5JUBInb.d.ts.map +0 -1
  140. package/dist/toolDefinitions.d-CsT15_MF.d.cts.map +0 -1
  141. package/dist/tools-Ck2CHZeM.cjs.map +0 -1
  142. package/dist/tools-_Y9eV4LR.js.map +0 -1
  143. package/dist/types.d-B-acZthg.d.ts.map +0 -1
  144. package/dist/types.d-BeKsSRmy.d.ts.map +0 -1
  145. package/dist/types.d-BfhMPrt_.d.cts.map +0 -1
  146. package/dist/types.d-Z5OEf3rw.d.cts.map +0 -1
  147. package/dist/version-B5Fav38l.js +0 -6
  148. /package/dist/{index.d-Cb-lHGvn.d.cts → index-BPSCxsMC.d.cts} +0 -0
  149. /package/dist/{index.d-kYckfDWv.d.ts → index-h64gcVNJ.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/mcp-server",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=20"
@@ -71,15 +71,15 @@
71
71
  }
72
72
  },
73
73
  "devDependencies": {
74
- "msw": "^2.7.5",
75
- "@sentry/mcp-server-mocks": "0.5.0",
76
- "@sentry/mcp-server-tsconfig": "0.5.0"
74
+ "msw": "^2.7.6",
75
+ "@sentry/mcp-server-mocks": "0.7.0",
76
+ "@sentry/mcp-server-tsconfig": "0.7.0"
77
77
  },
78
78
  "dependencies": {
79
- "@modelcontextprotocol/sdk": "^1.10.2",
80
- "@sentry/core": "^9.14.0",
81
- "@sentry/node": "^9.14.0",
82
- "zod": "^3.24.3"
79
+ "@modelcontextprotocol/sdk": "^1.11.0",
80
+ "@sentry/core": "^9.16.1",
81
+ "@sentry/node": "^9.16.1",
82
+ "zod": "^3.24.4"
83
83
  },
84
84
  "scripts": {
85
85
  "build": "tsdown",
@@ -1 +0,0 @@
1
- {"version":3,"file":"client-CpiyA8FR.js","names":["message: string","status: number","host: string","path: string","options: RequestInit","headers: Record<string, string>","parsed: unknown | undefined","organizationSlug: string","issueId: string","traceId: string","opts?: RequestOptions","sentryQuery: string[]"],"sources":["../src/api-client/client.ts"],"sourcesContent":["import { logError } from \"../logging\";\nimport {\n OrganizationListSchema,\n ClientKeySchema,\n TeamListSchema,\n TeamSchema,\n ProjectListSchema,\n ProjectSchema,\n ReleaseListSchema,\n IssueListSchema,\n IssueSchema,\n EventSchema,\n ErrorsSearchResponseSchema,\n SpansSearchResponseSchema,\n TagListSchema,\n ApiErrorSchema,\n ClientKeyListSchema,\n AutofixRunSchema,\n AutofixRunStateSchema,\n} from \"./schema\";\nimport type {\n AutofixRun,\n AutofixRunState,\n ClientKey,\n ClientKeyList,\n Event,\n Issue,\n IssueList,\n OrganizationList,\n Project,\n ProjectList,\n ReleaseList,\n TagList,\n Team,\n TeamList,\n} from \"./types\";\n\nexport class ApiError extends Error {\n constructor(\n message: string,\n public status: number,\n ) {\n // HACK: improving this error message for the LLMs\n let finalMessage = message;\n if (\n message.includes(\n \"You do not have the multi project stream feature enabled\",\n ) ||\n message.includes(\"You cannot view events from multiple projects\")\n ) {\n finalMessage =\n \"You do not have access to query across multiple projects. Please select a project for your query.\";\n }\n super(finalMessage);\n }\n}\n\ntype RequestOptions = {\n host?: string;\n};\n\nexport class SentryApiService {\n private accessToken: string | null;\n protected host: string;\n protected apiPrefix: string;\n\n constructor({\n accessToken = null,\n host = process.env.SENTRY_HOST,\n }: {\n accessToken?: string | null;\n host?: string;\n }) {\n this.accessToken = accessToken;\n this.host = host || \"sentry.io\";\n this.apiPrefix = new URL(\"/api/0\", `https://${this.host}`).href;\n }\n\n setHost(host: string) {\n this.host = host;\n this.apiPrefix = new URL(\"/api/0\", `https://${this.host}`).href;\n }\n\n private async request(\n path: string,\n options: RequestInit = {},\n { host }: { host?: string } = {},\n ): Promise<Response> {\n const url = host\n ? new URL(`/api/0${path}`, `https://${host}`).href\n : `${this.apiPrefix}${path}`;\n\n const headers: Record<string, string> = {\n \"Content-Type\": \"application/json\",\n };\n if (this.accessToken) {\n headers.Authorization = `Bearer ${this.accessToken}`;\n }\n\n console.log(`[sentryApi] ${options.method || \"GET\"} ${url}`);\n const response = await fetch(url, {\n ...options,\n headers,\n });\n\n if (!response.ok) {\n const errorText = await response.text();\n let parsed: unknown | undefined;\n try {\n parsed = JSON.parse(errorText);\n } catch (error) {\n console.error(\n `[sentryApi] Failed to parse error response: ${errorText}`,\n error,\n );\n }\n\n if (parsed) {\n const { data, success, error } = ApiErrorSchema.safeParse(parsed);\n\n if (success) {\n throw new ApiError(data.detail, response.status);\n }\n\n console.error(\n `[sentryApi] Failed to parse error response: ${errorText}`,\n error,\n );\n }\n\n throw new Error(\n `API request failed: ${response.status} ${response.statusText}\\n${errorText}`,\n );\n }\n\n return response;\n }\n\n getIssueUrl(organizationSlug: string, issueId: string): string {\n return this.host !== \"sentry.io\"\n ? `https://${this.host}/organizations/${organizationSlug}/issues/${issueId}`\n : `https://${organizationSlug}.${this.host}/issues/${issueId}`;\n }\n\n getTraceUrl(organizationSlug: string, traceId: string): string {\n return this.host !== \"sentry.io\"\n ? `https://${this.host}/organizations/${organizationSlug}/explore/traces/trace/${traceId}`\n : `https://${organizationSlug}.${this.host}/explore/traces/trace/${traceId}`;\n }\n\n async listOrganizations(opts?: RequestOptions): Promise<OrganizationList> {\n const response = await this.request(\"/organizations/\", undefined, opts);\n\n const body = await response.json();\n return OrganizationListSchema.parse(body);\n }\n\n async listTeams(\n organizationSlug: string,\n opts?: RequestOptions,\n ): Promise<TeamList> {\n const response = await this.request(\n `/organizations/${organizationSlug}/teams/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return TeamListSchema.parse(body);\n }\n\n async createTeam(\n {\n organizationSlug,\n name,\n }: {\n organizationSlug: string;\n name: string;\n },\n opts?: RequestOptions,\n ): Promise<Team> {\n const response = await this.request(\n `/organizations/${organizationSlug}/teams/`,\n {\n method: \"POST\",\n body: JSON.stringify({ name }),\n },\n opts,\n );\n\n return TeamSchema.parse(await response.json());\n }\n\n async listProjects(\n organizationSlug: string,\n opts?: RequestOptions,\n ): Promise<ProjectList> {\n const response = await this.request(\n `/organizations/${organizationSlug}/projects/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return ProjectListSchema.parse(body);\n }\n\n async createProject(\n {\n organizationSlug,\n teamSlug,\n name,\n platform,\n }: {\n organizationSlug: string;\n teamSlug: string;\n name: string;\n platform?: string;\n },\n opts?: RequestOptions,\n ): Promise<Project> {\n const response = await this.request(\n `/teams/${organizationSlug}/${teamSlug}/projects/`,\n {\n method: \"POST\",\n body: JSON.stringify({\n name,\n platform,\n }),\n },\n opts,\n );\n return ProjectSchema.parse(await response.json());\n }\n\n async createClientKey(\n {\n organizationSlug,\n projectSlug,\n name,\n }: {\n organizationSlug: string;\n projectSlug: string;\n name?: string;\n },\n opts?: RequestOptions,\n ): Promise<ClientKey> {\n const response = await this.request(\n `/projects/${organizationSlug}/${projectSlug}/keys/`,\n {\n method: \"POST\",\n body: JSON.stringify({\n name,\n }),\n },\n opts,\n );\n return ClientKeySchema.parse(await response.json());\n }\n\n async listClientKeys(\n {\n organizationSlug,\n projectSlug,\n }: {\n organizationSlug: string;\n projectSlug: string;\n },\n opts?: RequestOptions,\n ): Promise<ClientKeyList> {\n const response = await this.request(\n `/projects/${organizationSlug}/${projectSlug}/keys/`,\n undefined,\n opts,\n );\n return ClientKeyListSchema.parse(await response.json());\n }\n\n async listReleases(\n {\n organizationSlug,\n projectSlug,\n }: {\n organizationSlug: string;\n projectSlug?: string;\n },\n opts?: RequestOptions,\n ): Promise<ReleaseList> {\n const response = await this.request(\n projectSlug\n ? `/projects/${organizationSlug}/${projectSlug}/releases/`\n : `/organizations/${organizationSlug}/releases/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return ReleaseListSchema.parse(body);\n }\n\n async listTags(\n {\n organizationSlug,\n dataset,\n }: {\n organizationSlug: string;\n dataset?: \"errors\" | \"search_issues\";\n },\n opts?: RequestOptions,\n ): Promise<TagList> {\n // TODO: this supports project in the query, but needs fixed\n // to accept slugs\n const searchQuery = new URLSearchParams();\n if (dataset) {\n searchQuery.set(\"dataset\", dataset);\n }\n\n const response = await this.request(\n `/organizations/${organizationSlug}/tags/${searchQuery.toString()}`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return TagListSchema.parse(body);\n }\n\n async listIssues(\n {\n organizationSlug,\n projectSlug,\n query,\n sortBy,\n }: {\n organizationSlug: string;\n projectSlug?: string;\n query?: string;\n sortBy?: \"user\" | \"freq\" | \"date\" | \"new\";\n },\n opts?: RequestOptions,\n ): Promise<IssueList> {\n const sentryQuery: string[] = [];\n if (query) {\n sentryQuery.push(query);\n }\n\n const queryParams = new URLSearchParams();\n queryParams.set(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n if (sortBy) queryParams.set(\"sort\", sortBy);\n queryParams.set(\"statsPeriod\", \"1w\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n\n queryParams.append(\"collapse\", \"unhandled\");\n\n const apiUrl = projectSlug\n ? `/projects/${organizationSlug}/${projectSlug}/issues/?${queryParams.toString()}`\n : `/organizations/${organizationSlug}/issues/?${queryParams.toString()}`;\n\n const response = await this.request(apiUrl, undefined, opts);\n\n const body = await response.json();\n return IssueListSchema.parse(body);\n }\n\n async getIssue(\n {\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n },\n opts?: RequestOptions,\n ): Promise<Issue> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return IssueSchema.parse(body);\n }\n\n async getLatestEventForIssue(\n {\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n },\n opts?: RequestOptions,\n ): Promise<Event> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/events/latest/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return EventSchema.parse(body);\n }\n\n // TODO: Sentry is not yet exposing a reasonable API to fetch trace data\n // async getTrace({\n // organizationSlug,\n // traceId,\n // }: {\n // organizationSlug: string;\n // traceId: string;\n // }): Promise<z.infer<typeof SentryIssueSchema>> {\n // const response = await this.request(\n // `/organizations/${organizationSlug}/issues/${traceId}/`,\n // );\n\n // const body = await response.json();\n // return SentryIssueSchema.parse(body);\n // }\n\n async searchErrors(\n {\n organizationSlug,\n projectSlug,\n filename,\n transaction,\n query,\n sortBy = \"last_seen\",\n }: {\n organizationSlug: string;\n projectSlug?: string;\n filename?: string;\n transaction?: string;\n query?: string;\n sortBy?: \"last_seen\" | \"count\";\n },\n opts?: RequestOptions,\n ) {\n const sentryQuery: string[] = [];\n if (filename) {\n sentryQuery.push(`stack.filename:\"*${filename.replace(/\"/g, '\\\\\"')}\"`);\n }\n if (transaction) {\n sentryQuery.push(`transaction:\"${transaction.replace(/\"/g, '\\\\\"')}\"`);\n }\n if (query) {\n sentryQuery.push(query);\n }\n if (projectSlug) {\n sentryQuery.push(`project:${projectSlug}`);\n }\n\n const queryParams = new URLSearchParams();\n queryParams.set(\"dataset\", \"errors\");\n queryParams.set(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n queryParams.set(\n \"sort\",\n `-${sortBy === \"last_seen\" ? \"last_seen\" : \"count\"}`,\n );\n queryParams.set(\"statsPeriod\", \"1w\");\n queryParams.append(\"field\", \"issue\");\n queryParams.append(\"field\", \"title\");\n queryParams.append(\"field\", \"project\");\n queryParams.append(\"field\", \"last_seen()\");\n queryParams.append(\"field\", \"count()\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n // if (projectSlug) queryParams.set(\"project\", projectSlug);\n\n const apiUrl = `/organizations/${organizationSlug}/events/?${queryParams.toString()}`;\n\n const response = await this.request(apiUrl, undefined, opts);\n\n const body = await response.json();\n // TODO(dcramer): If you're using an older version of Sentry this API had a breaking change\n // meaning this endpoint will error.\n return ErrorsSearchResponseSchema.parse(body).data;\n }\n\n async searchSpans(\n {\n organizationSlug,\n projectSlug,\n transaction,\n query,\n sortBy = \"timestamp\",\n }: {\n organizationSlug: string;\n projectSlug?: string;\n transaction?: string;\n query?: string;\n sortBy?: \"timestamp\" | \"duration\";\n },\n opts?: RequestOptions,\n ) {\n const sentryQuery: string[] = [\"is_transaction:true\"];\n if (transaction) {\n sentryQuery.push(`transaction:\"${transaction.replace(/\"/g, '\\\\\"')}\"`);\n }\n if (query) {\n sentryQuery.push(query);\n }\n if (projectSlug) {\n sentryQuery.push(`project:${projectSlug}`);\n }\n\n const queryParams = new URLSearchParams();\n queryParams.set(\"dataset\", \"spans\");\n queryParams.set(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n queryParams.set(\n \"sort\",\n `-${sortBy === \"timestamp\" ? \"timestamp\" : \"span.duration\"}`,\n );\n queryParams.set(\"allowAggregateConditions\", \"0\");\n queryParams.set(\"useRpc\", \"1\");\n queryParams.append(\"field\", \"id\");\n queryParams.append(\"field\", \"trace\");\n queryParams.append(\"field\", \"span.op\");\n queryParams.append(\"field\", \"span.description\");\n queryParams.append(\"field\", \"span.duration\");\n queryParams.append(\"field\", \"transaction\");\n queryParams.append(\"field\", \"project\");\n queryParams.append(\"field\", \"timestamp\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n // if (projectSlug) queryParams.set(\"project\", projectSlug);\n\n const apiUrl = `/organizations/${organizationSlug}/events/?${queryParams.toString()}`;\n\n const response = await this.request(apiUrl, undefined, opts);\n\n const body = await response.json();\n return SpansSearchResponseSchema.parse(body).data;\n }\n\n // POST https://us.sentry.io/api/0/issues/5485083130/autofix/\n async startAutofix(\n {\n organizationSlug,\n issueId,\n eventId,\n instruction = \"\",\n }: {\n organizationSlug: string;\n issueId: string;\n eventId?: string;\n instruction?: string;\n },\n opts?: RequestOptions,\n ): Promise<AutofixRun> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/autofix/`,\n {\n method: \"POST\",\n body: JSON.stringify({\n event_id: eventId,\n instruction,\n }),\n },\n opts,\n );\n const body = await response.json();\n return AutofixRunSchema.parse(body);\n }\n\n // GET https://us.sentry.io/api/0/issues/5485083130/autofix/\n async getAutofixState(\n {\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n },\n opts?: RequestOptions,\n ): Promise<AutofixRunState> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/autofix/`,\n undefined,\n opts,\n );\n const body = await response.json();\n return AutofixRunStateSchema.parse(body);\n }\n}\n"],"mappings":";;;AAqCA,IAAa,WAAb,cAA8B,MAAM;CAClC,YACEA,SACOC,QACP;EAEA,IAAI,eAAe;AACnB,MACE,QAAQ,SACN,2DACD,IACD,QAAQ,SAAS,gDAAgD,CAEjE,gBACE;AAEJ,QAAM,aAAa;EAqhBtB,KAliBU;CAcR;AACF;AAMD,IAAa,mBAAb,MAA8B;CAC5B,AAAQ;CACR,AAAU;CACV,AAAU;CAEV,YAAY,EACV,cAAc,MACd,OAAO,QAAQ,IAAI,aAIpB,EAAE;AACD,OAAK,cAAc;AACnB,OAAK,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AA0B,MAAM,KAAK,CAAC;CAC9C;CAGD,MAAM,aACJ,EACE,kBACA,SACA,SACA,cAAc,IAMf,EACDD,MACqB;EACrB,MAAM,WAAW,MAAM,KAAK,SACzB,iBAAiB,iBAAiB,UAAU,QAAQ,YACrD;GACE,QAAQ;GACR,MAAM,KAAK,UAAU;IACnB,UAAU;IACV;GACD,EAAC;EACH,GACD,KACD;EACD,MAAM,OAAO,MAAM,SAAS,MAAM;AAClC,SAAO,iBAAiB,MAAM,KAAK;CACpC;CAGD,MAAM,gBACJ,EACE,kBACA,SAID,EACDA,MAC0B;EAC1B,MAAM,WAAW,MAAM,KAAK,SACzB,iBAAiB,iBAAiB,UAAU,QAAQ,oBAErD,KACD;EACD,MAAM,OAAO,MAAM,SAAS,MAAM;AAClC,SAAO,sBAAsB,MAAM,KAAK;CACzC;AACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"client-GWxnTlSP.cjs","names":["message: string","status: number","host: string","path: string","options: RequestInit","headers: Record<string, string>","parsed: unknown | undefined","organizationSlug: string","issueId: string","traceId: string","opts?: RequestOptions","sentryQuery: string[]"],"sources":["../src/api-client/client.ts"],"sourcesContent":["import { logError } from \"../logging\";\nimport {\n OrganizationListSchema,\n ClientKeySchema,\n TeamListSchema,\n TeamSchema,\n ProjectListSchema,\n ProjectSchema,\n ReleaseListSchema,\n IssueListSchema,\n IssueSchema,\n EventSchema,\n ErrorsSearchResponseSchema,\n SpansSearchResponseSchema,\n TagListSchema,\n ApiErrorSchema,\n ClientKeyListSchema,\n AutofixRunSchema,\n AutofixRunStateSchema,\n} from \"./schema\";\nimport type {\n AutofixRun,\n AutofixRunState,\n ClientKey,\n ClientKeyList,\n Event,\n Issue,\n IssueList,\n OrganizationList,\n Project,\n ProjectList,\n ReleaseList,\n TagList,\n Team,\n TeamList,\n} from \"./types\";\n\nexport class ApiError extends Error {\n constructor(\n message: string,\n public status: number,\n ) {\n // HACK: improving this error message for the LLMs\n let finalMessage = message;\n if (\n message.includes(\n \"You do not have the multi project stream feature enabled\",\n ) ||\n message.includes(\"You cannot view events from multiple projects\")\n ) {\n finalMessage =\n \"You do not have access to query across multiple projects. Please select a project for your query.\";\n }\n super(finalMessage);\n }\n}\n\ntype RequestOptions = {\n host?: string;\n};\n\nexport class SentryApiService {\n private accessToken: string | null;\n protected host: string;\n protected apiPrefix: string;\n\n constructor({\n accessToken = null,\n host = process.env.SENTRY_HOST,\n }: {\n accessToken?: string | null;\n host?: string;\n }) {\n this.accessToken = accessToken;\n this.host = host || \"sentry.io\";\n this.apiPrefix = new URL(\"/api/0\", `https://${this.host}`).href;\n }\n\n setHost(host: string) {\n this.host = host;\n this.apiPrefix = new URL(\"/api/0\", `https://${this.host}`).href;\n }\n\n private async request(\n path: string,\n options: RequestInit = {},\n { host }: { host?: string } = {},\n ): Promise<Response> {\n const url = host\n ? new URL(`/api/0${path}`, `https://${host}`).href\n : `${this.apiPrefix}${path}`;\n\n const headers: Record<string, string> = {\n \"Content-Type\": \"application/json\",\n };\n if (this.accessToken) {\n headers.Authorization = `Bearer ${this.accessToken}`;\n }\n\n console.log(`[sentryApi] ${options.method || \"GET\"} ${url}`);\n const response = await fetch(url, {\n ...options,\n headers,\n });\n\n if (!response.ok) {\n const errorText = await response.text();\n let parsed: unknown | undefined;\n try {\n parsed = JSON.parse(errorText);\n } catch (error) {\n console.error(\n `[sentryApi] Failed to parse error response: ${errorText}`,\n error,\n );\n }\n\n if (parsed) {\n const { data, success, error } = ApiErrorSchema.safeParse(parsed);\n\n if (success) {\n throw new ApiError(data.detail, response.status);\n }\n\n console.error(\n `[sentryApi] Failed to parse error response: ${errorText}`,\n error,\n );\n }\n\n throw new Error(\n `API request failed: ${response.status} ${response.statusText}\\n${errorText}`,\n );\n }\n\n return response;\n }\n\n getIssueUrl(organizationSlug: string, issueId: string): string {\n return this.host !== \"sentry.io\"\n ? `https://${this.host}/organizations/${organizationSlug}/issues/${issueId}`\n : `https://${organizationSlug}.${this.host}/issues/${issueId}`;\n }\n\n getTraceUrl(organizationSlug: string, traceId: string): string {\n return this.host !== \"sentry.io\"\n ? `https://${this.host}/organizations/${organizationSlug}/explore/traces/trace/${traceId}`\n : `https://${organizationSlug}.${this.host}/explore/traces/trace/${traceId}`;\n }\n\n async listOrganizations(opts?: RequestOptions): Promise<OrganizationList> {\n const response = await this.request(\"/organizations/\", undefined, opts);\n\n const body = await response.json();\n return OrganizationListSchema.parse(body);\n }\n\n async listTeams(\n organizationSlug: string,\n opts?: RequestOptions,\n ): Promise<TeamList> {\n const response = await this.request(\n `/organizations/${organizationSlug}/teams/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return TeamListSchema.parse(body);\n }\n\n async createTeam(\n {\n organizationSlug,\n name,\n }: {\n organizationSlug: string;\n name: string;\n },\n opts?: RequestOptions,\n ): Promise<Team> {\n const response = await this.request(\n `/organizations/${organizationSlug}/teams/`,\n {\n method: \"POST\",\n body: JSON.stringify({ name }),\n },\n opts,\n );\n\n return TeamSchema.parse(await response.json());\n }\n\n async listProjects(\n organizationSlug: string,\n opts?: RequestOptions,\n ): Promise<ProjectList> {\n const response = await this.request(\n `/organizations/${organizationSlug}/projects/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return ProjectListSchema.parse(body);\n }\n\n async createProject(\n {\n organizationSlug,\n teamSlug,\n name,\n platform,\n }: {\n organizationSlug: string;\n teamSlug: string;\n name: string;\n platform?: string;\n },\n opts?: RequestOptions,\n ): Promise<Project> {\n const response = await this.request(\n `/teams/${organizationSlug}/${teamSlug}/projects/`,\n {\n method: \"POST\",\n body: JSON.stringify({\n name,\n platform,\n }),\n },\n opts,\n );\n return ProjectSchema.parse(await response.json());\n }\n\n async createClientKey(\n {\n organizationSlug,\n projectSlug,\n name,\n }: {\n organizationSlug: string;\n projectSlug: string;\n name?: string;\n },\n opts?: RequestOptions,\n ): Promise<ClientKey> {\n const response = await this.request(\n `/projects/${organizationSlug}/${projectSlug}/keys/`,\n {\n method: \"POST\",\n body: JSON.stringify({\n name,\n }),\n },\n opts,\n );\n return ClientKeySchema.parse(await response.json());\n }\n\n async listClientKeys(\n {\n organizationSlug,\n projectSlug,\n }: {\n organizationSlug: string;\n projectSlug: string;\n },\n opts?: RequestOptions,\n ): Promise<ClientKeyList> {\n const response = await this.request(\n `/projects/${organizationSlug}/${projectSlug}/keys/`,\n undefined,\n opts,\n );\n return ClientKeyListSchema.parse(await response.json());\n }\n\n async listReleases(\n {\n organizationSlug,\n projectSlug,\n }: {\n organizationSlug: string;\n projectSlug?: string;\n },\n opts?: RequestOptions,\n ): Promise<ReleaseList> {\n const response = await this.request(\n projectSlug\n ? `/projects/${organizationSlug}/${projectSlug}/releases/`\n : `/organizations/${organizationSlug}/releases/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return ReleaseListSchema.parse(body);\n }\n\n async listTags(\n {\n organizationSlug,\n dataset,\n }: {\n organizationSlug: string;\n dataset?: \"errors\" | \"search_issues\";\n },\n opts?: RequestOptions,\n ): Promise<TagList> {\n // TODO: this supports project in the query, but needs fixed\n // to accept slugs\n const searchQuery = new URLSearchParams();\n if (dataset) {\n searchQuery.set(\"dataset\", dataset);\n }\n\n const response = await this.request(\n `/organizations/${organizationSlug}/tags/${searchQuery.toString()}`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return TagListSchema.parse(body);\n }\n\n async listIssues(\n {\n organizationSlug,\n projectSlug,\n query,\n sortBy,\n }: {\n organizationSlug: string;\n projectSlug?: string;\n query?: string;\n sortBy?: \"user\" | \"freq\" | \"date\" | \"new\";\n },\n opts?: RequestOptions,\n ): Promise<IssueList> {\n const sentryQuery: string[] = [];\n if (query) {\n sentryQuery.push(query);\n }\n\n const queryParams = new URLSearchParams();\n queryParams.set(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n if (sortBy) queryParams.set(\"sort\", sortBy);\n queryParams.set(\"statsPeriod\", \"1w\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n\n queryParams.append(\"collapse\", \"unhandled\");\n\n const apiUrl = projectSlug\n ? `/projects/${organizationSlug}/${projectSlug}/issues/?${queryParams.toString()}`\n : `/organizations/${organizationSlug}/issues/?${queryParams.toString()}`;\n\n const response = await this.request(apiUrl, undefined, opts);\n\n const body = await response.json();\n return IssueListSchema.parse(body);\n }\n\n async getIssue(\n {\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n },\n opts?: RequestOptions,\n ): Promise<Issue> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return IssueSchema.parse(body);\n }\n\n async getLatestEventForIssue(\n {\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n },\n opts?: RequestOptions,\n ): Promise<Event> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/events/latest/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return EventSchema.parse(body);\n }\n\n // TODO: Sentry is not yet exposing a reasonable API to fetch trace data\n // async getTrace({\n // organizationSlug,\n // traceId,\n // }: {\n // organizationSlug: string;\n // traceId: string;\n // }): Promise<z.infer<typeof SentryIssueSchema>> {\n // const response = await this.request(\n // `/organizations/${organizationSlug}/issues/${traceId}/`,\n // );\n\n // const body = await response.json();\n // return SentryIssueSchema.parse(body);\n // }\n\n async searchErrors(\n {\n organizationSlug,\n projectSlug,\n filename,\n transaction,\n query,\n sortBy = \"last_seen\",\n }: {\n organizationSlug: string;\n projectSlug?: string;\n filename?: string;\n transaction?: string;\n query?: string;\n sortBy?: \"last_seen\" | \"count\";\n },\n opts?: RequestOptions,\n ) {\n const sentryQuery: string[] = [];\n if (filename) {\n sentryQuery.push(`stack.filename:\"*${filename.replace(/\"/g, '\\\\\"')}\"`);\n }\n if (transaction) {\n sentryQuery.push(`transaction:\"${transaction.replace(/\"/g, '\\\\\"')}\"`);\n }\n if (query) {\n sentryQuery.push(query);\n }\n if (projectSlug) {\n sentryQuery.push(`project:${projectSlug}`);\n }\n\n const queryParams = new URLSearchParams();\n queryParams.set(\"dataset\", \"errors\");\n queryParams.set(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n queryParams.set(\n \"sort\",\n `-${sortBy === \"last_seen\" ? \"last_seen\" : \"count\"}`,\n );\n queryParams.set(\"statsPeriod\", \"1w\");\n queryParams.append(\"field\", \"issue\");\n queryParams.append(\"field\", \"title\");\n queryParams.append(\"field\", \"project\");\n queryParams.append(\"field\", \"last_seen()\");\n queryParams.append(\"field\", \"count()\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n // if (projectSlug) queryParams.set(\"project\", projectSlug);\n\n const apiUrl = `/organizations/${organizationSlug}/events/?${queryParams.toString()}`;\n\n const response = await this.request(apiUrl, undefined, opts);\n\n const body = await response.json();\n // TODO(dcramer): If you're using an older version of Sentry this API had a breaking change\n // meaning this endpoint will error.\n return ErrorsSearchResponseSchema.parse(body).data;\n }\n\n async searchSpans(\n {\n organizationSlug,\n projectSlug,\n transaction,\n query,\n sortBy = \"timestamp\",\n }: {\n organizationSlug: string;\n projectSlug?: string;\n transaction?: string;\n query?: string;\n sortBy?: \"timestamp\" | \"duration\";\n },\n opts?: RequestOptions,\n ) {\n const sentryQuery: string[] = [\"is_transaction:true\"];\n if (transaction) {\n sentryQuery.push(`transaction:\"${transaction.replace(/\"/g, '\\\\\"')}\"`);\n }\n if (query) {\n sentryQuery.push(query);\n }\n if (projectSlug) {\n sentryQuery.push(`project:${projectSlug}`);\n }\n\n const queryParams = new URLSearchParams();\n queryParams.set(\"dataset\", \"spans\");\n queryParams.set(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n queryParams.set(\n \"sort\",\n `-${sortBy === \"timestamp\" ? \"timestamp\" : \"span.duration\"}`,\n );\n queryParams.set(\"allowAggregateConditions\", \"0\");\n queryParams.set(\"useRpc\", \"1\");\n queryParams.append(\"field\", \"id\");\n queryParams.append(\"field\", \"trace\");\n queryParams.append(\"field\", \"span.op\");\n queryParams.append(\"field\", \"span.description\");\n queryParams.append(\"field\", \"span.duration\");\n queryParams.append(\"field\", \"transaction\");\n queryParams.append(\"field\", \"project\");\n queryParams.append(\"field\", \"timestamp\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n // if (projectSlug) queryParams.set(\"project\", projectSlug);\n\n const apiUrl = `/organizations/${organizationSlug}/events/?${queryParams.toString()}`;\n\n const response = await this.request(apiUrl, undefined, opts);\n\n const body = await response.json();\n return SpansSearchResponseSchema.parse(body).data;\n }\n\n // POST https://us.sentry.io/api/0/issues/5485083130/autofix/\n async startAutofix(\n {\n organizationSlug,\n issueId,\n eventId,\n instruction = \"\",\n }: {\n organizationSlug: string;\n issueId: string;\n eventId?: string;\n instruction?: string;\n },\n opts?: RequestOptions,\n ): Promise<AutofixRun> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/autofix/`,\n {\n method: \"POST\",\n body: JSON.stringify({\n event_id: eventId,\n instruction,\n }),\n },\n opts,\n );\n const body = await response.json();\n return AutofixRunSchema.parse(body);\n }\n\n // GET https://us.sentry.io/api/0/issues/5485083130/autofix/\n async getAutofixState(\n {\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n },\n opts?: RequestOptions,\n ): Promise<AutofixRunState> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/autofix/`,\n undefined,\n opts,\n );\n const body = await response.json();\n return AutofixRunStateSchema.parse(body);\n }\n}\n"],"mappings":";;;;AAqCA,IAAa,WAAb,cAA8B,MAAM;CAClC,YACEA,SACOC,QACP;EAEA,IAAI,eAAe;AACnB,MACE,QAAQ,SACN,2DACD,IACD,QAAQ,SAAS,gDAAgD,CAEjE,gBACE;AAEJ,QAAM,aAAa;EAqhBtB,KAliBU;CAcR;AACF;AAMD,IAAa,mBAAb,MAA8B;CAC5B,AAAQ;CACR,AAAU;CACV,AAAU;CAEV,YAAY,EACV,cAAc,MACd,OAAO,QAAQ,IAAI,aAIpB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A;IAOK,WAAA,EAAA,MAAA;IACE,EAAA,EAAA,MAAA;IAAR,OAAA,EAAA,MAAA;IAmBC,KAAA,EAAA,MAAA;IACA,SAAA,EAAA,MAAA;IAKK,kBAAA,EAAA,MAAA;IACE,eAAA,EAAA,MAAA;EAAe,CAAA,EAAvB,CAAA;EAAO,YAAA,CAAA;IAAA,gBAAA;IAAA,OAAA;IAAA,OAAA;IAAA;GAAA,EAAA;;;;;YA3BD,iBACN,QAAQ;;;;;;;YAyBF,iBACN,QAAQ"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatting-BTSvl7n7.cjs","names":["frame: z.infer<typeof FrameInterface>","platform: string | undefined | null","event: Event"],"sources":["../src/internal/formatting.ts"],"sourcesContent":["import type { z } from \"zod\";\nimport type { Event } from \"../api-client/types\";\nimport type { ErrorEntrySchema, FrameInterface } from \"../api-client\";\n\nexport function formatFrameHeader(\n frame: z.infer<typeof FrameInterface>,\n platform: string | undefined | null,\n) {\n if (platform?.startsWith(\"javascript\")) {\n return `${[frame.filename, frame.lineNo, frame.colNo]\n .filter((i) => !!i)\n .join(\":\")}${frame.function ? ` (${frame.function})` : \"\"}`;\n }\n return `${frame.function ? `\"${frame.function}\"` : \"unknown function\"} in \"${frame.filename || frame.module}\"${\n frame.lineNo\n ? ` at line ${frame.lineNo}${frame.colNo !== null ? `:${frame.colNo}` : \"\"}`\n : \"\"\n }`;\n}\n\nexport function formatEventOutput(event: Event) {\n let output = \"\";\n for (const entry of event.entries) {\n if (entry.type === \"exception\") {\n const data = entry.data as z.infer<typeof ErrorEntrySchema>;\n const firstError = data.value ?? data.values[0];\n if (!firstError) {\n continue;\n }\n output += `**Error:**\\n${\"```\"}\\n${firstError.type}: ${\n firstError.value\n }\\n${\"```\"}\\n\\n`;\n if (!firstError.stacktrace || !firstError.stacktrace.frames) {\n continue;\n }\n output += `**Stacktrace:**\\n${\"```\"}\\n${firstError.stacktrace.frames\n .map((frame) => {\n const context = frame.context?.length\n ? `${frame.context\n .filter(([lineno, _]) => lineno === frame.lineNo)\n .map(([_, code]) => `\\n${code}`)\n .join(\"\")}`\n : \"\";\n\n return `${formatFrameHeader(frame, event.platform)}${context}`;\n })\n .join(\"\\n\")}\\n${\"```\"}\\n\\n`;\n }\n }\n return output;\n}\n"],"mappings":";;;AAIA,SAAgB,kBACdA,OACAC,UACA;AACA,KAAI,UAAU,WAAW,aAAa,CACpC,SAAQ,EAAE;EAAC,MAAM;EAAU,MAAM;EAAQ,MAAM;CAAM,EAClD,OAAO,CAAC,QAAQ,EAAE,CAClB,KAAK,IAAI,CAAC,EAAE,MAAM,YAAY,IAAI,MAAM,SAAS,KAAK,GAAG;AAE9D,SAAQ,EAAE,MAAM,YAAY,GAAG,MAAM,SAAS,KAAK,mBAAmB,OAAO,MAAM,YAAY,MAAM,OAAO,GAC1G,MAAM,UACD,WAAW,MAAM,OAAO,EAAE,MAAM,UAAU,QAAQ,GAAG,MAAM,MAAM,IAAI,GAAG,IACzE,GACL;AACF;AAED,SAAgB,kBAAkBC,OAAc;CAC9C,IAAI,SAAS;AACb,MAAK,MAAM,SAAS,MAAM,QACxB,KAAI,MAAM,SAAS,aAAa;EAC9B,MAAM,OAAO,MAAM;EACnB,MAAM,aAAa,KAAK,SAAS,KAAK,OAAO;AAC7C,OAAK,WACH;AAEF,aAAW,sBAAwB,WAAW,KAAK,IACjD,WAAW,MACZ;AACD,OAAK,WAAW,eAAe,WAAW,WAAW,OACnD;AAEF,aAAW,2BAA6B,WAAW,WAAW,OAC3D,IAAI,CAAC,UAAU;GACd,MAAM,UAAU,MAAM,SAAS,UAC1B,EAAE,MAAM,QACN,OAAO,CAAC,CAAC,QAAQ,EAAE,KAAK,WAAW,MAAM,OAAO,CAChD,IAAI,CAAC,CAAC,GAAG,KAAK,MAAM,IAAI,KAAK,EAAE,CAC/B,KAAK,GAAG,CAAC,IACZ;AAEJ,WAAQ,EAAE,kBAAkB,OAAO,MAAM,SAAS,CAAC,EAAE,QAAQ;EAC9D,EAAC,CACD,KAAK,KAAK,CAAC;CACf;AAEH,QAAO;AACR"}
@@ -1,28 +0,0 @@
1
- //#region src/internal/formatting.ts
2
- function formatFrameHeader(frame, platform) {
3
- if (platform?.startsWith("javascript")) return `${[
4
- frame.filename,
5
- frame.lineNo,
6
- frame.colNo
7
- ].filter((i) => !!i).join(":")}${frame.function ? ` (${frame.function})` : ""}`;
8
- return `${frame.function ? `"${frame.function}"` : "unknown function"} in "${frame.filename || frame.module}"${frame.lineNo ? ` at line ${frame.lineNo}${frame.colNo !== null ? `:${frame.colNo}` : ""}` : ""}`;
9
- }
10
- function formatEventOutput(event) {
11
- let output = "";
12
- for (const entry of event.entries) if (entry.type === "exception") {
13
- const data = entry.data;
14
- const firstError = data.value ?? data.values[0];
15
- if (!firstError) continue;
16
- output += `**Error:**\n\`\`\`\n${firstError.type}: ${firstError.value}\n\`\`\`\n\n`;
17
- if (!firstError.stacktrace || !firstError.stacktrace.frames) continue;
18
- output += `**Stacktrace:**\n\`\`\`\n${firstError.stacktrace.frames.map((frame) => {
19
- const context = frame.context?.length ? `${frame.context.filter(([lineno, _]) => lineno === frame.lineNo).map(([_, code]) => `\n${code}`).join("")}` : "";
20
- return `${formatFrameHeader(frame, event.platform)}${context}`;
21
- }).join("\n")}\n\`\`\`\n\n`;
22
- }
23
- return output;
24
- }
25
-
26
- //#endregion
27
- export { formatEventOutput, formatFrameHeader };
28
- //# sourceMappingURL=formatting-Bacfde0I.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatting-Bacfde0I.js","names":["frame: z.infer<typeof FrameInterface>","platform: string | undefined | null","event: Event"],"sources":["../src/internal/formatting.ts"],"sourcesContent":["import type { z } from \"zod\";\nimport type { Event } from \"../api-client/types\";\nimport type { ErrorEntrySchema, FrameInterface } from \"../api-client\";\n\nexport function formatFrameHeader(\n frame: z.infer<typeof FrameInterface>,\n platform: string | undefined | null,\n) {\n if (platform?.startsWith(\"javascript\")) {\n return `${[frame.filename, frame.lineNo, frame.colNo]\n .filter((i) => !!i)\n .join(\":\")}${frame.function ? ` (${frame.function})` : \"\"}`;\n }\n return `${frame.function ? `\"${frame.function}\"` : \"unknown function\"} in \"${frame.filename || frame.module}\"${\n frame.lineNo\n ? ` at line ${frame.lineNo}${frame.colNo !== null ? `:${frame.colNo}` : \"\"}`\n : \"\"\n }`;\n}\n\nexport function formatEventOutput(event: Event) {\n let output = \"\";\n for (const entry of event.entries) {\n if (entry.type === \"exception\") {\n const data = entry.data as z.infer<typeof ErrorEntrySchema>;\n const firstError = data.value ?? data.values[0];\n if (!firstError) {\n continue;\n }\n output += `**Error:**\\n${\"```\"}\\n${firstError.type}: ${\n firstError.value\n }\\n${\"```\"}\\n\\n`;\n if (!firstError.stacktrace || !firstError.stacktrace.frames) {\n continue;\n }\n output += `**Stacktrace:**\\n${\"```\"}\\n${firstError.stacktrace.frames\n .map((frame) => {\n const context = frame.context?.length\n ? `${frame.context\n .filter(([lineno, _]) => lineno === frame.lineNo)\n .map(([_, code]) => `\\n${code}`)\n .join(\"\")}`\n : \"\";\n\n return `${formatFrameHeader(frame, event.platform)}${context}`;\n })\n .join(\"\\n\")}\\n${\"```\"}\\n\\n`;\n }\n }\n return output;\n}\n"],"mappings":";AAIA,SAAgB,kBACdA,OACAC,UACA;AACA,KAAI,UAAU,WAAW,aAAa,CACpC,SAAQ,EAAE;EAAC,MAAM;EAAU,MAAM;EAAQ,MAAM;CAAM,EAClD,OAAO,CAAC,QAAQ,EAAE,CAClB,KAAK,IAAI,CAAC,EAAE,MAAM,YAAY,IAAI,MAAM,SAAS,KAAK,GAAG;AAE9D,SAAQ,EAAE,MAAM,YAAY,GAAG,MAAM,SAAS,KAAK,mBAAmB,OAAO,MAAM,YAAY,MAAM,OAAO,GAC1G,MAAM,UACD,WAAW,MAAM,OAAO,EAAE,MAAM,UAAU,QAAQ,GAAG,MAAM,MAAM,IAAI,GAAG,IACzE,GACL;AACF;AAED,SAAgB,kBAAkBC,OAAc;CAC9C,IAAI,SAAS;AACb,MAAK,MAAM,SAAS,MAAM,QACxB,KAAI,MAAM,SAAS,aAAa;EAC9B,MAAM,OAAO,MAAM;EACnB,MAAM,aAAa,KAAK,SAAS,KAAK,OAAO;AAC7C,OAAK,WACH;AAEF,aAAW,sBAAwB,WAAW,KAAK,IACjD,WAAW,MACZ;AACD,OAAK,WAAW,eAAe,WAAW,WAAW,OACnD;AAEF,aAAW,2BAA6B,WAAW,WAAW,OAC3D,IAAI,CAAC,UAAU;GACd,MAAM,UAAU,MAAM,SAAS,UAC1B,EAAE,MAAM,QACN,OAAO,CAAC,CAAC,QAAQ,EAAE,KAAK,WAAW,MAAM,OAAO,CAChD,IAAI,CAAC,CAAC,GAAG,KAAK,MAAM,IAAI,KAAK,EAAE,CAC/B,KAAK,GAAG,CAAC,IACZ;AAEJ,WAAQ,EAAE,kBAAkB,OAAO,MAAM,SAAS,CAAC,EAAE,QAAQ;EAC9D,EAAC,CACD,KAAK,KAAK,CAAC;CACf;AAEH,QAAO;AACR"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"promptDefinitions.d-ByaZdRYv.d.cts","names":[],"sources":["../src/promptDefinitions.ts"],"sourcesContent":null,"mappings":";;;cAGa;;EAAA,WAAA,EAAA,MAAA;EAWZ,YAAA,EAAA;IAAA,gBAAA,EAAA,CAAA,CAAA,SAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"promptDefinitions.d-DyHOzL57.d.ts","names":[],"sources":["../src/promptDefinitions.ts"],"sourcesContent":null,"mappings":";;;cAGa;;EAAA,WAAA,EAAA,MAAA;EAWZ,YAAA,EAAA;IAAA,gBAAA,EAAA,CAAA,CAAA,SAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.d-DJThZSuo.d.cts","names":[],"sources":["../src/api-client/schema.ts"],"sourcesContent":null,"mappings":";;;cAEa,gBAAc,CAAA,CAAA;UAIX,CAAA,CAAA;AAJhB,CAAA,EAAA,aAAa,cAIG,oBAAA,CAAA;EAAA,MAAA,aAAA;CAAA,c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: unknown","ApiError","RESOURCES","PROMPT_DEFINITIONS","PROMPT_HANDLERS","TOOL_DEFINITIONS","TOOL_HANDLERS"],"sources":["../src/server.ts"],"sourcesContent":["import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { TOOL_HANDLERS } from \"./tools\";\nimport { TOOL_DEFINITIONS } from \"./toolDefinitions\";\nimport type { ServerContext } from \"./types\";\nimport { setUser, startNewTrace, startSpan } from \"@sentry/core\";\nimport { logError } from \"./logging\";\nimport { RESOURCES } from \"./resources\";\nimport { PROMPT_DEFINITIONS } from \"./promptDefinitions\";\nimport { PROMPT_HANDLERS } from \"./prompts\";\nimport { ApiError } from \"./api-client\";\n\nfunction isApiError(error: unknown) {\n return error instanceof ApiError || Object.hasOwn(error as any, \"status\");\n}\n\nasync function logAndFormatError(error: unknown) {\n const eventId = logError(error);\n\n if (isApiError(error)) {\n const typedError = error as ApiError;\n return [\n \"**Error**\",\n `There was a ${typedError.status} error with the your request to the Sentry API.`,\n `${typedError.message}`,\n \"If you believe this was a genuine error, please report the following to the user for the Sentry team:\",\n `**Event ID**: ${eventId}`,\n ].join(\"\\n\\n\");\n }\n\n return [\n \"**Error**\",\n \"It looks like there was a problem communicating with the Sentry API.\",\n \"Please report the following to the user for the Sentry team:\",\n `**Event ID**: ${eventId}`,\n process.env.NODE_ENV !== \"production\"\n ? error instanceof Error\n ? error.message\n : String(error)\n : \"\",\n ].join(\"\\n\\n\");\n}\n\nexport async function configureServer({\n server,\n context,\n onToolComplete,\n}: { server: McpServer; context: ServerContext; onToolComplete?: () => void }) {\n server.server.onerror = (error) => {\n logError(error);\n };\n\n for (const resource of RESOURCES) {\n server.resource(\n resource.name,\n resource.uri,\n {\n description: resource.description,\n mimeType: resource.mimeType,\n },\n // TODO: this doesnt support any error handling afaict via the spec\n async (url) => {\n return await startNewTrace(async () => {\n return await startSpan(\n { name: `mcp.resource/${resource.name}` },\n async () => {\n if (context.userId) {\n setUser({\n id: context.userId,\n });\n }\n\n return resource.handler(url);\n },\n );\n });\n },\n );\n }\n\n for (const prompt of PROMPT_DEFINITIONS) {\n const handler = PROMPT_HANDLERS[prompt.name];\n\n server.prompt(\n prompt.name,\n prompt.description,\n prompt.paramsSchema,\n async (...args) => {\n try {\n return await startNewTrace(async () => {\n return await startSpan(\n { name: `mcp.prompt/${prompt.name}` },\n async () => {\n if (context.userId) {\n setUser({\n id: context.userId,\n });\n }\n\n // TODO(dcramer): I'm too dumb to figure this out\n // @ts-ignore\n return await handler(...args);\n },\n );\n });\n } finally {\n onToolComplete?.();\n }\n },\n );\n }\n\n for (const tool of TOOL_DEFINITIONS) {\n const handler = TOOL_HANDLERS[tool.name];\n\n server.tool(\n tool.name as string,\n tool.description,\n tool.paramsSchema ? tool.paramsSchema : {},\n async (...args) => {\n try {\n return await startNewTrace(async () => {\n return await startSpan(\n { name: `mcp.tool/${tool.name}` },\n async () => {\n if (context.userId) {\n setUser({\n id: context.userId,\n });\n }\n\n try {\n // TODO(dcramer): I'm too dumb to figure this out\n // @ts-ignore\n const output = await handler(context, ...args);\n\n return {\n content: [\n {\n type: \"text\",\n text: output,\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: \"text\",\n text: await logAndFormatError(error),\n },\n ],\n isError: true,\n };\n }\n },\n );\n });\n } finally {\n onToolComplete?.();\n }\n },\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;AAWA,SAAS,WAAWA,OAAgB;AAClC,QAAO,iBAAiBC,2BAAY,OAAO,OAAO,OAAc,SAAS;AAC1E;AAED,eAAe,kBAAkBD,OAAgB;CAC/C,MAAM,UAAU,yBAAS,MAAM;AAE/B,KAAI,WAAW,MAAM,EAAE;EACrB,MAAM,aAAa;AACnB,SAAO;GACL;IACC,cAAc,WAAW,OAAO;IAChC,EAAE,WAAW,QAAQ;GACtB;IACC,gBAAgB,QAAQ;EAC1B,EAAC,KAAK,OAAO;CACf;AAED,QAAO;EACL;EACA;EACA;GACC,gBAAgB,QAAQ;EACzB,QAAQ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GACjC,YAAY;AACV,UAAI,QAAQ,OACV,4BAAQ,EACN,IAAI,QAAQ,OACb,EAAC;AAGJ,UAAI;OAGF,MAAM,SAAS,MAAM,QAAQ,SAAS,GAAG,KAAK;AAE9C,cAAO,EACL,SAAS,CACP;QACE,MAAM;QACN,MAAM;OACP,CACF,EACF;MACF,SAAQ,OAAO;AACd,cAAO;QACL,SAAS,CACP;SACE,MAAM;SACN,MAAM,MAAM,kBAAkB,MAAM;QACrC,CACF;QACD,SAAS;OACV;MACF;KACF,EACF;IACF,EAAC;GACH,UAAS;AACR,sBAAkB;GACnB;EACF,EACF;CACF;AACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"server-oefnmsHZ.js","names":["error: unknown"],"sources":["../src/server.ts"],"sourcesContent":["import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { TOOL_HANDLERS } from \"./tools\";\nimport { TOOL_DEFINITIONS } from \"./toolDefinitions\";\nimport type { ServerContext } from \"./types\";\nimport { setUser, startNewTrace, startSpan } from \"@sentry/core\";\nimport { logError } from \"./logging\";\nimport { RESOURCES } from \"./resources\";\nimport { PROMPT_DEFINITIONS } from \"./promptDefinitions\";\nimport { PROMPT_HANDLERS } from \"./prompts\";\nimport { ApiError } from \"./api-client\";\n\nfunction isApiError(error: unknown) {\n return error instanceof ApiError || Object.hasOwn(error as any, \"status\");\n}\n\nasync function logAndFormatError(error: unknown) {\n const eventId = logError(error);\n\n if (isApiError(error)) {\n const typedError = error as ApiError;\n return [\n \"**Error**\",\n `There was a ${typedError.status} error with the your request to the Sentry API.`,\n `${typedError.message}`,\n \"If you believe this was a genuine error, please report the following to the user for the Sentry team:\",\n `**Event ID**: ${eventId}`,\n ].join(\"\\n\\n\");\n }\n\n return [\n \"**Error**\",\n \"It looks like there was a problem communicating with the Sentry API.\",\n \"Please report the following to the user for the Sentry team:\",\n `**Event ID**: ${eventId}`,\n process.env.NODE_ENV !== \"production\"\n ? error instanceof Error\n ? error.message\n : String(error)\n : \"\",\n ].join(\"\\n\\n\");\n}\n\nexport async function configureServer({\n server,\n context,\n onToolComplete,\n}: { server: McpServer; context: ServerContext; onToolComplete?: () => void }) {\n server.server.onerror = (error) => {\n logError(error);\n };\n\n for (const resource of RESOURCES) {\n server.resource(\n resource.name,\n resource.uri,\n {\n description: resource.description,\n mimeType: resource.mimeType,\n },\n // TODO: this doesnt support any error handling afaict via the spec\n async (url) => {\n return await startNewTrace(async () => {\n return await startSpan(\n { name: `mcp.resource/${resource.name}` },\n async () => {\n if (context.userId) {\n setUser({\n id: context.userId,\n });\n }\n\n return resource.handler(url);\n },\n );\n });\n },\n );\n }\n\n for (const prompt of PROMPT_DEFINITIONS) {\n const handler = PROMPT_HANDLERS[prompt.name];\n\n server.prompt(\n prompt.name,\n prompt.description,\n prompt.paramsSchema,\n async (...args) => {\n try {\n return await startNewTrace(async () => {\n return await startSpan(\n { name: `mcp.prompt/${prompt.name}` },\n async () => {\n if (context.userId) {\n setUser({\n id: context.userId,\n });\n }\n\n // TODO(dcramer): I'm too dumb to figure this out\n // @ts-ignore\n return await handler(...args);\n },\n );\n });\n } finally {\n onToolComplete?.();\n }\n },\n );\n }\n\n for (const tool of TOOL_DEFINITIONS) {\n const handler = TOOL_HANDLERS[tool.name];\n\n server.tool(\n tool.name as string,\n tool.description,\n tool.paramsSchema ? tool.paramsSchema : {},\n async (...args) => {\n try {\n return await startNewTrace(async () => {\n return await startSpan(\n { name: `mcp.tool/${tool.name}` },\n async () => {\n if (context.userId) {\n setUser({\n id: context.userId,\n });\n }\n\n try {\n // TODO(dcramer): I'm too dumb to figure this out\n // @ts-ignore\n const output = await handler(context, ...args);\n\n return {\n content: [\n {\n type: \"text\",\n text: output,\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: \"text\",\n text: await logAndFormatError(error),\n },\n ],\n isError: true,\n };\n }\n },\n );\n });\n } finally {\n onToolComplete?.();\n }\n },\n );\n }\n}\n"],"mappings":";;;;;;;;;;AAWA,SAAS,W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,GAAG,KAAK;KAC9B,EACF;IACF,EAAC;GACH,UAAS;AACR,sBAAkB;GACnB;EACF,EACF;CACF;AAED,MAAK,MAAM,QAAQ,kBAAkB;EACnC,MAAM,UAAU,cAAc,KAAK;AAEnC,SAAO,KACL,KAAK,MACL,KAAK,aACL,KAAK,eAAe,KAAK,eAAe,CAAE,GAC1C,OAAO,GAAG,SAAS;AACjB,OAAI;AACF,WAAO,MAAM,cAAc,YAAY;AACrC,YAAO,MAAM,UACX,EAAE,OAAO,WAAW,KAAK,KAAK,EAAG,GACjC,YAAY;AACV,UAAI,QAAQ,OACV,SAAQ,EACN,IAAI,QAAQ,OACb,EAAC;AAGJ,UAAI;OAGF,MAAM,SAAS,MAAM,QAAQ,SAAS,GAAG,KAAK;AAE9C,cAAO,EACL,SAAS,CACP;QACE,MAAM;QACN,MAAM;OACP,CACF,EACF;MACF,SAAQ,OAAO;AACd,cAAO;QACL,SAAS,CACP;SACE,MAAM;SACN,MAAM,MAAM,kBAAkB,MAAM;QACrC,CACF;QACD,SAAS;OACV;MACF;KACF,EACF;IACF,EAAC;GACH,UAAS;AACR,sBAAkB;GACnB;EACF,EACF;CACF;AACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"toolDefinitions-C0t6Y5Su.cjs","names":[],"sources":["../src/toolDefinitions.ts"],"sourcesContent":["// TODO: this gets imported by the client code and thus is separated from server code\n// to avoid bundling issues. We'd like to find a better solution that isnt so brittle and keeps this code co-located w/ its tool calls.\nimport {\n ParamOrganizationSlug,\n ParamIssueShortId,\n ParamTeamSlug,\n ParamPlatform,\n ParamProjectSlug,\n ParamQuery,\n ParamTransaction,\n ParamRegionUrl,\n} from \"./schema\";\nimport { z } from \"zod\";\n\nexport const TOOL_DEFINITIONS = [\n {\n name: \"list_organizations\" as const,\n description: [\n \"List all organizations that the user has access to in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View all organizations in Sentry\",\n \"- Find an organization's slug to aid other tool requests\",\n ].join(\"\\n\"),\n },\n {\n name: \"list_teams\" as const,\n description: [\n \"List all teams in an organization in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View all teams in a Sentry organization\",\n \"- Find an team's slug to aid other tool requests\",\n \"\",\n \"<hints>\",\n \"- If you're uncertain about which organization to query, you should call `list_organizations()` first.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n },\n },\n {\n name: \"list_projects\" as const,\n description: [\n \"Retrieve a list of projects in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View all projects in a Sentry organization\",\n \"- Find an project's slug to aid other tool requests\",\n \"\",\n \"<hints>\",\n \"- If you're uncertain about which organization to query, you should call `list_organizations()` first.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n },\n },\n {\n name: \"list_issues\" as const,\n description: [\n \"List all issues in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View all issues in a Sentry organization\",\n \"\",\n \"If you're looking for more granular data beyond a summary of identified problems, you should use the `search_errors()` or `search_transactions()` tools instead.\",\n \"\",\n \"<examples>\",\n \"### Find the newest unresolved issues across 'my-organization'\",\n \"\",\n \"```\",\n \"list_issues(organizationSlug='my-organization', query='is:unresolved', sortBy='last_seen')\",\n \"```\",\n \"\",\n \"### Find the most frequently occurring crashes in the 'my-project' project\",\n \"\",\n \"```\",\n \"list_issues(organizationSlug='my-organization', projectSlug='my-project', query='is:unresolved error.handled:false', sortBy='count')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- If only one parameter is provided, and it could be either `organizationSlug` or `projectSlug`, its probably `organizationSlug`, but if you're really uncertain you should call `list_organizations()` first.\",\n \"- You can use the `list_tags()` tool to see what user-defined tags are available.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlug.optional(),\n query: ParamQuery.optional(),\n sortBy: z\n .enum([\"last_seen\", \"first_seen\", \"count\", \"userCount\"])\n .describe(\n \"Sort the results either by the last time they occurred, the first time they occurred, the count of occurrences, or the number of users affected.\",\n )\n .optional(),\n },\n },\n {\n name: \"list_releases\" as const,\n description: [\n \"List all releases in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Find recent releases in a Sentry organization\",\n \"- Find the most recent version released of a specific project\",\n \"- Determine when a release was deployed to an environment\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- If only one parameter is provided, and it could be either `organizationSlug` or `projectSlug`, its probably `organizationSlug`, but if you're really uncertain you should call `list_organizations()` first.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlug.optional(),\n },\n },\n {\n name: \"list_tags\" as const,\n description: [\n \"List all tags in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Find tags available to use in searches\",\n \"\",\n \"<hints>\",\n \"- If you're uncertain about which organization to query, you should call `list_organizations()` first.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n },\n },\n {\n name: \"get_issue_summary\" as const,\n description: [\n \"Retrieve a summary of an issue in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View a summary of an issue in Sentry\",\n \"\",\n \"If the issue is an error, or you want additional information like the stacktrace, you should use `get_issue_details()` tool instead.\",\n \"\",\n \"<hints>\",\n \"- If the user provides the issueUrl, you can ignore the organizationSlug and issueId parameters.\",\n \"- If you're uncertain about which organization to query, you should call `list_organizations()` first. This especially important if an issueId is passed.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: z\n .string()\n .url()\n .describe(\"The URL of the issue to retrieve details for.\")\n .optional(),\n },\n },\n {\n name: \"get_issue_details\" as const,\n description: [\n \"Retrieve issue details from Sentry for a specific Issue ID, including the stacktrace and error message if available. Either issueId or issueUrl MUST be provided.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Investigate a specific production error\",\n \"- Access detailed error information and stacktraces from Sentry\",\n \"\",\n \"<hints>\",\n \"- If the user provides the issueUrl, you can ignore the organizationSlug and issueId parameters.\",\n \"- If you're uncertain about which organization to query, you should call `list_organizations()` first. This especially important if an issueId is passed.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: z\n .string()\n .url()\n .describe(\"The URL of the issue to retrieve details for.\")\n .optional(),\n },\n },\n {\n name: \"search_errors\" as const,\n description: [\n \"Query Sentry for errors using advanced search syntax.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Search for production errors in a specific file.\",\n \"- Analyze error patterns and frequencies.\",\n \"- Find recent or frequently occurring errors.\",\n \"\",\n \"<examples>\",\n \"### Find common errors within a file\",\n \"\",\n \"To find common errors within a file, you can use the `filename` parameter. This is a suffix based search, so only using the filename or the direct parent folder of the file. The parent folder is preferred when the filename is in a subfolder or a common filename. If you provide generic filenames like `index.js` you're going to end up finding errors that are might be from completely different projects.\",\n \"\",\n \"```\",\n \"search_errors(organizationSlug='my-organization', filename='index.js', sortBy='count')\",\n \"```\",\n \"\",\n \"### Find recent crashes from the 'peated' project\",\n \"\",\n \"```\",\n \"search_errors(organizationSlug='my-organization', query='is:unresolved error.handled:false', projectSlug='peated', sortBy='last_seen')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- If only one parameter is provided, and it could be either `organizationSlug` or `projectSlug`, its probably `organizationSlug`, but if you're really uncertain you should call `list_organizations()` first.\",\n \"- If you are looking for issues, in a way that you might be looking for something like 'unresolved errors', you should use the `list_issues()` tool\",\n \"- You can use the `list_tags()` tool to see what user-defined tags are available.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlug.optional(),\n filename: z\n .string()\n .describe(\"The filename to search for errors in.\")\n .optional(),\n transaction: ParamTransaction.optional(),\n query: ParamQuery.optional(),\n sortBy: z\n .enum([\"last_seen\", \"count\"])\n .optional()\n .default(\"last_seen\")\n .describe(\n \"Sort the results either by the last time they occurred or the count of occurrences.\",\n ),\n },\n },\n {\n name: \"search_transactions\" as const,\n description: [\n \"Query Sentry for transactions using advanced search syntax.\",\n \"\",\n \"Transactions are segments of traces that are associated with a specific route or endpoint.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Search for production transaction data to understand performance.\",\n \"- Analyze traces and latency patterns.\",\n \"- Find examples of recent requests to endpoints.\",\n \"\",\n \"<examples>\",\n \"### Find slow requests to a route\",\n \"\",\n \"...\",\n \"\",\n \"```\",\n \"search_transactions(organizationSlug='my-organization', transaction='/checkout', sortBy='latency')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- If only one parameter is provided, and it could be either `organizationSlug` or `projectSlug`, its probably `organizationSlug`, but if you're really uncertain you might want to call `list_organizations()` first.\",\n \"- You can use the `list_tags()` tool to see what user-defined tags are available.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlug.optional(),\n transaction: ParamTransaction.optional(),\n query: ParamQuery.optional(),\n sortBy: z\n .enum([\"timestamp\", \"duration\"])\n .optional()\n .default(\"timestamp\")\n .describe(\n \"Sort the results either by the timestamp of the request (most recent first) or the duration of the request (longest first).\",\n ),\n },\n },\n {\n name: \"create_team\" as const,\n description: [\n \"Create a new team in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Create a new team in a Sentry organization\",\n \"\",\n \"<hints>\",\n \"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n name: z.string().describe(\"The name of the team to create.\"),\n },\n },\n {\n name: \"create_project\" as const,\n description: [\n \"Create a new project in Sentry, giving you access to a new SENTRY_DSN.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Create a new project in a Sentry organization\",\n \"\",\n \"<examples>\",\n \"### Create a new javascript project in the 'my-organization' organization\",\n \"\",\n \"```\",\n \"create_project(organizationSlug='my-organization', teamSlug='my-team', name='my-project', platform='javascript')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<teamSlug>.\",\n \"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n teamSlug: z.string().describe(\"The team's slug.\"),\n name: z\n .string()\n .describe(\n \"The name of the project to create. Typically this is commonly the name of the repository or service. It is only used as a visual label in Sentry.\",\n ),\n platform: ParamPlatform.optional(),\n },\n },\n {\n name: \"create_dsn\" as const,\n description: [\n \"Create a new Sentry DSN for a specific project.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Create a new DSN for a specific project\",\n \"\",\n \"<examples>\",\n \"### Create a new DSN for the 'my-project' project\",\n \"\",\n \"```\",\n \"create_dsn(organizationSlug='my-organization', projectSlug='my-project', name='Default')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: z.string().describe(\"The project's slug.\"),\n name: z.string().describe(\"The name of the DSN to create.\"),\n },\n },\n {\n name: \"list_dsns\" as const,\n description: [\n \"List all Sentry DSNs for a specific project.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Retrieve a SENTRY_DSN for a specific project\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- If only one parameter is provided, and it could be either `organizationSlug` or `projectSlug`, its probably `organizationSlug`, but if you're really uncertain you might want to call `list_organizations()` first.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: z.string().describe(\"The project's slug.\"),\n },\n },\n {\n name: \"begin_autofix\" as const,\n description: [\n \"Analyze an issue in Sentry, identify a root cause, and suggest a fix for it.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Determine the root cause of an issue.\",\n \"- Generate a plan for fixing an issue.\",\n \"- Implement a fix for an issue.\",\n \"\",\n \"This operation may take some time, so you should call `get_autofix_status()` to check the status of the analysis after you begin it.\",\n \"\",\n \"<examples>\",\n \"### Analyze and propose a fix for 'ISSUE-123' in Sentry\",\n \"\",\n \"```\",\n \"begin_autofix(organizationSlug='my-organization', issueId='ISSUE-123')\",\n \"```\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- Always check to see if an autofix is in progress for before calling this tool by using `get_autofix_status()`.\",\n \"- If the user provides the issueUrl, you can ignore the organizationSlug and issueId parameters.\",\n \"- If you're uncertain about which organization to query, you should call `list_organizations()` first. This especially important if an issueId is passed.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: z\n .string()\n .url()\n .describe(\"The URL of the issue to retrieve details for.\")\n .optional(),\n },\n },\n {\n name: \"get_autofix_status\" as const,\n description: [\n \"Get the status of a root cause analysis for an issue in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Get the root cause analysis for an issue.\",\n \"- Get the status of a fix for an issue.\",\n \"\",\n \"<examples>\",\n \"### Get the status of a fix for the 'ISSUE-123' issue\",\n \"\",\n \"```\",\n \"get_autofix_status(organizationSlug='my-organization', issueId='ISSUE-123')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user provides the issueUrl, you can ignore the organizationSlug and issueId parameters.\",\n \"- If you're uncertain about which organization to query, you should call `list_organizations()` first. This especially important if an issueId is passed.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: z\n .string()\n .url()\n .describe(\"The URL of the issue to retrieve details for.\")\n .optional(),\n },\n },\n];\n"],"mappings":";;;;;;AAcA,MAAa,mBAAmB;CAC9B;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;CACb;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,qCAAsB,UAAU;GAClD,WAAW,8BAAe,UAAU;EACrC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,qCAAsB,UAAU;GAClD,WAAW,8BAAe,UAAU;EACrC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,qCAAsB,UAAU;GAClD,WAAW,8BAAe,UAAU;GACpC,aAAa,gCAAiB,UAAU;GACxC,OAAO,0BAAW,UAAU;GAC5B,QAAQ,MACL,KAAK;IAAC;IAAa;IAAc;IAAS;GAAY,EAAC,CACvD,SACC,mJACD,CACA,UAAU;EACd;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,qCAAsB,UAAU;GAClD,WAAW,8BAAe,UAAU;GACpC,aAAa,gCAAiB,UAAU;EACzC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,qCAAsB,UAAU;GAClD,WAAW,8BAAe,UAAU;EACrC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,qCAAsB,UAAU;GAClD,WAAW,8BAAe,UAAU;GACpC,SAAS,iCAAkB,UAAU;GACrC,UAAU,MACP,QAAQ,CACR,KAAK,CACL,SAAS,gDAAgD,CACzD,UAAU;EACd;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,qCAAsB,UAAU;GAClD,WAAW,8BAAe,UAAU;GACpC,SAAS,iCAAkB,UAAU;GACrC,UAAU,MACP,QAAQ,CACR,KAAK,CACL,SAAS,gDAAgD,CACzD,UAAU;EACd;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,qCAAsB,UAAU;GAClD,WAAW,8BAAe,UAAU;GACpC,aAAa,gCAAiB,UAAU;GACxC,UAAU,MACP,QAAQ,CACR,SAAS,wCAAwC,CACjD,UAAU;GACb,aAAa,gCAAiB,UAAU;GACxC,OAAO,0BAAW,UAAU;GAC5B,QAAQ,MACL,KAAK,CAAC,aAAa,OAAQ,EAAC,CAC5B,UAAU,CACV,QAAQ,YAAY,CACpB,SACC,sFACD;EACJ;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,qCAAsB,UAAU;GAClD,WAAW,8BAAe,UAAU;GACpC,aAAa,gCAAiB,UAAU;GACxC,aAAa,gCAAiB,UAAU;GACxC,OAAO,0BAAW,UAAU;GAC5B,QAAQ,MACL,KAAK,CAAC,aAAa,UAAW,EAAC,CAC/B,UAAU,CACV,QAAQ,YAAY,CACpB,SACC,8HACD;EACJ;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,qCAAsB,UAAU;GAClD,WAAW,8BAAe,UAAU;GACpC,MAAM,MAAE,QAAQ,CAAC,SAAS,kCAAkC;EAC7D;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,qCAAsB,UAAU;GAClD,WAAW,8BAAe,UAAU;GACpC,UAAU,MAAE,QAAQ,CAAC,SAAS,mBAAmB;GACjD,MAAM,MACH,QAAQ,CACR,SACC,oJACD;GACH,UAAU,6BAAc,UAAU;EACnC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,qCAAsB,UAAU;GAClD,WAAW,8BAAe,UAAU;GACpC,aAAa,MAAE,QAAQ,CAAC,SAAS,sBAAsB;GACvD,MAAM,MAAE,QAAQ,CAAC,SAAS,iCAAiC;EAC5D;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,qCAAsB,UAAU;GAClD,WAAW,8BAAe,UAAU;GACpC,aAAa,MAAE,QAAQ,CAAC,SAAS,sBAAsB;EACxD;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,qCAAsB,UAAU;GAClD,WAAW,8BAAe,UAAU;GACpC,SAAS,iCAAkB,UAAU;GACrC,UAAU,MACP,QAAQ,CACR,KAAK,CACL,SAAS,gDAAgD,CACzD,UAAU;EACd;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,qCAAsB,UAAU;GAClD,WAAW,8BAAe,UAAU;GACpC,SAAS,iCAAkB,UAAU;GACrC,UAAU,MACP,QAAQ,CACR,KAAK,CACL,SAAS,gDAAgD,CACzD,UAAU;EACd;CACF;AACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"toolDefinitions-DB4pPvgy.js","names":[],"sources":["../src/toolDefinitions.ts"],"sourcesContent":["// TODO: this gets imported by the client code and thus is separated from server code\n// to avoid bundling issues. We'd like to find a better solution that isnt so brittle and keeps this code co-located w/ its tool calls.\nimport {\n ParamOrganizationSlug,\n ParamIssueShortId,\n ParamTeamSlug,\n ParamPlatform,\n ParamProjectSlug,\n ParamQuery,\n ParamTransaction,\n ParamRegionUrl,\n} from \"./schema\";\nimport { z } from \"zod\";\n\nexport const TOOL_DEFINITIONS = [\n {\n name: \"list_organizations\" as const,\n description: [\n \"List all organizations that the user has access to in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View all organizations in Sentry\",\n \"- Find an organization's slug to aid other tool requests\",\n ].join(\"\\n\"),\n },\n {\n name: \"list_teams\" as const,\n description: [\n \"List all teams in an organization in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View all teams in a Sentry organization\",\n \"- Find an team's slug to aid other tool requests\",\n \"\",\n \"<hints>\",\n \"- If you're uncertain about which organization to query, you should call `list_organizations()` first.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n },\n },\n {\n name: \"list_projects\" as const,\n description: [\n \"Retrieve a list of projects in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View all projects in a Sentry organization\",\n \"- Find an project's slug to aid other tool requests\",\n \"\",\n \"<hints>\",\n \"- If you're uncertain about which organization to query, you should call `list_organizations()` first.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n },\n },\n {\n name: \"list_issues\" as const,\n description: [\n \"List all issues in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View all issues in a Sentry organization\",\n \"\",\n \"If you're looking for more granular data beyond a summary of identified problems, you should use the `search_errors()` or `search_transactions()` tools instead.\",\n \"\",\n \"<examples>\",\n \"### Find the newest unresolved issues across 'my-organization'\",\n \"\",\n \"```\",\n \"list_issues(organizationSlug='my-organization', query='is:unresolved', sortBy='last_seen')\",\n \"```\",\n \"\",\n \"### Find the most frequently occurring crashes in the 'my-project' project\",\n \"\",\n \"```\",\n \"list_issues(organizationSlug='my-organization', projectSlug='my-project', query='is:unresolved error.handled:false', sortBy='count')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- If only one parameter is provided, and it could be either `organizationSlug` or `projectSlug`, its probably `organizationSlug`, but if you're really uncertain you should call `list_organizations()` first.\",\n \"- You can use the `list_tags()` tool to see what user-defined tags are available.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlug.optional(),\n query: ParamQuery.optional(),\n sortBy: z\n .enum([\"last_seen\", \"first_seen\", \"count\", \"userCount\"])\n .describe(\n \"Sort the results either by the last time they occurred, the first time they occurred, the count of occurrences, or the number of users affected.\",\n )\n .optional(),\n },\n },\n {\n name: \"list_releases\" as const,\n description: [\n \"List all releases in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Find recent releases in a Sentry organization\",\n \"- Find the most recent version released of a specific project\",\n \"- Determine when a release was deployed to an environment\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- If only one parameter is provided, and it could be either `organizationSlug` or `projectSlug`, its probably `organizationSlug`, but if you're really uncertain you should call `list_organizations()` first.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlug.optional(),\n },\n },\n {\n name: \"list_tags\" as const,\n description: [\n \"List all tags in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Find tags available to use in searches\",\n \"\",\n \"<hints>\",\n \"- If you're uncertain about which organization to query, you should call `list_organizations()` first.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n },\n },\n {\n name: \"get_issue_summary\" as const,\n description: [\n \"Retrieve a summary of an issue in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View a summary of an issue in Sentry\",\n \"\",\n \"If the issue is an error, or you want additional information like the stacktrace, you should use `get_issue_details()` tool instead.\",\n \"\",\n \"<hints>\",\n \"- If the user provides the issueUrl, you can ignore the organizationSlug and issueId parameters.\",\n \"- If you're uncertain about which organization to query, you should call `list_organizations()` first. This especially important if an issueId is passed.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: z\n .string()\n .url()\n .describe(\"The URL of the issue to retrieve details for.\")\n .optional(),\n },\n },\n {\n name: \"get_issue_details\" as const,\n description: [\n \"Retrieve issue details from Sentry for a specific Issue ID, including the stacktrace and error message if available. Either issueId or issueUrl MUST be provided.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Investigate a specific production error\",\n \"- Access detailed error information and stacktraces from Sentry\",\n \"\",\n \"<hints>\",\n \"- If the user provides the issueUrl, you can ignore the organizationSlug and issueId parameters.\",\n \"- If you're uncertain about which organization to query, you should call `list_organizations()` first. This especially important if an issueId is passed.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: z\n .string()\n .url()\n .describe(\"The URL of the issue to retrieve details for.\")\n .optional(),\n },\n },\n {\n name: \"search_errors\" as const,\n description: [\n \"Query Sentry for errors using advanced search syntax.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Search for production errors in a specific file.\",\n \"- Analyze error patterns and frequencies.\",\n \"- Find recent or frequently occurring errors.\",\n \"\",\n \"<examples>\",\n \"### Find common errors within a file\",\n \"\",\n \"To find common errors within a file, you can use the `filename` parameter. This is a suffix based search, so only using the filename or the direct parent folder of the file. The parent folder is preferred when the filename is in a subfolder or a common filename. If you provide generic filenames like `index.js` you're going to end up finding errors that are might be from completely different projects.\",\n \"\",\n \"```\",\n \"search_errors(organizationSlug='my-organization', filename='index.js', sortBy='count')\",\n \"```\",\n \"\",\n \"### Find recent crashes from the 'peated' project\",\n \"\",\n \"```\",\n \"search_errors(organizationSlug='my-organization', query='is:unresolved error.handled:false', projectSlug='peated', sortBy='last_seen')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- If only one parameter is provided, and it could be either `organizationSlug` or `projectSlug`, its probably `organizationSlug`, but if you're really uncertain you should call `list_organizations()` first.\",\n \"- If you are looking for issues, in a way that you might be looking for something like 'unresolved errors', you should use the `list_issues()` tool\",\n \"- You can use the `list_tags()` tool to see what user-defined tags are available.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlug.optional(),\n filename: z\n .string()\n .describe(\"The filename to search for errors in.\")\n .optional(),\n transaction: ParamTransaction.optional(),\n query: ParamQuery.optional(),\n sortBy: z\n .enum([\"last_seen\", \"count\"])\n .optional()\n .default(\"last_seen\")\n .describe(\n \"Sort the results either by the last time they occurred or the count of occurrences.\",\n ),\n },\n },\n {\n name: \"search_transactions\" as const,\n description: [\n \"Query Sentry for transactions using advanced search syntax.\",\n \"\",\n \"Transactions are segments of traces that are associated with a specific route or endpoint.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Search for production transaction data to understand performance.\",\n \"- Analyze traces and latency patterns.\",\n \"- Find examples of recent requests to endpoints.\",\n \"\",\n \"<examples>\",\n \"### Find slow requests to a route\",\n \"\",\n \"...\",\n \"\",\n \"```\",\n \"search_transactions(organizationSlug='my-organization', transaction='/checkout', sortBy='latency')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- If only one parameter is provided, and it could be either `organizationSlug` or `projectSlug`, its probably `organizationSlug`, but if you're really uncertain you might want to call `list_organizations()` first.\",\n \"- You can use the `list_tags()` tool to see what user-defined tags are available.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlug.optional(),\n transaction: ParamTransaction.optional(),\n query: ParamQuery.optional(),\n sortBy: z\n .enum([\"timestamp\", \"duration\"])\n .optional()\n .default(\"timestamp\")\n .describe(\n \"Sort the results either by the timestamp of the request (most recent first) or the duration of the request (longest first).\",\n ),\n },\n },\n {\n name: \"create_team\" as const,\n description: [\n \"Create a new team in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Create a new team in a Sentry organization\",\n \"\",\n \"<hints>\",\n \"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n name: z.string().describe(\"The name of the team to create.\"),\n },\n },\n {\n name: \"create_project\" as const,\n description: [\n \"Create a new project in Sentry, giving you access to a new SENTRY_DSN.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Create a new project in a Sentry organization\",\n \"\",\n \"<examples>\",\n \"### Create a new javascript project in the 'my-organization' organization\",\n \"\",\n \"```\",\n \"create_project(organizationSlug='my-organization', teamSlug='my-team', name='my-project', platform='javascript')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<teamSlug>.\",\n \"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n teamSlug: z.string().describe(\"The team's slug.\"),\n name: z\n .string()\n .describe(\n \"The name of the project to create. Typically this is commonly the name of the repository or service. It is only used as a visual label in Sentry.\",\n ),\n platform: ParamPlatform.optional(),\n },\n },\n {\n name: \"create_dsn\" as const,\n description: [\n \"Create a new Sentry DSN for a specific project.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Create a new DSN for a specific project\",\n \"\",\n \"<examples>\",\n \"### Create a new DSN for the 'my-project' project\",\n \"\",\n \"```\",\n \"create_dsn(organizationSlug='my-organization', projectSlug='my-project', name='Default')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: z.string().describe(\"The project's slug.\"),\n name: z.string().describe(\"The name of the DSN to create.\"),\n },\n },\n {\n name: \"list_dsns\" as const,\n description: [\n \"List all Sentry DSNs for a specific project.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Retrieve a SENTRY_DSN for a specific project\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- If only one parameter is provided, and it could be either `organizationSlug` or `projectSlug`, its probably `organizationSlug`, but if you're really uncertain you might want to call `list_organizations()` first.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: z.string().describe(\"The project's slug.\"),\n },\n },\n {\n name: \"begin_autofix\" as const,\n description: [\n \"Analyze an issue in Sentry, identify a root cause, and suggest a fix for it.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Determine the root cause of an issue.\",\n \"- Generate a plan for fixing an issue.\",\n \"- Implement a fix for an issue.\",\n \"\",\n \"This operation may take some time, so you should call `get_autofix_status()` to check the status of the analysis after you begin it.\",\n \"\",\n \"<examples>\",\n \"### Analyze and propose a fix for 'ISSUE-123' in Sentry\",\n \"\",\n \"```\",\n \"begin_autofix(organizationSlug='my-organization', issueId='ISSUE-123')\",\n \"```\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- Always check to see if an autofix is in progress for before calling this tool by using `get_autofix_status()`.\",\n \"- If the user provides the issueUrl, you can ignore the organizationSlug and issueId parameters.\",\n \"- If you're uncertain about which organization to query, you should call `list_organizations()` first. This especially important if an issueId is passed.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: z\n .string()\n .url()\n .describe(\"The URL of the issue to retrieve details for.\")\n .optional(),\n },\n },\n {\n name: \"get_autofix_status\" as const,\n description: [\n \"Get the status of a root cause analysis for an issue in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Get the root cause analysis for an issue.\",\n \"- Get the status of a fix for an issue.\",\n \"\",\n \"<examples>\",\n \"### Get the status of a fix for the 'ISSUE-123' issue\",\n \"\",\n \"```\",\n \"get_autofix_status(organizationSlug='my-organization', issueId='ISSUE-123')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user provides the issueUrl, you can ignore the organizationSlug and issueId parameters.\",\n \"- If you're uncertain about which organization to query, you should call `list_organizations()` first. This especially important if an issueId is passed.\",\n \"</hints>\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: z\n .string()\n .url()\n .describe(\"The URL of the issue to retrieve details for.\")\n .optional(),\n },\n },\n];\n"],"mappings":";;;;AAcA,MAAa,mBAAmB;CAC9B;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;CACb;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,sBAAsB,UAAU;GAClD,WAAW,eAAe,UAAU;EACrC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,sBAAsB,UAAU;GAClD,WAAW,eAAe,UAAU;EACrC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,sBAAsB,UAAU;GAClD,WAAW,eAAe,UAAU;GACpC,aAAa,iBAAiB,UAAU;GACxC,OAAO,WAAW,UAAU;GAC5B,QAAQ,EACL,KAAK;IAAC;IAAa;IAAc;IAAS;GAAY,EAAC,CACvD,SACC,mJACD,CACA,UAAU;EACd;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,sBAAsB,UAAU;GAClD,WAAW,eAAe,UAAU;GACpC,aAAa,iBAAiB,UAAU;EACzC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,sBAAsB,UAAU;GAClD,WAAW,eAAe,UAAU;EACrC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,sBAAsB,UAAU;GAClD,WAAW,eAAe,UAAU;GACpC,SAAS,kBAAkB,UAAU;GACrC,UAAU,EACP,QAAQ,CACR,KAAK,CACL,SAAS,gDAAgD,CACzD,UAAU;EACd;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,sBAAsB,UAAU;GAClD,WAAW,eAAe,UAAU;GACpC,SAAS,kBAAkB,UAAU;GACrC,UAAU,EACP,QAAQ,CACR,KAAK,CACL,SAAS,gDAAgD,CACzD,UAAU;EACd;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,sBAAsB,UAAU;GAClD,WAAW,eAAe,UAAU;GACpC,aAAa,iBAAiB,UAAU;GACxC,UAAU,EACP,QAAQ,CACR,SAAS,wCAAwC,CACjD,UAAU;GACb,aAAa,iBAAiB,UAAU;GACxC,OAAO,WAAW,UAAU;GAC5B,QAAQ,EACL,KAAK,CAAC,aAAa,OAAQ,EAAC,CAC5B,UAAU,CACV,QAAQ,YAAY,CACpB,SACC,sFACD;EACJ;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,sBAAsB,UAAU;GAClD,WAAW,eAAe,UAAU;GACpC,aAAa,iBAAiB,UAAU;GACxC,aAAa,iBAAiB,UAAU;GACxC,OAAO,WAAW,UAAU;GAC5B,QAAQ,EACL,KAAK,CAAC,aAAa,UAAW,EAAC,CAC/B,UAAU,CACV,QAAQ,YAAY,CACpB,SACC,8HACD;EACJ;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,sBAAsB,UAAU;GAClD,WAAW,eAAe,UAAU;GACpC,MAAM,EAAE,QAAQ,CAAC,SAAS,kCAAkC;EAC7D;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,sBAAsB,UAAU;GAClD,WAAW,eAAe,UAAU;GACpC,UAAU,EAAE,QAAQ,CAAC,SAAS,mBAAmB;GACjD,MAAM,EACH,QAAQ,CACR,SACC,oJACD;GACH,UAAU,cAAc,UAAU;EACnC;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,sBAAsB,UAAU;GAClD,WAAW,eAAe,UAAU;GACpC,aAAa,EAAE,QAAQ,CAAC,SAAS,sBAAsB;GACvD,MAAM,EAAE,QAAQ,CAAC,SAAS,iCAAiC;EAC5D;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,sBAAsB,UAAU;GAClD,WAAW,eAAe,UAAU;GACpC,aAAa,EAAE,QAAQ,CAAC,SAAS,sBAAsB;EACxD;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,sBAAsB,UAAU;GAClD,WAAW,eAAe,UAAU;GACpC,SAAS,kBAAkB,UAAU;GACrC,UAAU,EACP,QAAQ,CACR,KAAK,CACL,SAAS,gDAAgD,CACzD,UAAU;EACd;CACF;CACD;EACE,MAAM;EACN,aAAa;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,sBAAsB,UAAU;GAClD,WAAW,eAAe,UAAU;GACpC,SAAS,kBAAkB,UAAU;GACrC,UAAU,EACP,QAAQ,CACR,KAAK,CACL,SAAS,gDAAgD,CACzD,UAAU;EACd;CACF;AACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"toolDefinitions.d-C5JUBInb.d.ts","names":[],"sources":["../src/toolDefinitions.ts"],"sourcesContent":null,"mappings":";;;cAca;;EAAA,WAAA,EAAA,MA+bZ;EAAA,YAAA,CAAA,EAAA,SAAA;CAAA,GAAA;;;;oCAAA,CAAA,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"toolDefinitions.d-CsT15_MF.d.cts","names":[],"sources":["../src/toolDefinitions.ts"],"sourcesContent":null,"mappings":";;;cAca;;EAAA,WAAA,EAAA,MA+bZ;EAAA,YAAA,CAAA,EAAA,SAAA;CAAA,GAAA;;;;oCAAA,CAAA,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tools-Ck2CHZeM.cjs","names":["context: ServerContext","opts: { regionUrl?: string }","SentryApiService","clientKey: ClientKey | null","step: z.infer<typeof AutofixRunStepSchema>","typedStep"],"sources":["../src/tools.ts"],"sourcesContent":["import type { z } from \"zod\";\nimport {\n type AutofixRunStepDefaultSchema,\n type AutofixRunStepRootCauseAnalysisSchema,\n type AutofixRunStepSchema,\n type AutofixRunStepSolutionSchema,\n type ClientKey,\n type ErrorEventSchema,\n SentryApiService,\n} from \"./api-client/index\";\nimport { formatEventOutput } from \"./internal/formatting\";\nimport { extractIssueId, parseIssueParams } from \"./internal/issue-helpers\";\nimport { logError } from \"./logging\";\nimport type { ServerContext, ToolHandlers } from \"./types\";\n\nfunction apiServiceFromContext(\n context: ServerContext,\n opts: { regionUrl?: string } = {},\n) {\n return new SentryApiService({\n host: opts.regionUrl || context.host,\n accessToken: context.accessToken,\n });\n}\n\nexport const TOOL_HANDLERS = {\n list_organizations: async (context) => {\n const apiService = apiServiceFromContext(context);\n const organizations = await apiService.listOrganizations();\n\n let output = \"# Organizations\\n\\n\";\n\n if (organizations.length === 0) {\n output += \"You don't appear to be a member of any organizations.\\n\";\n return output;\n }\n\n output += organizations\n .map((org) =>\n [\n `## **${org.slug}**`,\n \"\",\n `**Web URL:** ${org.links.organizationUrl}`,\n `**Region URL:** ${org.links.regionUrl}`,\n ].join(\"\\n\"),\n )\n .join(\"\\n\\n\");\n\n output += \"\\n\\n# Using this information\\n\\n\";\n output += `- The organization's name is the identifier for the organization, and is used in many tools for \\`organizationSlug\\`.\\n`;\n output += `- If a tool supports passing in the \\`regionUrl\\`, you should also pass in the correct value there.\\n`;\n\n return output;\n },\n list_teams: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n const teams = await apiService.listTeams(organizationSlug);\n let output = `# Teams in **${organizationSlug}**\\n\\n`;\n if (teams.length === 0) {\n output += \"No teams found.\\n\";\n return output;\n }\n output += teams.map((team) => `- ${team.slug}\\n`).join(\"\");\n return output;\n },\n list_projects: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n const projects = await apiService.listProjects(organizationSlug);\n let output = `# Projects in **${organizationSlug}**\\n\\n`;\n if (projects.length === 0) {\n output += \"No projects found.\\n\";\n return output;\n }\n output += projects.map((project) => `- **${project.slug}**\\n`).join(\"\");\n return output;\n },\n list_issues: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n const sortByMap = {\n last_seen: \"date\" as const,\n first_seen: \"new\" as const,\n count: \"freq\" as const,\n userCount: \"user\" as const,\n };\n const issues = await apiService.listIssues({\n organizationSlug,\n projectSlug: params.projectSlug,\n query: params.query,\n sortBy: params.sortBy\n ? sortByMap[params.sortBy as keyof typeof sortByMap]\n : undefined,\n });\n let output = `# Issues in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : \"\"}**\\n\\n`;\n if (issues.length === 0) {\n output += \"No issues found.\\n\";\n return output;\n }\n output += issues\n .map((issue) =>\n [\n `## ${issue.shortId}`,\n \"\",\n `**Description**: ${issue.title}`,\n `**Culprit**: ${issue.culprit}`,\n `**First Seen**: ${new Date(issue.firstSeen).toISOString()}`,\n `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}`,\n `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}`,\n ].join(\"\\n\"),\n )\n .join(\"\\n\\n\");\n output += \"\\n\\n\";\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\\n`;\n output += `- You can get more details about a specific issue by using the tool: \\`get_issue_details(organizationSlug=\"${organizationSlug}\", issueId=<issueID>)\\`\\n`;\n return output;\n },\n list_releases: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n const releases = await apiService.listReleases({\n organizationSlug,\n projectSlug: params.projectSlug,\n });\n let output = `# Releases in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : \"\"}**\\n\\n`;\n if (releases.length === 0) {\n output += \"No releases found.\\n\";\n return output;\n }\n output += releases\n .map((release) => {\n const releaseInfo = [\n `## ${release.shortVersion}`,\n \"\",\n `**Created**: ${new Date(release.dateCreated).toISOString()}`,\n ];\n if (release.dateReleased) {\n releaseInfo.push(\n `**Released**: ${new Date(release.dateReleased).toISOString()}`,\n );\n }\n if (release.firstEvent) {\n releaseInfo.push(\n `**First Event**: ${new Date(release.firstEvent).toISOString()}`,\n );\n }\n if (release.lastEvent) {\n releaseInfo.push(\n `**Last Event**: ${new Date(release.lastEvent).toISOString()}`,\n );\n }\n if (release.newGroups !== undefined) {\n releaseInfo.push(`**New Issues**: ${release.newGroups}`);\n }\n if (release.projects && release.projects.length > 0) {\n releaseInfo.push(\n `**Projects**: ${release.projects.map((p) => p.name).join(\", \")}`,\n );\n }\n if (release.lastCommit) {\n releaseInfo.push(\"\", `### Last Commit`, \"\");\n releaseInfo.push(`**Commit ID**: ${release.lastCommit.id}`);\n releaseInfo.push(`**Commit Message**: ${release.lastCommit.message}`);\n releaseInfo.push(\n `**Commit Author**: ${release.lastCommit.author.name}`,\n );\n releaseInfo.push(\n `**Commit Date**: ${new Date(release.lastCommit.dateCreated).toISOString()}`,\n );\n }\n if (release.lastDeploy) {\n releaseInfo.push(\"\", `### Last Deploy`, \"\");\n releaseInfo.push(`**Deploy ID**: ${release.lastDeploy.id}`);\n releaseInfo.push(\n `**Environment**: ${release.lastDeploy.environment}`,\n );\n if (release.lastDeploy.dateStarted) {\n releaseInfo.push(\n `**Deploy Started**: ${new Date(release.lastDeploy.dateStarted).toISOString()}`,\n );\n }\n if (release.lastDeploy.dateFinished) {\n releaseInfo.push(\n `**Deploy Finished**: ${new Date(release.lastDeploy.dateFinished).toISOString()}`,\n );\n }\n }\n return releaseInfo.join(\"\\n\");\n })\n .join(\"\\n\\n\");\n output += \"\\n\\n\";\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the Release version in commit messages or documentation.\\n`;\n output += `- You can search for issues in a specific release using the \\`search_errors()\\` tool with the query \\`release:${releases.length ? releases[0]!.version : \"VERSION\"}\\`.\\n`;\n return output;\n },\n list_tags: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n const tagList = await apiService.listTags({ organizationSlug }, {});\n let output = `# Tags in **${organizationSlug}**\\n\\n`;\n if (tagList.length === 0) {\n output += \"No tags found.\\n\";\n return output;\n }\n output += tagList.map((tag) => [`- ${tag.key}`].join(\"\\n\")).join(\"\\n\");\n output += \"\\n\\n\";\n output += \"# Using this information\\n\\n\";\n output += `- You can reference tags in the \\`query\\` parameter of various tools: \\`tagName:tagValue\\`.\\n`;\n return output;\n },\n get_issue_summary: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug ?? context.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n const issue = await apiService.getIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId,\n });\n let output = `# Issue ${issue.shortId} in **${orgSlug}**\\n\\n`;\n output += `**Description**: ${issue.title}\\n`;\n output += `**Culprit**: ${issue.culprit}\\n`;\n output += `**First Seen**: ${new Date(issue.firstSeen).toISOString()}\\n`;\n output += `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}\\n`;\n output += `**Occurrences**: ${issue.count}\\n`;\n output += `**Users Impacted**: ${issue.userCount}\\n`;\n output += `**Status**: ${issue.status}\\n`;\n output += `**Platform**: ${issue.platform}\\n`;\n output += `**Project**: ${issue.project.name}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(orgSlug, issue.shortId)}\\n`;\n return output;\n },\n get_issue_details: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug ?? context.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n const [issue, event] = await Promise.all([\n apiService.getIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n apiService.getLatestEventForIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n ]);\n let output = `# Issue ${issue.shortId} in **${orgSlug}**\\n\\n`;\n output += `**Description**: ${issue.title}\\n`;\n output += `**Culprit**: ${issue.culprit}\\n`;\n output += `**First Seen**: ${new Date(issue.firstSeen).toISOString()}\\n`;\n output += `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(orgSlug, issue.shortId)}\\n`;\n output += \"\\n\";\n output += \"## Event Specifics\\n\\n\";\n if (event.type === \"error\") {\n output += `**Occurred At**: ${new Date((event as z.infer<typeof ErrorEventSchema>).dateCreated).toISOString()}\\n`;\n }\n if (event.message) {\n output += `**Message**:\\n${event.message}\\n`;\n }\n output += formatEventOutput(event);\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the IssueID in commit messages (e.g. \\`Fixes ${parsedIssueId}\\`) to automatically close the issue when the commit is merged.\\n`;\n output +=\n \"- The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\\n\";\n return output;\n },\n search_errors: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n const eventList = await apiService.searchErrors({\n organizationSlug,\n projectSlug: params.projectSlug,\n filename: params.filename,\n query: params.query,\n transaction: params.transaction,\n sortBy: params.sortBy as \"last_seen\" | \"count\" | undefined,\n });\n let output = `# Errors in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : \"\"}**\\n\\n`;\n if (params.query)\n output += `These errors match the query \\`${params.query}\\`\\n`;\n if (params.filename)\n output += `These errors are limited to the file suffix \\`${params.filename}\\`\\n`;\n output += \"\\n\";\n if (eventList.length === 0) {\n output += `No results found\\n\\n`;\n output += `We searched within the ${organizationSlug} organization.\\n\\n`;\n return output;\n }\n for (const eventSummary of eventList) {\n output += `## ${eventSummary.issue}\\n\\n`;\n output += `**Description**: ${eventSummary.title}\\n`;\n output += `**Issue ID**: ${eventSummary.issue}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(organizationSlug, eventSummary.issue)}\\n`;\n output += `**Project**: ${eventSummary.project}\\n`;\n output += `**Last Seen**: ${eventSummary[\"last_seen()\"]}\\n`;\n output += `**Occurrences**: ${eventSummary[\"count()\"]}\\n\\n`;\n }\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\\n`;\n output += `- You can get more details about an error by using the tool: \\`get_issue_details(organizationSlug=\"${organizationSlug}\", issueId=<issueID>)\\`\\n`;\n return output;\n },\n search_transactions: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n const eventList = await apiService.searchSpans({\n organizationSlug,\n projectSlug: params.projectSlug,\n transaction: params.transaction,\n query: params.query,\n sortBy: params.sortBy as \"timestamp\" | \"duration\" | undefined,\n });\n let output = `# Transactions in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : \"\"}**\\n\\n`;\n if (params.query)\n output += `These spans match the query \\`${params.query}\\`\\n`;\n if (params.transaction)\n output += `These spans are limited to the transaction \\`${params.transaction}\\`\\n`;\n output += \"\\n\";\n if (eventList.length === 0) {\n output += `No results found\\n\\n`;\n output += `We searched within the ${organizationSlug} organization.\\n\\n`;\n return output;\n }\n for (const eventSummary of eventList) {\n output += `## ${eventSummary.transaction}\\n\\n`;\n output += `**Span ID**: ${eventSummary.id}\\n`;\n output += `**Trace ID**: ${eventSummary.trace}\\n`;\n output += `**Span Operation**: ${eventSummary[\"span.op\"]}\\n`;\n output += `**Span Description**: ${eventSummary[\"span.description\"]}\\n`;\n output += `**Duration**: ${eventSummary[\"span.duration\"]}\\n`;\n output += `**Timestamp**: ${eventSummary.timestamp}\\n`;\n output += `**Project**: ${eventSummary.project}\\n`;\n output += `**URL**: ${apiService.getTraceUrl(organizationSlug, eventSummary.trace)}\\n\\n`;\n }\n return output;\n },\n create_team: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n const team = await apiService.createTeam({\n organizationSlug,\n name: params.name,\n });\n let output = `# New Team in **${organizationSlug}**\\n\\n`;\n output += `**ID**: ${team.id}\\n`;\n output += `**Slug**: ${team.slug}\\n`;\n output += `**Name**: ${team.name}\\n`;\n output += \"# Using this information\\n\\n\";\n output += `- You should always inform the user of the Team Slug value.\\n`;\n return output;\n },\n create_project: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n const project = await apiService.createProject({\n organizationSlug,\n teamSlug: params.teamSlug,\n name: params.name,\n platform: params.platform,\n });\n let clientKey: ClientKey | null = null;\n try {\n clientKey = await apiService.createClientKey({\n organizationSlug,\n projectSlug: project.slug,\n name: \"Default\",\n });\n } catch (err) {\n logError(err);\n }\n let output = `# New Project in **${organizationSlug}**\\n\\n`;\n output += `**ID**: ${project.id}\\n`;\n output += `**Slug**: ${project.slug}\\n`;\n output += `**Name**: ${project.name}\\n`;\n if (clientKey) {\n output += `**SENTRY_DSN**: ${clientKey?.dsn.public}\\n\\n`;\n } else {\n output += \"**SENTRY_DSN**: There was an error fetching this value.\\n\\n\";\n }\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the **SENTRY_DSN** value to initialize Sentry's SDKs.\\n`;\n output += `- You should always inform the user of the **SENTRY_DSN** and Project Slug values.\\n`;\n return output;\n },\n create_dsn: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n const clientKey = await apiService.createClientKey({\n organizationSlug,\n projectSlug: params.projectSlug,\n name: params.name,\n });\n let output = `# New DSN in **${organizationSlug}/${params.projectSlug}**\\n\\n`;\n output += `**DSN**: ${clientKey.dsn.public}\\n`;\n output += `**Name**: ${clientKey.name}\\n\\n`;\n output += \"# Using this information\\n\\n\";\n output +=\n \"- The `SENTRY_DSN` value is a URL that you can use to initialize Sentry's SDKs.\\n\";\n return output;\n },\n list_dsns: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n const clientKeys = await apiService.listClientKeys({\n organizationSlug,\n projectSlug: params.projectSlug,\n });\n let output = `# DSNs in **${organizationSlug}/${params.projectSlug}**\\n\\n`;\n if (clientKeys.length === 0) {\n output +=\n \"No DSNs were found.\\n\\nYou can create new one using the `create_dsn` tool.\";\n return output;\n }\n for (const clientKey of clientKeys) {\n output += `## ${clientKey.name}\\n`;\n output += `**ID**: ${clientKey.id}\\n`;\n output += `**DSN**: ${clientKey.dsn.public}\\n\\n`;\n }\n output += \"# Using this information\\n\\n\";\n output +=\n \"- The `SENTRY_DSN` value is a URL that you can use to initialize Sentry's SDKs.\\n\";\n return output;\n },\n begin_autofix: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n let issueId = params.issueId;\n if (params.issueUrl) {\n const resolved = extractIssueId(params.issueUrl);\n if (!resolved) {\n throw new Error(\n \"Invalid Sentry issue URL. Path should contain '/issues/{issue_id}'\",\n );\n }\n organizationSlug = resolved.organizationSlug;\n issueId = resolved.issueId;\n } else if (!issueId) {\n throw new Error(\"Either issueId or issueUrl must be provided\");\n }\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n const data = await apiService.startAutofix({\n organizationSlug,\n issueId,\n });\n return [\n `# Autofix Started for Issue ${issueId}`,\n \"\",\n `**Run ID:**: ${data.run_id}`,\n \"\",\n \"This operation may take some time, so you should call `get_autofix_status()` to check the status of the analysis, and repeat the process until its finished.\",\n \"\",\n \"You should also inform the user that the operation may take some time, and give them updates whenever you check the status of the operation..\",\n \"\",\n \"```\",\n params.issueUrl\n ? `get_autofix_status(issueUrl=\"${params.issueUrl}\")`\n : `get_autofix_status(organizationSlug=\"${organizationSlug}\", issueId=\"${issueId}\")`,\n \"```\",\n ].join(\"\\n\");\n },\n get_autofix_status: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n let issueId = params.issueId;\n if (params.issueUrl) {\n const resolved = extractIssueId(params.issueUrl);\n if (!resolved) {\n throw new Error(\n \"Invalid Sentry issue URL. Path should contain '/issues/{issue_id}'\",\n );\n }\n organizationSlug = resolved.organizationSlug;\n issueId = resolved.issueId;\n } else if (!issueId) {\n throw new Error(\"Either issueId or issueUrl must be provided\");\n }\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n const { autofix } = await apiService.getAutofixState({\n organizationSlug,\n issueId,\n });\n let output = `# Autofix Status for Issue ${issueId}\\n\\n`;\n if (!autofix) {\n output += `No autofix run found for ${issueId}.\\n\\nYou can initiate a new autofix run using the \\`begin_autofix\\` tool.`;\n return output;\n }\n for (const step of autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n return output;\n },\n} satisfies ToolHandlers;\n\nfunction getOutputForAutofixStep(step: z.infer<typeof AutofixRunStepSchema>) {\n let output = `## ${step.title}\\n\\n`;\n\n if (step.status === \"FAILED\") {\n output += `**Sentry hit an error completing this step.\\n\\n`;\n return output;\n }\n\n if (step.status !== \"COMPLETED\") {\n output += `**Sentry is still working on this step. Please check back in a minute.**\\n\\n`;\n return output;\n }\n\n if (step.type === \"root_cause_analysis\") {\n const typedStep = step as z.infer<\n typeof AutofixRunStepRootCauseAnalysisSchema\n >;\n\n for (const cause of typedStep.causes) {\n if (typedStep.description) {\n output += `${typedStep.description}\\n\\n`;\n }\n for (const entry of cause.root_cause_reproduction) {\n output += `**${entry.title}**\\n\\n`;\n output += `${entry.code_snippet_and_analysis}\\n\\n`;\n }\n }\n return output;\n }\n\n if (step.type === \"solution\") {\n const typedStep = step as z.infer<typeof AutofixRunStepSolutionSchema>;\n output += `${typedStep.description}\\n\\n`;\n for (const entry of typedStep.solution) {\n output += `**${entry.title}**\\n`;\n output += `${entry.code_snippet_and_analysis}\\n\\n`;\n }\n\n if (typedStep.status === \"FAILED\") {\n output += `**Sentry hit an error completing this step.\\n\\n`;\n } else if (typedStep.status !== \"COMPLETED\") {\n output += `**Sentry is still working on this step.**\\n\\n`;\n }\n\n return output;\n }\n\n const typedStep = step as z.infer<typeof AutofixRunStepDefaultSchema>;\n if (typedStep.insights && typedStep.insights.length > 0) {\n for (const entry of typedStep.insights) {\n output += `**${entry.insight}**\\n`;\n output += `${entry.justification}\\n\\n`;\n }\n } else if (step.output_stream) {\n output += `${step.output_stream}\\n`;\n }\n\n return output;\n}\n"],"mappings":";;;;;;;AAeA,SAAS,sBACPA,SACAC,OAA+B,CAAE,GACjC;AACA,QAAO,IAAIC,gCAAiB;EAC1B,MAAM,KAAK,aAAa,QA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