@sentry/mcp-server 0.8.0 → 0.9.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 (129) hide show
  1. package/README.md +13 -5
  2. package/dist/api-client/client.cjs +2 -2
  3. package/dist/api-client/client.d.cts +3 -3
  4. package/dist/api-client/client.d.ts +3 -3
  5. package/dist/api-client/client.js +2 -2
  6. package/dist/api-client/client.test.cjs +3 -3
  7. package/dist/api-client/client.test.js +3 -3
  8. package/dist/api-client/index.cjs +3 -2
  9. package/dist/api-client/index.d.cts +4 -4
  10. package/dist/api-client/index.d.ts +4 -4
  11. package/dist/api-client/index.js +3 -3
  12. package/dist/api-client/schema.cjs +2 -1
  13. package/dist/api-client/schema.d.cts +2 -2
  14. package/dist/api-client/schema.d.ts +2 -2
  15. package/dist/api-client/schema.js +2 -2
  16. package/dist/api-client/types.d.cts +2 -2
  17. package/dist/api-client/types.d.ts +2 -2
  18. package/dist/{client-CRlGzHly.d.ts → client-1dRfG57H.d.ts} +7 -7
  19. package/dist/{client-CRlGzHly.d.ts.map → client-1dRfG57H.d.ts.map} +1 -1
  20. package/dist/{client-TjRMJC41.d.cts → client-BsYOQsEI.d.cts} +3 -3
  21. package/dist/{client-TjRMJC41.d.cts.map → client-BsYOQsEI.d.cts.map} +1 -1
  22. package/dist/{client-CXUzhM1I.js → client-CTm4cvI7.js} +2 -2
  23. package/dist/{client-CXUzhM1I.js.map → client-CTm4cvI7.js.map} +1 -1
  24. package/dist/{client-Cp-Y1PHr.cjs → client-DQ837FXP.cjs} +2 -2
  25. package/dist/{client-Cp-Y1PHr.cjs.map → client-DQ837FXP.cjs.map} +1 -1
  26. package/dist/{formatting-C6Py2iOz.js → formatting-BQRAzO5v.js} +25 -11
  27. package/dist/formatting-BQRAzO5v.js.map +1 -0
  28. package/dist/{formatting-BmbJ5-Uh.cjs → formatting-C-0bHtbh.cjs} +25 -11
  29. package/dist/formatting-C-0bHtbh.cjs.map +1 -0
  30. package/dist/index.cjs +11 -11
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.js +11 -11
  33. package/dist/index.js.map +1 -1
  34. package/dist/internal/formatting.cjs +1 -1
  35. package/dist/internal/formatting.d.cts +3 -3
  36. package/dist/internal/formatting.d.cts.map +1 -1
  37. package/dist/internal/formatting.d.ts +3 -3
  38. package/dist/internal/formatting.d.ts.map +1 -1
  39. package/dist/internal/formatting.js +1 -1
  40. package/dist/internal/issue-helpers.test.cjs +1 -1
  41. package/dist/internal/issue-helpers.test.js +1 -1
  42. package/dist/prompts.d.cts +2 -2
  43. package/dist/prompts.d.ts +2 -2
  44. package/dist/{schema-DpID9ztC.d.cts → schema-CaJV2aIO.d.cts} +116 -106
  45. package/dist/schema-CaJV2aIO.d.cts.map +1 -0
  46. package/dist/{schema-BzLH7LPa.d.ts → schema-DwPOkoSP.d.ts} +330 -320
  47. package/dist/schema-DwPOkoSP.d.ts.map +1 -0
  48. package/dist/{schema-BuByiEkr.cjs → schema-KEMqYaQn.cjs} +11 -1
  49. package/dist/schema-KEMqYaQn.cjs.map +1 -0
  50. package/dist/{schema-Drnljuwf.js → schema-nyYqVk4Y.js} +6 -2
  51. package/dist/schema-nyYqVk4Y.js.map +1 -0
  52. package/dist/{server-fYrkDOmy.cjs → server-BWoJZj5B.cjs} +4 -4
  53. package/dist/{server-fYrkDOmy.cjs.map → server-BWoJZj5B.cjs.map} +1 -1
  54. package/dist/{server-BCmPE_Kt.js → server-DtNbD1c-.js} +4 -4
  55. package/dist/{server-BCmPE_Kt.js.map → server-DtNbD1c-.js.map} +1 -1
  56. package/dist/server.cjs +6 -6
  57. package/dist/server.d.cts +2 -2
  58. package/dist/server.d.ts +2 -2
  59. package/dist/server.js +6 -6
  60. package/dist/{stdio-BxJq3OU7.cjs → stdio-BLzMxGqU.cjs} +2 -2
  61. package/dist/{stdio-BxJq3OU7.cjs.map → stdio-BLzMxGqU.cjs.map} +1 -1
  62. package/dist/{stdio-QBN7-Am6.js → stdio-D4oW-qT6.js} +2 -2
  63. package/dist/{stdio-QBN7-Am6.js.map → stdio-D4oW-qT6.js.map} +1 -1
  64. package/dist/{toolDefinitions-D13S3vQE.js → toolDefinitions-BF-D81bS.js} +1 -23
  65. package/dist/toolDefinitions-BF-D81bS.js.map +1 -0
  66. package/dist/{toolDefinitions-DkO9-iEg.d.ts → toolDefinitions-CCscRQoM.d.ts} +12 -30
  67. package/dist/toolDefinitions-CCscRQoM.d.ts.map +1 -0
  68. package/dist/{toolDefinitions-1SnflztE.cjs → toolDefinitions-CO65cU86.cjs} +1 -23
  69. package/dist/toolDefinitions-CO65cU86.cjs.map +1 -0
  70. package/dist/{toolDefinitions-Z-JGBEIN.d.cts → toolDefinitions-K_TVqaLU.d.cts} +12 -30
  71. package/dist/toolDefinitions-K_TVqaLU.d.cts.map +1 -0
  72. package/dist/toolDefinitions.cjs +1 -1
  73. package/dist/toolDefinitions.d.cts +1 -1
  74. package/dist/toolDefinitions.d.ts +1 -1
  75. package/dist/toolDefinitions.js +1 -1
  76. package/dist/toolDefinitions.test.cjs +1 -1
  77. package/dist/toolDefinitions.test.js +1 -1
  78. package/dist/{tools-CnVttgaS.js → tools-B8ufMRZx.js} +3 -28
  79. package/dist/tools-B8ufMRZx.js.map +1 -0
  80. package/dist/{tools-BgrGdS8I.cjs → tools-BYt-G6p2.cjs} +3 -28
  81. package/dist/tools-BYt-G6p2.cjs.map +1 -0
  82. package/dist/tools.cjs +4 -4
  83. package/dist/tools.d.cts +13 -28
  84. package/dist/tools.d.cts.map +1 -1
  85. package/dist/tools.d.ts +16 -31
  86. package/dist/tools.d.ts.map +1 -1
  87. package/dist/tools.js +4 -4
  88. package/dist/tools.test.cjs +24 -61
  89. package/dist/tools.test.cjs.map +1 -1
  90. package/dist/tools.test.js +24 -61
  91. package/dist/tools.test.js.map +1 -1
  92. package/dist/transports/stdio.cjs +7 -7
  93. package/dist/transports/stdio.d.cts +2 -2
  94. package/dist/transports/stdio.d.ts +2 -2
  95. package/dist/transports/stdio.js +7 -7
  96. package/dist/{types-CczA6AH1.d.cts → types-CPuN4Qmi.d.cts} +2 -2
  97. package/dist/{types-CczA6AH1.d.cts.map → types-CPuN4Qmi.d.cts.map} +1 -1
  98. package/dist/{types-X5Epdrlo.d.ts → types-Ds7qzCBB.d.ts} +2 -2
  99. package/dist/{types-X5Epdrlo.d.ts.map → types-Ds7qzCBB.d.ts.map} +1 -1
  100. package/dist/{types-Cis1PiVW.d.ts → types-DyM4kaGZ.d.ts} +2 -2
  101. package/dist/{types-Cis1PiVW.d.ts.map → types-DyM4kaGZ.d.ts.map} +1 -1
  102. package/dist/{types-BO0mZ8vj.d.cts → types-TaJcaAVg.d.cts} +2 -2
  103. package/dist/{types-BO0mZ8vj.d.cts.map → types-TaJcaAVg.d.cts.map} +1 -1
  104. package/dist/types.d.cts +2 -2
  105. package/dist/types.d.ts +2 -2
  106. package/dist/{version-sY-gY_s6.cjs → version-B0O4KvZ9.cjs} +2 -2
  107. package/dist/{version-sY-gY_s6.cjs.map → version-B0O4KvZ9.cjs.map} +1 -1
  108. package/dist/version-dTEKpaGt.js +6 -0
  109. package/dist/{version-DtWIv-x9.js.map → version-dTEKpaGt.js.map} +1 -1
  110. package/dist/version.cjs +1 -1
  111. package/dist/version.js +1 -1
  112. package/dist/{vi.ClIskdbk-TqmAThAO.cjs → vi.ClIskdbk-Bs263gvI.cjs} +5 -5
  113. package/dist/{vi.ClIskdbk-TqmAThAO.cjs.map → vi.ClIskdbk-Bs263gvI.cjs.map} +1 -1
  114. package/dist/{vi.ClIskdbk-BbUmO3mx.js → vi.ClIskdbk-De9q3829.js} +5 -5
  115. package/dist/{vi.ClIskdbk-BbUmO3mx.js.map → vi.ClIskdbk-De9q3829.js.map} +1 -1
  116. package/package.json +6 -6
  117. package/dist/formatting-BmbJ5-Uh.cjs.map +0 -1
  118. package/dist/formatting-C6Py2iOz.js.map +0 -1
  119. package/dist/schema-BuByiEkr.cjs.map +0 -1
  120. package/dist/schema-BzLH7LPa.d.ts.map +0 -1
  121. package/dist/schema-DpID9ztC.d.cts.map +0 -1
  122. package/dist/schema-Drnljuwf.js.map +0 -1
  123. package/dist/toolDefinitions-1SnflztE.cjs.map +0 -1
  124. package/dist/toolDefinitions-D13S3vQE.js.map +0 -1
  125. package/dist/toolDefinitions-DkO9-iEg.d.ts.map +0 -1
  126. package/dist/toolDefinitions-Z-JGBEIN.d.cts.map +0 -1
  127. package/dist/tools-BgrGdS8I.cjs.map +0 -1
  128. package/dist/tools-CnVttgaS.js.map +0 -1
  129. package/dist/version-DtWIv-x9.js +0 -6
