@sentry/mcp-server 0.7.0 → 0.8.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 (178) hide show
  1. package/dist/api-client/client.cjs +2 -2
  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 +2 -2
  5. package/dist/api-client/client.test.cjs +2 -2
  6. package/dist/api-client/client.test.js +2 -2
  7. package/dist/api-client/index.cjs +2 -2
  8. package/dist/api-client/index.d.cts +3 -3
  9. package/dist/api-client/index.d.ts +3 -3
  10. package/dist/api-client/index.js +2 -2
  11. package/dist/api-client/schema.cjs +1 -1
  12. package/dist/api-client/schema.d.cts +1 -1
  13. package/dist/api-client/schema.d.ts +1 -1
  14. package/dist/api-client/schema.js +1 -1
  15. package/dist/api-client/types.d.cts +2 -2
  16. package/dist/api-client/types.d.ts +2 -2
  17. package/dist/{client-7aaWrjcF.d.ts → client-CRlGzHly.d.ts} +7 -7
  18. package/dist/{client-7aaWrjcF.d.ts.map → client-CRlGzHly.d.ts.map} +1 -1
  19. package/dist/{client-D9mOWh6s.js → client-CXUzhM1I.js} +2 -3
  20. package/dist/client-CXUzhM1I.js.map +1 -0
  21. package/dist/{client-CLuQEpjg.cjs → client-Cp-Y1PHr.cjs} +2 -3
  22. package/dist/client-Cp-Y1PHr.cjs.map +1 -0
  23. package/dist/{client-D1qv6QT3.d.cts → client-TjRMJC41.d.cts} +3 -3
  24. package/dist/{client-D1qv6QT3.d.cts.map → client-TjRMJC41.d.cts.map} +1 -1
  25. package/dist/index.cjs +12 -11
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.js +12 -11
  28. package/dist/index.js.map +1 -1
  29. package/dist/internal/formatting.d.cts +3 -3
  30. package/dist/internal/formatting.d.ts +3 -3
  31. package/dist/internal/issue-helpers.cjs +1 -1
  32. package/dist/internal/issue-helpers.d.cts.map +1 -1
  33. package/dist/internal/issue-helpers.d.ts.map +1 -1
  34. package/dist/internal/issue-helpers.js +1 -1
  35. package/dist/internal/issue-helpers.test.cjs +1 -1
  36. package/dist/internal/issue-helpers.test.js +1 -1
  37. package/dist/{issue-helpers-Cx6bFCUv.js → issue-helpers-CyoHu5j4.js} +3 -1
  38. package/dist/issue-helpers-CyoHu5j4.js.map +1 -0
  39. package/dist/{issue-helpers-CdWMhVWJ.cjs → issue-helpers-DbsECZFq.cjs} +3 -1
  40. package/dist/issue-helpers-DbsECZFq.cjs.map +1 -0
  41. package/dist/{promptDefinitions-OnJHLqrZ.cjs → promptDefinitions-5jiZMBg5.cjs} +10 -2
  42. package/dist/promptDefinitions-5jiZMBg5.cjs.map +1 -0
  43. package/dist/promptDefinitions-CPTadtuI.js +24 -0
  44. package/dist/promptDefinitions-CPTadtuI.js.map +1 -0
  45. package/dist/promptDefinitions-Dcz3d9wL.d.cts +26 -0
  46. package/dist/promptDefinitions-Dcz3d9wL.d.cts.map +1 -0
  47. package/dist/promptDefinitions-DrGK-v8n.d.ts +26 -0
  48. package/dist/promptDefinitions-DrGK-v8n.d.ts.map +1 -0
  49. package/dist/promptDefinitions.cjs +2 -2
  50. package/dist/promptDefinitions.d.cts +1 -1
  51. package/dist/promptDefinitions.d.ts +1 -1
  52. package/dist/promptDefinitions.js +2 -2
  53. package/dist/prompts-DgWOD2rU.js +32 -0
  54. package/dist/prompts-DgWOD2rU.js.map +1 -0
  55. package/dist/prompts-nfFU-zY-.cjs +39 -0
  56. package/dist/prompts-nfFU-zY-.cjs.map +1 -0
  57. package/dist/prompts.cjs +1 -1
  58. package/dist/prompts.d.cts +21 -11
  59. package/dist/prompts.d.cts.map +1 -1
  60. package/dist/prompts.d.ts +21 -11
  61. package/dist/prompts.d.ts.map +1 -1
  62. package/dist/prompts.js +1 -1
  63. package/dist/{schema-_xqdSRLo.cjs → schema-BCkBPgjj.cjs} +6 -6
  64. package/dist/schema-BCkBPgjj.cjs.map +1 -0
  65. package/dist/{schema-BnXdl41H.cjs → schema-BuByiEkr.cjs} +5 -2
  66. package/dist/schema-BuByiEkr.cjs.map +1 -0
  67. package/dist/{schema-BnIwkBRb.d.ts → schema-BzLH7LPa.d.ts} +335 -335
  68. package/dist/schema-BzLH7LPa.d.ts.map +1 -0
  69. package/dist/schema-CJrk_GUH.js +15 -0
  70. package/dist/schema-CJrk_GUH.js.map +1 -0
  71. package/dist/{schema-aits0AJg.d.cts → schema-DpID9ztC.d.cts} +351 -351
  72. package/dist/schema-DpID9ztC.d.cts.map +1 -0
  73. package/dist/{schema-BzPfPMq7.js → schema-Drnljuwf.js} +5 -2
  74. package/dist/schema-Drnljuwf.js.map +1 -0
  75. package/dist/schema.cjs +1 -1
  76. package/dist/schema.d.cts.map +1 -1
  77. package/dist/schema.d.ts.map +1 -1
  78. package/dist/schema.js +1 -1
  79. package/dist/{server-0pTMWBNO.js → server-BCmPE_Kt.js} +40 -10
  80. package/dist/server-BCmPE_Kt.js.map +1 -0
  81. package/dist/{server-C9hKLN_c.cjs → server-fYrkDOmy.cjs} +40 -10
  82. package/dist/server-fYrkDOmy.cjs.map +1 -0
  83. package/dist/server.cjs +9 -9
  84. package/dist/server.d.cts +3 -3
  85. package/dist/server.d.cts.map +1 -1
  86. package/dist/server.d.ts +3 -3
  87. package/dist/server.d.ts.map +1 -1
  88. package/dist/server.js +9 -9
  89. package/dist/{stdio-BsM7bvfc.cjs → stdio-BxJq3OU7.cjs} +2 -2
  90. package/dist/{stdio-BsM7bvfc.cjs.map → stdio-BxJq3OU7.cjs.map} +1 -1
  91. package/dist/{stdio-8gK912aj.js → stdio-QBN7-Am6.js} +2 -2
  92. package/dist/{stdio-8gK912aj.js.map → stdio-QBN7-Am6.js.map} +1 -1
  93. package/dist/test-setup.cjs +2 -2
  94. package/dist/test-setup.cjs.map +1 -1
  95. package/dist/test-setup.js +2 -2
  96. package/dist/test-setup.js.map +1 -1
  97. package/dist/{toolDefinitions-CRtHauHJ.cjs → toolDefinitions-1SnflztE.cjs} +12 -12
  98. package/dist/toolDefinitions-1SnflztE.cjs.map +1 -0
  99. package/dist/{toolDefinitions-CfNXEIaX.js → toolDefinitions-D13S3vQE.js} +12 -12
  100. package/dist/toolDefinitions-D13S3vQE.js.map +1 -0
  101. package/dist/{toolDefinitions-abNbVXb5.d.ts → toolDefinitions-DkO9-iEg.d.ts} +3 -3
  102. package/dist/toolDefinitions-DkO9-iEg.d.ts.map +1 -0
  103. package/dist/{toolDefinitions-DPePAe0y.d.cts → toolDefinitions-Z-JGBEIN.d.cts} +3 -3
  104. package/dist/toolDefinitions-Z-JGBEIN.d.cts.map +1 -0
  105. package/dist/toolDefinitions.cjs +2 -2
  106. package/dist/toolDefinitions.d.cts +1 -1
  107. package/dist/toolDefinitions.d.ts +1 -1
  108. package/dist/toolDefinitions.js +2 -2
  109. package/dist/toolDefinitions.test.cjs +2 -2
  110. package/dist/toolDefinitions.test.js +2 -2
  111. package/dist/{tools-2PgtFQ7q.cjs → tools-BgrGdS8I.cjs} +11 -11
  112. package/dist/tools-BgrGdS8I.cjs.map +1 -0
  113. package/dist/{tools-D5yXarBR.js → tools-CnVttgaS.js} +11 -11
  114. package/dist/tools-CnVttgaS.js.map +1 -0
  115. package/dist/tools.cjs +4 -4
  116. package/dist/tools.d.cts +5 -5
  117. package/dist/tools.d.cts.map +1 -1
  118. package/dist/tools.d.ts +8 -8
  119. package/dist/tools.d.ts.map +1 -1
  120. package/dist/tools.js +4 -4
  121. package/dist/tools.test.cjs +12 -12
  122. package/dist/tools.test.cjs.map +1 -1
  123. package/dist/tools.test.js +12 -12
  124. package/dist/tools.test.js.map +1 -1
  125. package/dist/transports/stdio.cjs +10 -10
  126. package/dist/transports/stdio.d.cts +3 -3
  127. package/dist/transports/stdio.d.ts +3 -3
  128. package/dist/transports/stdio.js +10 -10
  129. package/dist/{types-DFKY4nvR.d.cts → types-BO0mZ8vj.d.cts} +7 -6
  130. package/dist/types-BO0mZ8vj.d.cts.map +1 -0
  131. package/dist/{types-Dg6ARePW.d.cts → types-CczA6AH1.d.cts} +2 -2
  132. package/dist/{types-Dg6ARePW.d.cts.map → types-CczA6AH1.d.cts.map} +1 -1
  133. package/dist/{types-X3ot7x0d.d.ts → types-Cis1PiVW.d.ts} +7 -6
  134. package/dist/types-Cis1PiVW.d.ts.map +1 -0
  135. package/dist/{types-RxedZjnY.d.ts → types-X5Epdrlo.d.ts} +2 -2
  136. package/dist/{types-RxedZjnY.d.ts.map → types-X5Epdrlo.d.ts.map} +1 -1
  137. package/dist/types.d.cts +4 -4
  138. package/dist/types.d.ts +4 -4
  139. package/dist/version-DtWIv-x9.js +6 -0
  140. package/dist/{version-psBzsZ8-.js.map → version-DtWIv-x9.js.map} +1 -1
  141. package/dist/{version-B3dZ0aPQ.cjs → version-sY-gY_s6.cjs} +2 -2
  142. package/dist/{version-B3dZ0aPQ.cjs.map → version-sY-gY_s6.cjs.map} +1 -1
  143. package/dist/version.cjs +1 -1
  144. package/dist/version.js +1 -1
  145. package/package.json +5 -5
  146. package/dist/client-CLuQEpjg.cjs.map +0 -1
  147. package/dist/client-D9mOWh6s.js.map +0 -1
  148. package/dist/issue-helpers-CdWMhVWJ.cjs.map +0 -1
  149. package/dist/issue-helpers-Cx6bFCUv.js.map +0 -1
  150. package/dist/promptDefinitions-C85r2wAk.d.ts +0 -15
  151. package/dist/promptDefinitions-C85r2wAk.d.ts.map +0 -1
  152. package/dist/promptDefinitions-C9aGYWZ6.js +0 -16
  153. package/dist/promptDefinitions-C9aGYWZ6.js.map +0 -1
  154. package/dist/promptDefinitions-CkGJr3c4.d.cts +0 -15
  155. package/dist/promptDefinitions-CkGJr3c4.d.cts.map +0 -1
  156. package/dist/promptDefinitions-OnJHLqrZ.cjs.map +0 -1
  157. package/dist/prompts--QCiXmR2.cjs +0 -26
  158. package/dist/prompts--QCiXmR2.cjs.map +0 -1
  159. package/dist/prompts-Tz-qECa0.js +0 -19
  160. package/dist/prompts-Tz-qECa0.js.map +0 -1
  161. package/dist/schema-BnIwkBRb.d.ts.map +0 -1
  162. package/dist/schema-BnXdl41H.cjs.map +0 -1
  163. package/dist/schema-BzPfPMq7.js.map +0 -1
  164. package/dist/schema-_xqdSRLo.cjs.map +0 -1
  165. package/dist/schema-aits0AJg.d.cts.map +0 -1
  166. package/dist/schema-pZrPEvtp.js +0 -15
  167. package/dist/schema-pZrPEvtp.js.map +0 -1
  168. package/dist/server-0pTMWBNO.js.map +0 -1
  169. package/dist/server-C9hKLN_c.cjs.map +0 -1
  170. package/dist/toolDefinitions-CRtHauHJ.cjs.map +0 -1
  171. package/dist/toolDefinitions-CfNXEIaX.js.map +0 -1
  172. package/dist/toolDefinitions-DPePAe0y.d.cts.map +0 -1
  173. package/dist/toolDefinitions-abNbVXb5.d.ts.map +0 -1
  174. package/dist/tools-2PgtFQ7q.cjs.map +0 -1
  175. package/dist/tools-D5yXarBR.js.map +0 -1
  176. package/dist/types-DFKY4nvR.d.cts.map +0 -1
  177. package/dist/types-X3ot7x0d.d.ts.map +0 -1
  178. package/dist/version-psBzsZ8-.js +0 -6
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('./chunk-BtT13l48.cjs');
3
- const require_schema = require('./schema-_xqdSRLo.cjs');
3
+ const require_schema = require('./schema-BCkBPgjj.cjs');
4
4
  const zod = require_chunk.__toESM(require("zod"));