@@ -15,8 +15,8 @@ declare const TOOL_DEFINITIONS: ({
15
15
  query?: undefined;
16
16
  sortBy?: undefined;
17
17
  issueId?: undefined;
18
- issueUrl?: undefined;
19
18
  eventId?: undefined;
19
+ issueUrl?: undefined;
20
20
  filename?: undefined;
21
21
  transaction?: undefined;
22
22
  name?: undefined;
@@ -33,8 +33,8 @@ declare const TOOL_DEFINITIONS: ({
33
33
  query?: undefined;
34
34
  sortBy?: undefined;
35
35
  issueId?: undefined;
36
- issueUrl?: undefined;
37
36
  eventId?: undefined;
37
+ issueUrl?: undefined;
38
38
  filename?: undefined;
39
39
  transaction?: undefined;
40
40
  name?: undefined;
@@ -51,8 +51,8 @@ declare const TOOL_DEFINITIONS: ({
51
51
  query: z.ZodOptional<z.ZodString>;
52
52
  sortBy: z.ZodOptional<z.ZodEnum<["last_seen", "first_seen", "count", "userCount"]>>;
53
53
  issueId?: undefined;
54
- issueUrl?: undefined;
55
54
  eventId?: undefined;
55
+ issueUrl?: undefined;
56
56
  filename?: undefined;
57
57
  transaction?: undefined;
58
58
  name?: undefined;
@@ -69,8 +69,8 @@ declare const TOOL_DEFINITIONS: ({
69
69
  query?: undefined;
70
70
  sortBy?: undefined;
71
71
  issueId?: undefined;
72
- issueUrl?: undefined;
73
72
  eventId?: undefined;
73
+ issueUrl?: undefined;
74
74
  filename?: undefined;
75
75
  transaction?: undefined;
76
76
  name?: undefined;
@@ -87,26 +87,8 @@ declare const TOOL_DEFINITIONS: ({
87
87
  query?: undefined;
88
88
  sortBy?: undefined;
89
89
  issueId?: undefined;
90
- issueUrl?: undefined;
91
- eventId?: undefined;
92
- filename?: undefined;
93
- transaction?: undefined;
94
- name?: undefined;
95
- teamSlug?: undefined;
96
- platform?: undefined;
97
- };
98
- } | {
99
- name: "get_issue_summary";
100
- description: string;
101
- paramsSchema: {
102
- organizationSlug: z.ZodOptional<z.ZodString>;
103
- regionUrl: z.ZodOptional<z.ZodString>;
104
- issueId: z.ZodOptional<z.ZodString>;
105
- issueUrl: z.ZodOptional<z.ZodString>;
106
- projectSlug?: undefined;
107
- query?: undefined;
108
- sortBy?: undefined;
109
90
  eventId?: undefined;
91
+ issueUrl?: undefined;
110
92
  filename?: undefined;
111
93
  transaction?: undefined;
112
94
  name?: undefined;
@@ -143,8 +125,8 @@ declare const TOOL_DEFINITIONS: ({
143
125
  query: z.ZodOptional<z.ZodString>;
144
126
  sortBy: z.ZodDefault<z.ZodOptional<z.ZodEnum<["last_seen", "count"]>>>;
145
127
  issueId?: undefined;
146
- issueUrl?: undefined;
147
128
  eventId?: undefined;
129
+ issueUrl?: undefined;
148
130
  name?: undefined;
149
131
  teamSlug?: undefined;
150
132
  platform?: undefined;
@@ -160,8 +142,8 @@ declare const TOOL_DEFINITIONS: ({
160
142
  query: z.ZodOptional<z.ZodString>;
161
143
  sortBy: z.ZodDefault<z.ZodOptional<z.ZodEnum<["timestamp", "duration"]>>>;
162
144
  issueId?: undefined;
163
- issueUrl?: undefined;
164
145
  eventId?: undefined;
146
+ issueUrl?: undefined;
165
147
  filename?: undefined;
166
148
  name?: undefined;
167
149
  teamSlug?: undefined;
@@ -178,8 +160,8 @@ declare const TOOL_DEFINITIONS: ({
178
160
  query?: undefined;
179
161
  sortBy?: undefined;
180
162
  issueId?: undefined;
181
- issueUrl?: undefined;
182
163
  eventId?: undefined;
164
+ issueUrl?: undefined;
183
165
  filename?: undefined;
184
166
  transaction?: undefined;
185
167
  teamSlug?: undefined;
@@ -198,8 +180,8 @@ declare const TOOL_DEFINITIONS: ({
198
180
  query?: undefined;
199
181
  sortBy?: undefined;
200
182
  issueId?: undefined;
201
- issueUrl?: undefined;
202
183
  eventId?: undefined;
184
+ issueUrl?: undefined;
203
185
  filename?: undefined;
204
186
  transaction?: undefined;
205
187
  };
@@ -214,8 +196,8 @@ declare const TOOL_DEFINITIONS: ({
214
196
  query?: undefined;
215
197
  sortBy?: undefined;
216
198
  issueId?: undefined;
217
- issueUrl?: undefined;
218
199
  eventId?: undefined;
200
+ issueUrl?: undefined;
219
201
  filename?: undefined;
220
202
  transaction?: undefined;
221
203
  teamSlug?: undefined;
@@ -231,8 +213,8 @@ declare const TOOL_DEFINITIONS: ({
231
213
  query?: undefined;
232
214
  sortBy?: undefined;
233
215
  issueId?: undefined;
234
- issueUrl?: undefined;
235
216
  eventId?: undefined;
217
+ issueUrl?: undefined;
236
218
  filename?: undefined;
237
219
  transaction?: undefined;
238
220
  name?: undefined;
@@ -279,4 +261,4 @@ declare const TOOL_DEFINITIONS: ({
279
261
 
280
262
  //# sourceMappingURL=toolDefinitions.d.ts.map
281
263
  export { TOOL_DEFINITIONS as TOOL_DEFINITIONS$1 };
282
- //# sourceMappingURL=toolDefinitions-DkO9-iEg.d.ts.map
264
+ //# sourceMappingURL=toolDefinitions-CCscRQoM.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolDefinitions-CCscRQoM.d.ts","names":[],"sources":["../src/toolDefinitions.ts"],"sourcesContent":null,"mappings":";;;cAaa;;EAAA,WAAA,EAAA,MAqbZ;EAAA,YAAA,CAAA,EAAA,SAAA;CAAA,GAAA;;;;oCAAA,CAAA,CAAA"}
@@ -132,28 +132,6 @@ const TOOL_DEFINITIONS = [
132
132
  regionUrl: require_schema.ParamRegionUrl.optional()
133
133
  }
134
134
  },
135
- {
136
- name: "get_issue_summary",
137
- description: [
138
- "Retrieve a summary of an issue in Sentry.",
139
- "",
140
- "Use this tool when you need to:",
141
- "- View a summary of an issue in Sentry",
142
- "",
143
- "If the issue is an error, or you want additional information like the stacktrace, you should use `get_issue_details()` tool instead.",
144
- "",
145
- "<hints>",
146
- "- If the user provides the issueUrl, you can ignore the organizationSlug and issueId parameters.",
147
- "- If you're uncertain about which organization to query, you should call `list_organizations()` first. This especially important if an issueId is passed.",
148
- "</hints>"
149
- ].join("\n"),
150
- paramsSchema: {
151
- organizationSlug: require_schema.ParamOrganizationSlug.optional(),
152
- regionUrl: require_schema.ParamRegionUrl.optional(),
153
- issueId: require_schema.ParamIssueShortId.optional(),
154
- issueUrl: zod.z.string().url().describe("The URL of the issue to retrieve details for.").optional()
155
- }
156
- },
157
135
  {
158
136
  name: "get_issue_details",
159
137
  description: [
@@ -440,4 +418,4 @@ Object.defineProperty(exports, 'TOOL_DEFINITIONS', {
440
418
  return TOOL_DEFINITIONS;
441
419
  }
442
420
  });
443
- //# sourceMappingURL=toolDefinitions-1SnflztE.cjs.map
421
+ //# sourceMappingURL=toolDefinitions-CO65cU86.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolDefinitions-CO65cU86.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 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_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 \"<examples>\",\n \"### Get details for issue ID 'CLOUDFLARE-MCP-41'\",\n \"\",\n \"```\",\n \"get_issue_details(organizationSlug='my-organization', issueId='CLOUDFLARE-MCP-41')\",\n \"```\",\n \"\",\n \"### Get details for event ID 'c49541c747cb4d8aa3efb70ca5aba243'\",\n \"\",\n \"```\",\n \"get_event_details(organizationSlug='my-organization', eventId='c49541c747cb4d8aa3efb70ca5aba243')\",\n \"```\",\n \"</examples>\",\n\n \"<hints>\",\n \"- If the user provides the `issueUrl`, you can ignore the other parameters.\",\n \"- If the user provides `issueId` or `eventId` (only one is needed), `organizationSlug` is required.\",\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 issueId: ParamIssueShortId.optional(),\n eventId: z.string().describe(\"The ID of the event.\").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().toLowerCase().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().toLowerCase().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().toLowerCase().describe(\"The project's slug.\"),\n },\n },\n {\n name: \"begin_seer_issue_fix\" as const,\n description: [\n \"Use Seer to 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_seer_issue_fix_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_seer_issue_fix(organizationSlug='my-organization', issueId='ISSUE-123')\",\n \"```\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- Always check to see if an issue fix is already in progress for before calling this tool by using `get_seer_issue_fix_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_seer_issue_fix_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_seer_issue_fix_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":";;;;;;AAaA,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;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GAEA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,qCAAsB,UAAU;GAClD,WAAW,8BAAe,UAAU;GACpC,SAAS,iCAAkB,UAAU;GACrC,SAAS,MAAE,QAAQ,CAAC,SAAS,uBAAuB,CAAC,UAAU;GAC/D,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,aAAa,CAAC,SAAS,mBAAmB;GAC/D,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,aAAa,CAAC,SAAS,sBAAsB;GACrE,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,aAAa,CAAC,SAAS,sBAAsB;EACtE;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"}
@@ -15,8 +15,8 @@ declare const TOOL_DEFINITIONS: ({
15
15
  query?: undefined;
16
16
  sortBy?: undefined;
17
17
  issueId?: undefined;
18
- issueUrl?: undefined;
19
18
  eventId?: undefined;
19
+ issueUrl?: undefined;
20
20
  filename?: undefined;
21
21
  transaction?: undefined;
22
22
  name?: undefined;
@@ -33,8 +33,8 @@ declare const TOOL_DEFINITIONS: ({
33
33
  query?: undefined;
34
34
  sortBy?: undefined;
35
35
  issueId?: undefined;
36
- issueUrl?: undefined;
37
36
  eventId?: undefined;
37
+ issueUrl?: undefined;
38
38
  filename?: undefined;
39
39
  transaction?: undefined;
40
40
  name?: undefined;
@@ -51,8 +51,8 @@ declare const TOOL_DEFINITIONS: ({
51
51
  query: z.ZodOptional<z.ZodString>;
52
52
  sortBy: z.ZodOptional<z.ZodEnum<["last_seen", "first_seen", "count", "userCount"]>>;
53
53
  issueId?: undefined;
54
- issueUrl?: undefined;
55
54
  eventId?: undefined;
55
+ issueUrl?: undefined;
56
56
  filename?: undefined;
57
57
  transaction?: undefined;
58
58
  name?: undefined;
@@ -69,8 +69,8 @@ declare const TOOL_DEFINITIONS: ({
69
69
  query?: undefined;
70
70
  sortBy?: undefined;
71
71
  issueId?: undefined;
72
- issueUrl?: undefined;
73
72
  eventId?: undefined;
73
+ issueUrl?: undefined;
74
74
  filename?: undefined;
75
75
  transaction?: undefined;
76
76
  name?: undefined;
@@ -87,26 +87,8 @@ declare const TOOL_DEFINITIONS: ({
87
87
  query?: undefined;
88
88
  sortBy?: undefined;
89
89
  issueId?: undefined;
90
- issueUrl?: undefined;
91
- eventId?: undefined;
92
- filename?: undefined;
93
- transaction?: undefined;
94
- name?: undefined;
95
- teamSlug?: undefined;
96
- platform?: undefined;
97
- };
98
- } | {
99
- name: "get_issue_summary";
100
- description: string;
101
- paramsSchema: {
102
- organizationSlug: z.ZodOptional<z.ZodString>;
103
- regionUrl: z.ZodOptional<z.ZodString>;
104
- issueId: z.ZodOptional<z.ZodString>;
105
- issueUrl: z.ZodOptional<z.ZodString>;
106
- projectSlug?: undefined;
107
- query?: undefined;
108
- sortBy?: undefined;
109
90
  eventId?: undefined;
91
+ issueUrl?: undefined;
110
92
  filename?: undefined;
111
93
  transaction?: undefined;
112
94
  name?: undefined;
@@ -143,8 +125,8 @@ declare const TOOL_DEFINITIONS: ({
143
125
  query: z.ZodOptional<z.ZodString>;
144
126
  sortBy: z.ZodDefault<z.ZodOptional<z.ZodEnum<["last_seen", "count"]>>>;
145
127
  issueId?: undefined;
146
- issueUrl?: undefined;
147
128
  eventId?: undefined;
129
+ issueUrl?: undefined;
148
130
  name?: undefined;
149
131
  teamSlug?: undefined;
150
132
  platform?: undefined;
@@ -160,8 +142,8 @@ declare const TOOL_DEFINITIONS: ({
160
142
  query: z.ZodOptional<z.ZodString>;
161
143
  sortBy: z.ZodDefault<z.ZodOptional<z.ZodEnum<["timestamp", "duration"]>>>;
162
144
  issueId?: undefined;
163
- issueUrl?: undefined;
164
145
  eventId?: undefined;
146
+ issueUrl?: undefined;
165
147
  filename?: undefined;
166
148
  name?: undefined;
167
149
  teamSlug?: undefined;
@@ -178,8 +160,8 @@ declare const TOOL_DEFINITIONS: ({
178
160
  query?: undefined;
179
161
  sortBy?: undefined;
180
162
  issueId?: undefined;
181
- issueUrl?: undefined;
182
163
  eventId?: undefined;
164
+ issueUrl?: undefined;
183
165
  filename?: undefined;
184
166
  transaction?: undefined;
185
167
  teamSlug?: undefined;
@@ -198,8 +180,8 @@ declare const TOOL_DEFINITIONS: ({
198
180
  query?: undefined;
199
181
  sortBy?: undefined;
200
182
  issueId?: undefined;
201
- issueUrl?: undefined;
202
183
  eventId?: undefined;
184
+ issueUrl?: undefined;
203
185
  filename?: undefined;
204
186
  transaction?: undefined;
205
187
  };
@@ -214,8 +196,8 @@ declare const TOOL_DEFINITIONS: ({
214
196
  query?: undefined;
215
197
  sortBy?: undefined;
216
198
  issueId?: undefined;
217
- issueUrl?: undefined;
218
199
  eventId?: undefined;
200
+ issueUrl?: undefined;
219
201
  filename?: undefined;
220
202
  transaction?: undefined;
221
203
  teamSlug?: undefined;
@@ -231,8 +213,8 @@ declare const TOOL_DEFINITIONS: ({
231
213
  query?: undefined;
232
214
  sortBy?: undefined;
233
215
  issueId?: undefined;
234
- issueUrl?: undefined;
235
216
  eventId?: undefined;
217
+ issueUrl?: undefined;
236
218
  filename?: undefined;
237
219
  transaction?: undefined;
238
220
  name?: undefined;
@@ -279,4 +261,4 @@ declare const TOOL_DEFINITIONS: ({
279
261
 
280
262
  //# sourceMappingURL=toolDefinitions.d.ts.map
281
263
  export { TOOL_DEFINITIONS };
282
- //# sourceMappingURL=toolDefinitions-Z-JGBEIN.d.cts.map
264
+ //# sourceMappingURL=toolDefinitions-K_TVqaLU.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolDefinitions-K_TVqaLU.d.cts","names":[],"sources":["../src/toolDefinitions.ts"],"sourcesContent":null,"mappings":";;;cAaa;;EAAA,WAAA,EAAA,MAqbZ;EAAA,YAAA,CAAA,EAAA,SAAA;CAAA,GAAA;;;;oCAAA,CAAA,CAAA"}
@@ -1,4 +1,4 @@
1
1
  require('./schema-BCkBPgjj.cjs');
2
- const require_toolDefinitions = require('./toolDefinitions-1SnflztE.cjs');
2
+ const require_toolDefinitions = require('./toolDefinitions-CO65cU86.cjs');
3
3
 
4
4
  exports.TOOL_DEFINITIONS = require_toolDefinitions.TOOL_DEFINITIONS
@@ -1,2 +1,2 @@
1
- import { TOOL_DEFINITIONS } from "./toolDefinitions-Z-JGBEIN.cjs";
1
+ import { TOOL_DEFINITIONS } from "./toolDefinitions-K_TVqaLU.cjs";
2
2
  export { TOOL_DEFINITIONS };
@@ -1,2 +1,2 @@
1
- import { TOOL_DEFINITIONS$1 as TOOL_DEFINITIONS } from "./toolDefinitions-DkO9-iEg.js";
1
+ import { TOOL_DEFINITIONS$1 as TOOL_DEFINITIONS } from "./toolDefinitions-CCscRQoM.js";
2
2
  export { TOOL_DEFINITIONS };
@@ -1,4 +1,4 @@
1
1
  import "./schema-CJrk_GUH.js";
2
- import { TOOL_DEFINITIONS } from "./toolDefinitions-D13S3vQE.js";
2
+ import { TOOL_DEFINITIONS } from "./toolDefinitions-BF-D81bS.js";
3
3
 
4
4
  export { TOOL_DEFINITIONS };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  require('./schema-BCkBPgjj.cjs');
3
- const require_toolDefinitions = require('./toolDefinitions-1SnflztE.cjs');
3
+ const require_toolDefinitions = require('./toolDefinitions-CO65cU86.cjs');
4
4
  const require_dist = require('./dist-wiyJYfAH.cjs');
5
5
 
6
6
  //#region src/toolDefinitions.test.ts
@@ -1,5 +1,5 @@
1
1
  import "./schema-CJrk_GUH.js";
2
- import { TOOL_DEFINITIONS } from "./toolDefinitions-D13S3vQE.js";
2
+ import { TOOL_DEFINITIONS } from "./toolDefinitions-BF-D81bS.js";
3
3
  import { assert, test } from "./dist-BKh-M1A1.js";
4
4
 
5
5
  //#region src/toolDefinitions.test.ts
@@ -1,5 +1,5 @@
1
- import { SentryApiService } from "./client-CXUzhM1I.js";
2
- import { formatIssueOutput } from "./formatting-C6Py2iOz.js";
1
+ import { SentryApiService } from "./client-CTm4cvI7.js";
2
+ import { formatIssueOutput } from "./formatting-BQRAzO5v.js";
3
3
  import { parseIssueParams } from "./issue-helpers-CyoHu5j4.js";
4
4
  import { logError } from "./logging-Cxm8lQvg.js";
5
5
  import { setTag } from "@sentry/core";
@@ -165,31 +165,6 @@ const TOOL_HANDLERS = {
165
165
  output += `- You can reference tags in the \`query\` parameter of various tools: \`tagName:tagValue\`.\n`;
166
166
  return output;
167
167
  },
168
- get_issue_summary: async (context, params) => {
169
- const apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl });
170
- const { organizationSlug: orgSlug, issueId: parsedIssueId } = parseIssueParams({
171
- organizationSlug: params.organizationSlug ?? context.organizationSlug,
172
- issueId: params.issueId,
173
- issueUrl: params.issueUrl
174
- });
175
- setTag("organization.slug", orgSlug);
176
- const issue = await apiService.getIssue({
177
- organizationSlug: orgSlug,
178
- issueId: parsedIssueId
179
- });
180
- let output = `# Issue ${issue.shortId} in **${orgSlug}**\n\n`;
181
- output += `**Description**: ${issue.title}\n`;
182
- output += `**Culprit**: ${issue.culprit}\n`;
183
- output += `**First Seen**: ${new Date(issue.firstSeen).toISOString()}\n`;
184
- output += `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}\n`;
185
- output += `**Occurrences**: ${issue.count}\n`;
186
- output += `**Users Impacted**: ${issue.userCount}\n`;
187
- output += `**Status**: ${issue.status}\n`;
188
- output += `**Platform**: ${issue.platform}\n`;
189
- output += `**Project**: ${issue.project.name}\n`;
190
- output += `**URL**: ${apiService.getIssueUrl(orgSlug, issue.shortId)}\n`;
191
- return output;
192
- },
193
168
  get_issue_details: async (context, params) => {
194
169
  const apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl });
195
170
  if (params.eventId) {
@@ -491,4 +466,4 @@ function getOutputForAutofixStep(step) {
491
466
 
492
467
  //#endregion
493
468
  export { TOOL_HANDLERS };
494
- //# sourceMappingURL=tools-CnVttgaS.js.map
469
+ //# sourceMappingURL=tools-B8ufMRZx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools-B8ufMRZx.js","names":["context: ServerContext","opts: { regionUrl?: string }","orgSlug","issue","event","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 SentryApiService,\n} from \"./api-client/index\";\nimport { formatIssueOutput } from \"./internal/formatting\";\nimport { parseIssueParams } from \"./internal/issue-helpers\";\nimport { logError } from \"./logging\";\nimport type { ServerContext, ToolHandlers } from \"./types\";\nimport { setTag } from \"@sentry/core\";\n\nfunction apiServiceFromContext(\n context: ServerContext,\n opts: { regionUrl?: string } = {},\n) {\n return new SentryApiService({\n host: opts.regionUrl ? new URL(opts.regionUrl).host : 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 setTag(\"organization.slug\", organizationSlug);\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 setTag(\"organization.slug\", organizationSlug);\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 setTag(\"organization.slug\", organizationSlug);\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 setTag(\"organization.slug\", organizationSlug);\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 setTag(\"organization.slug\", organizationSlug);\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_details: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n\n if (params.eventId) {\n const orgSlug = params.organizationSlug ?? context.organizationSlug;\n if (!orgSlug) {\n throw new Error(\"Organization slug is required\");\n }\n setTag(\"organization.slug\", orgSlug);\n const [issue] = await apiService.listIssues({\n organizationSlug: orgSlug,\n query: params.eventId,\n });\n if (!issue) {\n return `# Event Not Found\\n\\nNo issue found for Event ID: ${params.eventId}`;\n }\n const event = await apiService.getEventForIssue({\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n eventId: params.eventId,\n });\n return formatIssueOutput({\n organizationSlug: orgSlug,\n issue,\n event,\n apiService,\n });\n }\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 setTag(\"organization.slug\", orgSlug);\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\n return formatIssueOutput({\n organizationSlug: orgSlug,\n issue,\n event,\n apiService,\n });\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 setTag(\"organization.slug\", organizationSlug);\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 setTag(\"organization.slug\", organizationSlug);\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 setTag(\"organization.slug\", organizationSlug);\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 setTag(\"organization.slug\", organizationSlug);\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 setTag(\"organization.slug\", organizationSlug);\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 setTag(\"organization.slug\", organizationSlug);\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_seer_issue_fix: 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 setTag(\"organization.slug\", orgSlug);\n\n const data = await apiService.startAutofix({\n organizationSlug: orgSlug,\n issueId: parsedIssueId,\n });\n return [\n `# Issue Fix Started for Issue ${parsedIssueId}`,\n \"\",\n `**Run ID:**: ${data.run_id}`,\n \"\",\n \"This operation may take some time, so you should call `get_seer_issue_fix_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_seer_issue_fix_status(issueUrl=\"${params.issueUrl}\")`\n : `get_seer_issue_fix_status(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`,\n \"```\",\n ].join(\"\\n\");\n },\n get_seer_issue_fix_status: 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 setTag(\"organization.slug\", orgSlug);\n const { autofix } = await apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n });\n let output = `# Issue Fix Status for Issue ${parsedIssueId}\\n\\n`;\n if (!autofix) {\n output += `No issue fix process found for ${parsedIssueId}.\\n\\nYou can initiate a new issue fix execution using the \\`begin_seer_issue_fix\\` 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,IAAI,iBAAiB;EAC1B,MAAM,KAAK,YAAY,IAAI,IAAI,KAAK,WAAW,OAAO,QAAQ;EAC9D,aAAa,QAAQ;CACtB;AACF;AAED,MAAa,gBAAgB;CAC3B,oBAAoB,OAAO,YAAY;EACrC,MAAM,aAAa,sBAAsB,QAAQ;EACjD,MAAM,gBAAgB,MAAM,WAAW,mBAAmB;EAE1D,IAAI,SAAS;AAEb,MAAI,cAAc,WAAW,GAAG;AAC9B,aAAU;AACV,UAAO;EACR;AAED,YAAU,cACP,IAAI,CAAC,QACJ;IACG,OAAO,IAAI,KAAK;GACjB;IACC,eAAe,IAAI,MAAM,gBAAgB;IACzC,kBA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AAM,SAASA,YAAU,QAAQ;AACpC,OAAIA,YAAU,YACZ,YAAW,EAAEA,YAAU,YAAY;AAErC,QAAK,MAAM,SAAS,MAAM,yBAAyB;AACjD,eAAW,IAAI,MAAM,MAAM;AAC3B,eAAW,EAAE,MAAM,0BAA0B;GAC9C;EACF;AACD,SAAO;CACR;AAED,KAAI,KAAK,SAAS,YAAY;EAC5B,MAAMA,cAAY;AAClB,aAAW,EAAEA,YAAU,YAAY;AACnC,OAAK,MAAM,SAASA,YAAU,UAAU;AACtC,cAAW,IAAI,MAAM,MAAM;AAC3B,cAAW,EAAE,MAAM,0BAA0B;EAC9C;AAED,MAAIA,YAAU,WAAW,SACvB,YAAW;WACFA,YAAU,WAAW,YAC9B,YAAW;AAGb,SAAO;CACR;CAED,MAAM,YAAY;AAClB,KAAI,UAAU,YAAY,UAAU,SAAS,SAAS,EACpD,MAAK,MAAM,SAAS,UAAU,UAAU;AACtC,aAAW,IAAI,MAAM,QAAQ;AAC7B,aAAW,EAAE,MAAM,cAAc;CAClC;UACQ,KAAK,cACd,YAAW,EAAE,KAAK,cAAc;AAGlC,QAAO;AACR"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const require_chunk = require('./chunk-BtT13l48.cjs');
3
- const require_client = require('./client-Cp-Y1PHr.cjs');
4
- const require_formatting = require('./formatting-BmbJ5-Uh.cjs');
3
+ const require_client = require('./client-DQ837FXP.cjs');
4
+ const require_formatting = require('./formatting-C-0bHtbh.cjs');
5
5
  const require_issue_helpers = require('./issue-helpers-DbsECZFq.cjs');
6
6
  const require_logging = require('./logging-BEMgC5SA.cjs');
7
7
  const __sentry_core = require_chunk.__toESM(require("@sentry/core"));
@@ -167,31 +167,6 @@ const TOOL_HANDLERS = {
167
167
  output += `- You can reference tags in the \`query\` parameter of various tools: \`tagName:tagValue\`.\n`;
168
168
  return output;
169
169
  },
170
- get_issue_summary: async (context, params) => {
171
- const apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl });
172
- const { organizationSlug: orgSlug, issueId: parsedIssueId } = require_issue_helpers.parseIssueParams({
173
- organizationSlug: params.organizationSlug ?? context.organizationSlug,
174
- issueId: params.issueId,
175
- issueUrl: params.issueUrl
176
- });
177
- (0, __sentry_core.setTag)("organization.slug", orgSlug);
178
- const issue = await apiService.getIssue({
179
- organizationSlug: orgSlug,
180
- issueId: parsedIssueId
181
- });
182
- let output = `# Issue ${issue.shortId} in **${orgSlug}**\n\n`;
183
- output += `**Description**: ${issue.title}\n`;
184
- output += `**Culprit**: ${issue.culprit}\n`;
185
- output += `**First Seen**: ${new Date(issue.firstSeen).toISOString()}\n`;
186
- output += `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}\n`;
187
- output += `**Occurrences**: ${issue.count}\n`;
188
- output += `**Users Impacted**: ${issue.userCount}\n`;
189
- output += `**Status**: ${issue.status}\n`;
190
- output += `**Platform**: ${issue.platform}\n`;
191
- output += `**Project**: ${issue.project.name}\n`;
192
- output += `**URL**: ${apiService.getIssueUrl(orgSlug, issue.shortId)}\n`;
193
- return output;
194
- },
195
170
  get_issue_details: async (context, params) => {
196
171
  const apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl });
197
172
  if (params.eventId) {
@@ -498,4 +473,4 @@ Object.defineProperty(exports, 'TOOL_HANDLERS', {
498
473
  return TOOL_HANDLERS;
499
474
  }
500
475
  });
501
- //# sourceMappingURL=tools-BgrGdS8I.cjs.map
476
+ //# sourceMappingURL=tools-BYt-G6p2.cjs.map