5
5
 
6
6
  //#region src/toolDefinitions.ts
@@ -315,7 +315,7 @@ const TOOL_DEFINITIONS = [
315
315
  paramsSchema: {
316
316
  organizationSlug: require_schema.ParamOrganizationSlug.optional(),
317
317
  regionUrl: require_schema.ParamRegionUrl.optional(),
318
- teamSlug: zod.z.string().describe("The team's slug."),
318
+ teamSlug: zod.z.string().toLowerCase().describe("The team's slug."),
319
319
  name: zod.z.string().describe("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."),
320
320
  platform: require_schema.ParamPlatform.optional()
321
321
  }
@@ -345,7 +345,7 @@ const TOOL_DEFINITIONS = [
345
345
  paramsSchema: {
346
346
  organizationSlug: require_schema.ParamOrganizationSlug.optional(),
347
347
  regionUrl: require_schema.ParamRegionUrl.optional(),
348
- projectSlug: zod.z.string().describe("The project's slug."),
348
+ projectSlug: zod.z.string().toLowerCase().describe("The project's slug."),
349
349
  name: zod.z.string().describe("The name of the DSN to create.")
350
350
  }
351
351
  },
@@ -365,31 +365,31 @@ const TOOL_DEFINITIONS = [
365
365
  paramsSchema: {
366
366
  organizationSlug: require_schema.ParamOrganizationSlug.optional(),
367
367
  regionUrl: require_schema.ParamRegionUrl.optional(),
368
- projectSlug: zod.z.string().describe("The project's slug.")
368
+ projectSlug: zod.z.string().toLowerCase().describe("The project's slug.")
369
369
  }
370
370
  },
371
371
  {
372
- name: "begin_autofix",
372
+ name: "begin_seer_issue_fix",
373
373
  description: [
374
- "Analyze an issue in Sentry, identify a root cause, and suggest a fix for it.",
374
+ "Use Seer to analyze an issue in Sentry, identify a root cause, and suggest a fix for it.",
375
375
  "",
376
376
  "Use this tool when you need to:",
377
377
  "- Determine the root cause of an issue.",
378
378
  "- Generate a plan for fixing an issue.",
379
379
  "- Implement a fix for an issue.",
380
380
  "",
381
- "This operation may take some time, so you should call `get_autofix_status()` to check the status of the analysis after you begin it.",
381
+ "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.",
382
382
  "",
383
383
  "<examples>",
384
384
  "### Analyze and propose a fix for 'ISSUE-123' in Sentry",
385
385
  "",
386
386
  "```",
387
- "begin_autofix(organizationSlug='my-organization', issueId='ISSUE-123')",
387
+ "begin_seer_issue_fix(organizationSlug='my-organization', issueId='ISSUE-123')",
388
388
  "```",
389
389
  "</examples>",
390
390
  "",
391
391
  "<hints>",
392
- "- Always check to see if an autofix is in progress for before calling this tool by using `get_autofix_status()`.",
392
+ "- Always check to see if an issue fix is already in progress for before calling this tool by using `get_seer_issue_fix_status()`.",
393
393
  "- If the user provides the issueUrl, you can ignore the organizationSlug and issueId parameters.",
394
394
  "- If you're uncertain about which organization to query, you should call `list_organizations()` first. This especially important if an issueId is passed.",
395
395
  "</hints>"
@@ -402,7 +402,7 @@ const TOOL_DEFINITIONS = [
402
402
  }
403
403
  },
404
404
  {
405
- name: "get_autofix_status",
405
+ name: "get_seer_issue_fix_status",
406
406
  description: [
407
407
  "Get the status of a root cause analysis for an issue in Sentry.",
408
408
  "",
@@ -414,7 +414,7 @@ const TOOL_DEFINITIONS = [
414
414
  "### Get the status of a fix for the 'ISSUE-123' issue",
415
415
  "",
416
416
  "```",
417
- "get_autofix_status(organizationSlug='my-organization', issueId='ISSUE-123')",
417
+ "get_seer_issue_fix_status(organizationSlug='my-organization', issueId='ISSUE-123')",
418
418
  "```",
419
419
  "",
420
420
  "</examples>",
@@ -440,4 +440,4 @@ Object.defineProperty(exports, 'TOOL_DEFINITIONS', {
440
440
  return TOOL_DEFINITIONS;
441
441
  }
442
442
  });
443
- //# sourceMappingURL=toolDefinitions-CRtHauHJ.cjs.map
443
+ //# sourceMappingURL=toolDefinitions-1SnflztE.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolDefinitions-1SnflztE.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_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 \"<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;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;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;G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ACE,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"}
@@ -1,4 +1,4 @@
1
- import { ParamIssueShortId, ParamOrganizationSlug, ParamPlatform, ParamProjectSlug, ParamQuery, ParamRegionUrl, ParamTransaction } from "./schema-pZrPEvtp.js";
1
+ import { ParamIssueShortId, ParamOrganizationSlug, ParamPlatform, ParamProjectSlug, ParamQuery, ParamRegionUrl, ParamTransaction } from "./schema-CJrk_GUH.js";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/toolDefinitions.ts
@@ -313,7 +313,7 @@ const TOOL_DEFINITIONS = [
313
313
  paramsSchema: {
314
314
  organizationSlug: ParamOrganizationSlug.optional(),
315
315
  regionUrl: ParamRegionUrl.optional(),
316
- teamSlug: z.string().describe("The team's slug."),
316
+ teamSlug: z.string().toLowerCase().describe("The team's slug."),
317
317
  name: z.string().describe("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."),
318
318
  platform: ParamPlatform.optional()
319
319
  }
@@ -343,7 +343,7 @@ const TOOL_DEFINITIONS = [
343
343
  paramsSchema: {
344
344
  organizationSlug: ParamOrganizationSlug.optional(),
345
345
  regionUrl: ParamRegionUrl.optional(),
346
- projectSlug: z.string().describe("The project's slug."),
346
+ projectSlug: z.string().toLowerCase().describe("The project's slug."),
347
347
  name: z.string().describe("The name of the DSN to create.")
348
348
  }
349
349
  },
@@ -363,31 +363,31 @@ const TOOL_DEFINITIONS = [
363
363
  paramsSchema: {
364
364
  organizationSlug: ParamOrganizationSlug.optional(),
365
365
  regionUrl: ParamRegionUrl.optional(),
366
- projectSlug: z.string().describe("The project's slug.")
366
+ projectSlug: z.string().toLowerCase().describe("The project's slug.")
367
367
  }
368
368
  },
369
369
  {
370
- name: "begin_autofix",
370
+ name: "begin_seer_issue_fix",
371
371
  description: [
372
- "Analyze an issue in Sentry, identify a root cause, and suggest a fix for it.",
372
+ "Use Seer to analyze an issue in Sentry, identify a root cause, and suggest a fix for it.",
373
373
  "",
374
374
  "Use this tool when you need to:",
375
375
  "- Determine the root cause of an issue.",
376
376
  "- Generate a plan for fixing an issue.",
377
377
  "- Implement a fix for an issue.",
378
378
  "",
379
- "This operation may take some time, so you should call `get_autofix_status()` to check the status of the analysis after you begin it.",
379
+ "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.",
380
380
  "",
381
381
  "<examples>",
382
382
  "### Analyze and propose a fix for 'ISSUE-123' in Sentry",
383
383
  "",
384
384
  "```",
385
- "begin_autofix(organizationSlug='my-organization', issueId='ISSUE-123')",
385
+ "begin_seer_issue_fix(organizationSlug='my-organization', issueId='ISSUE-123')",
386
386
  "```",
387
387
  "</examples>",
388
388
  "",
389
389
  "<hints>",
390
- "- Always check to see if an autofix is in progress for before calling this tool by using `get_autofix_status()`.",
390
+ "- Always check to see if an issue fix is already in progress for before calling this tool by using `get_seer_issue_fix_status()`.",
391
391
  "- If the user provides the issueUrl, you can ignore the organizationSlug and issueId parameters.",
392
392
  "- If you're uncertain about which organization to query, you should call `list_organizations()` first. This especially important if an issueId is passed.",
393
393
  "</hints>"
@@ -400,7 +400,7 @@ const TOOL_DEFINITIONS = [
400
400
  }
401
401
  },
402
402
  {
403
- name: "get_autofix_status",
403
+ name: "get_seer_issue_fix_status",
404
404
  description: [
405
405
  "Get the status of a root cause analysis for an issue in Sentry.",
406
406
  "",
@@ -412,7 +412,7 @@ const TOOL_DEFINITIONS = [
412
412
  "### Get the status of a fix for the 'ISSUE-123' issue",
413
413
  "",
414
414
  "```",
415
- "get_autofix_status(organizationSlug='my-organization', issueId='ISSUE-123')",
415
+ "get_seer_issue_fix_status(organizationSlug='my-organization', issueId='ISSUE-123')",
416
416
  "```",
417
417
  "",
418
418
  "</examples>",
@@ -433,4 +433,4 @@ const TOOL_DEFINITIONS = [
433
433
 
434
434
  //#endregion
435
435
  export { TOOL_DEFINITIONS };
436
- //# sourceMappingURL=toolDefinitions-CfNXEIaX.js.map
436
+ //# sourceMappingURL=toolDefinitions-D13S3vQE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolDefinitions-D13S3vQE.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 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 \"<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,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;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GAEA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;EACZ,cAAc;GACZ,kBAAkB,sBAAsB,UAAU;GAClD,WAAW,eAAe,UAAU;GACpC,SAAS,kBAAkB,UAAU;GACrC,SAAS,EAAE,QAAQ,CAAC,SAAS,uBAAuB,CAAC,UAAU;GAC/D,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,aAAa,CAAC,SAAS,mBAAmB;GAC/D,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,aAAa,CAAC,SAAS,sBAAsB;GACrE,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,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,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"}
@@ -240,7 +240,7 @@ declare const TOOL_DEFINITIONS: ({
240
240
  platform?: undefined;
241
241
  };
242
242
  } | {
243
- name: "begin_autofix";
243
+ name: "begin_seer_issue_fix";
244
244
  description: string;
245
245
  paramsSchema: {
246
246
  organizationSlug: z.ZodOptional<z.ZodString>;
@@ -258,7 +258,7 @@ declare const TOOL_DEFINITIONS: ({
258
258
  platform?: undefined;
259
259
  };
260
260
  } | {
261
- name: "get_autofix_status";
261
+ name: "get_seer_issue_fix_status";
262
262
  description: string;
263
263
  paramsSchema: {
264
264
  organizationSlug: z.ZodOptional<z.ZodString>;
@@ -279,4 +279,4 @@ declare const TOOL_DEFINITIONS: ({
279
279
 
280
280
  //# sourceMappingURL=toolDefinitions.d.ts.map
281
281
  export { TOOL_DEFINITIONS as TOOL_DEFINITIONS$1 };
282
- //# sourceMappingURL=toolDefinitions-abNbVXb5.d.ts.map
282
+ //# sourceMappingURL=toolDefinitions-DkO9-iEg.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolDefinitions-DkO9-iEg.d.ts","names":[],"sources":["../src/toolDefinitions.ts"],"sourcesContent":null,"mappings":";;;cAaa;;EAAA,WAAA,EAAA,MA+cZ;EAAA,YAAA,CAAA,EAAA,SAAA;CAAA,GAAA;;;;oCAAA,CAAA,CAAA"}
@@ -240,7 +240,7 @@ declare const TOOL_DEFINITIONS: ({
240
240
  platform?: undefined;
241
241
  };
242
242
  } | {
243
- name: "begin_autofix";
243
+ name: "begin_seer_issue_fix";
244
244
  description: string;
245
245
  paramsSchema: {
246
246
  organizationSlug: z.ZodOptional<z.ZodString>;
@@ -258,7 +258,7 @@ declare const TOOL_DEFINITIONS: ({
258
258
  platform?: undefined;
259
259
  };
260
260
  } | {
261
- name: "get_autofix_status";
261
+ name: "get_seer_issue_fix_status";
262
262
  description: string;
263
263
  paramsSchema: {
264
264
  organizationSlug: z.ZodOptional<z.ZodString>;
@@ -279,4 +279,4 @@ declare const TOOL_DEFINITIONS: ({
279
279
 
280
280
  //# sourceMappingURL=toolDefinitions.d.ts.map
281
281
  export { TOOL_DEFINITIONS };
282
- //# sourceMappingURL=toolDefinitions-DPePAe0y.d.cts.map
282
+ //# sourceMappingURL=toolDefinitions-Z-JGBEIN.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolDefinitions-Z-JGBEIN.d.cts","names":[],"sources":["../src/toolDefinitions.ts"],"sourcesContent":null,"mappings":";;;cAaa;;EAAA,WAAA,EAAA,MA+cZ;EAAA,YAAA,CAAA,EAAA,SAAA;CAAA,GAAA;;;;oCAAA,CAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- require('./schema-_xqdSRLo.cjs');
2
- const require_toolDefinitions = require('./toolDefinitions-CRtHauHJ.cjs');
1
+ require('./schema-BCkBPgjj.cjs');
2
+ const require_toolDefinitions = require('./toolDefinitions-1SnflztE.cjs');
3
3
 
4
4
  exports.TOOL_DEFINITIONS = require_toolDefinitions.TOOL_DEFINITIONS
@@ -1,2 +1,2 @@
1
- import { TOOL_DEFINITIONS } from "./toolDefinitions-DPePAe0y.cjs";
1
+ import { TOOL_DEFINITIONS } from "./toolDefinitions-Z-JGBEIN.cjs";
2
2
  export { TOOL_DEFINITIONS };
@@ -1,2 +1,2 @@
1
- import { TOOL_DEFINITIONS$1 as TOOL_DEFINITIONS } from "./toolDefinitions-abNbVXb5.js";
1
+ import { TOOL_DEFINITIONS$1 as TOOL_DEFINITIONS } from "./toolDefinitions-DkO9-iEg.js";
2
2
  export { TOOL_DEFINITIONS };
@@ -1,4 +1,4 @@
1
- import "./schema-pZrPEvtp.js";
2
- import { TOOL_DEFINITIONS } from "./toolDefinitions-CfNXEIaX.js";
1
+ import "./schema-CJrk_GUH.js";
2
+ import { TOOL_DEFINITIONS } from "./toolDefinitions-D13S3vQE.js";
3
3
 
4
4
  export { TOOL_DEFINITIONS };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
- require('./schema-_xqdSRLo.cjs');
3
- const require_toolDefinitions = require('./toolDefinitions-CRtHauHJ.cjs');
2
+ require('./schema-BCkBPgjj.cjs');
3
+ const require_toolDefinitions = require('./toolDefinitions-1SnflztE.cjs');
4
4
  const require_dist = require('./dist-wiyJYfAH.cjs');
5
5
 
6
6
  //#region src/toolDefinitions.test.ts
@@ -1,5 +1,5 @@
1
- import "./schema-pZrPEvtp.js";
2
- import { TOOL_DEFINITIONS } from "./toolDefinitions-CfNXEIaX.js";
1
+ import "./schema-CJrk_GUH.js";
2
+ import { TOOL_DEFINITIONS } from "./toolDefinitions-D13S3vQE.js";
3
3
  import { assert, test } from "./dist-BKh-M1A1.js";
4
4
 
5
5
  //#region src/toolDefinitions.test.ts
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
  const require_chunk = require('./chunk-BtT13l48.cjs');
3
- const require_client = require('./client-CLuQEpjg.cjs');
3
+ const require_client = require('./client-Cp-Y1PHr.cjs');
4
4
  const require_formatting = require('./formatting-BmbJ5-Uh.cjs');
5
- const require_issue_helpers = require('./issue-helpers-CdWMhVWJ.cjs');
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"));
8
8
 
9
9
  //#region src/tools.ts
10
10
  function apiServiceFromContext(context, opts = {}) {
11
11
  return new require_client.SentryApiService({
12
- host: opts.regionUrl || context.host,
12
+ host: opts.regionUrl ? new URL(opts.regionUrl).host : context.host,
13
13
  accessToken: context.accessToken
14
14
  });
15
15
  }
@@ -400,7 +400,7 @@ const TOOL_HANDLERS = {
400
400
  output += "- The `SENTRY_DSN` value is a URL that you can use to initialize Sentry's SDKs.\n";
401
401
  return output;
402
402
  },
403
- begin_autofix: async (context, params) => {
403
+ begin_seer_issue_fix: async (context, params) => {
404
404
  const apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl });
405
405
  const { organizationSlug: orgSlug, issueId: parsedIssueId } = require_issue_helpers.parseIssueParams({
406
406
  organizationSlug: params.organizationSlug ?? context.organizationSlug,
@@ -413,20 +413,20 @@ const TOOL_HANDLERS = {
413
413
  issueId: parsedIssueId
414
414
  });
415
415
  return [
416
- `# Autofix Started for Issue ${parsedIssueId}`,
416
+ `# Issue Fix Started for Issue ${parsedIssueId}`,
417
417
  "",
418
418
  `**Run ID:**: ${data.run_id}`,
419
419
  "",
420
- "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.",
420
+ "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.",
421
421
  "",
422
422
  "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..",
423
423
  "",
424
424
  "```",
425
- params.issueUrl ? `get_autofix_status(issueUrl="${params.issueUrl}")` : `get_autofix_status(organizationSlug="${orgSlug}", issueId="${parsedIssueId}")`,
425
+ params.issueUrl ? `get_seer_issue_fix_status(issueUrl="${params.issueUrl}")` : `get_seer_issue_fix_status(organizationSlug="${orgSlug}", issueId="${parsedIssueId}")`,
426
426
  "```"
427
427
  ].join("\n");
428
428
  },
429
- get_autofix_status: async (context, params) => {
429
+ get_seer_issue_fix_status: async (context, params) => {
430
430
  const apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl });
431
431
  const { organizationSlug: orgSlug, issueId: parsedIssueId } = require_issue_helpers.parseIssueParams({
432
432
  organizationSlug: params.organizationSlug ?? context.organizationSlug,
@@ -438,9 +438,9 @@ const TOOL_HANDLERS = {
438
438
  organizationSlug: orgSlug,
439
439
  issueId: parsedIssueId
440
440
  });
441
- let output = `# Autofix Status for Issue ${parsedIssueId}\n\n`;
441
+ let output = `# Issue Fix Status for Issue ${parsedIssueId}\n\n`;
442
442
  if (!autofix) {
443
- output += `No autofix run found for ${parsedIssueId}.\n\nYou can initiate a new autofix run using the \`begin_autofix\` tool.`;
443
+ output += `No issue fix process found for ${parsedIssueId}.\n\nYou can initiate a new issue fix execution using the \`begin_seer_issue_fix\` tool.`;
444
444
  return output;
445
445
  }
446
446
  for (const step of autofix.steps) {
@@ -498,4 +498,4 @@ Object.defineProperty(exports, 'TOOL_HANDLERS', {
498
498
  return TOOL_HANDLERS;
499
499
  }
500
500
  });
501
- //# sourceMappingURL=tools-2PgtFQ7q.cjs.map
501
+ //# sourceMappingURL=tools-BgrGdS8I.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools-BgrGdS8I.cjs","names":["context: ServerContext","opts: { regionUrl?: string }","SentryApiService","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_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 setTag(\"organization.slug\", orgSlug);\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\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,IAAIC,gCAAiB;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,kBAAkB,IAAI,MAAM,UAAU;EACxC,EAAC,KAAK,KAAK,CACb,CACA,KAAK,OAAO;AAEf,YAAU;AACV,aAAW;AACX,aAAW;AAEX,SAAO;CACR;CACD,YAAY,OAAO,SAAS,WAAW;EACrC,MAAM,aAAa,sB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