@sentry/mcp-server 0.12.0 → 0.14.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 (570) hide show
  1. package/README.md +19 -4
  2. package/dist/analyze-issue-with-seer-BsNarzJN.js +163 -0
  3. package/dist/analyze-issue-with-seer-BsNarzJN.js.map +1 -0
  4. package/dist/analyze-issue-with-seer-DbAWpyTC.cjs +169 -0
  5. package/dist/analyze-issue-with-seer-DbAWpyTC.cjs.map +1 -0
  6. package/dist/api-client/client.cjs +2 -2
  7. package/dist/api-client/client.d.cts +3 -3
  8. package/dist/api-client/client.d.ts +3 -3
  9. package/dist/api-client/client.js +2 -2
  10. package/dist/api-client/index.cjs +9 -2
  11. package/dist/api-client/index.d.cts +4 -4
  12. package/dist/api-client/index.d.ts +5 -5
  13. package/dist/api-client/index.js +5 -5
  14. package/dist/api-client/schema.cjs +8 -1
  15. package/dist/api-client/schema.d.cts +2 -2
  16. package/dist/api-client/schema.d.ts +2 -2
  17. package/dist/api-client/schema.js +2 -2
  18. package/dist/api-client/types.d.cts +3 -3
  19. package/dist/api-client/types.d.ts +3 -3
  20. package/dist/api-client/types.js +1 -1
  21. package/dist/api-utils-C6QJAzFL.js +31 -0
  22. package/dist/api-utils-C6QJAzFL.js.map +1 -0
  23. package/dist/api-utils-d36iteNO.cjs +36 -0
  24. package/dist/api-utils-d36iteNO.cjs.map +1 -0
  25. package/dist/{client-4jq_wVgn.d.ts → client-BCN17Wbp.d.ts} +43 -11
  26. package/dist/client-BCN17Wbp.d.ts.map +1 -0
  27. package/dist/{client-DkY0ifZf.d.cts → client-CILwfx6G.d.cts} +43 -11
  28. package/dist/client-CILwfx6G.d.cts.map +1 -0
  29. package/dist/{client-CAoHZbyK.js → client-DOYWNvVM.js} +75 -18
  30. package/dist/client-DOYWNvVM.js.map +1 -0
  31. package/dist/{client-B7vZ6JMk.cjs → client-Dkw5iYu3.cjs} +75 -18
  32. package/dist/client-Dkw5iYu3.cjs.map +1 -0
  33. package/dist/constants-ClkMK29-.cjs +182 -0
  34. package/dist/constants-ClkMK29-.cjs.map +1 -0
  35. package/dist/constants-S7AU45oQ.js +164 -0
  36. package/dist/constants-S7AU45oQ.js.map +1 -0
  37. package/dist/constants.cjs +5 -0
  38. package/dist/constants.d.cts +23 -0
  39. package/dist/constants.d.cts.map +1 -0
  40. package/dist/constants.d.ts +23 -0
  41. package/dist/constants.d.ts.map +1 -0
  42. package/dist/constants.js +3 -0
  43. package/dist/create-dsn-CDcL2DLD.js +59 -0
  44. package/dist/create-dsn-CDcL2DLD.js.map +1 -0
  45. package/dist/create-dsn-fESUtX3R.cjs +65 -0
  46. package/dist/create-dsn-fESUtX3R.cjs.map +1 -0
  47. package/dist/create-project-Bg5uDkc4.cjs +82 -0
  48. package/dist/create-project-Bg5uDkc4.cjs.map +1 -0
  49. package/dist/create-project-DY5mFznV.js +76 -0
  50. package/dist/create-project-DY5mFznV.js.map +1 -0
  51. package/dist/create-team-5purh64V.cjs +53 -0
  52. package/dist/create-team-5purh64V.cjs.map +1 -0
  53. package/dist/create-team-C2R7EUC3.js +47 -0
  54. package/dist/create-team-C2R7EUC3.js.map +1 -0
  55. package/dist/defineTool-77H4nSna.js +8 -0
  56. package/dist/defineTool-77H4nSna.js.map +1 -0
  57. package/dist/defineTool-lWNTzWl_.cjs +14 -0
  58. package/dist/defineTool-lWNTzWl_.cjs.map +1 -0
  59. package/dist/{errors-BJSrT6Ou.js → errors-CIoxzIug.js} +1 -1
  60. package/dist/{errors-BJSrT6Ou.js.map → errors-CIoxzIug.js.map} +1 -1
  61. package/dist/{errors-B9fwS-aP.cjs → errors-YmiXLOyx.cjs} +1 -1
  62. package/dist/{errors-B9fwS-aP.cjs.map → errors-YmiXLOyx.cjs.map} +1 -1
  63. package/dist/errors.cjs +1 -1
  64. package/dist/errors.js +1 -1
  65. package/dist/fetch-utils-BMKjO-cc.js +29 -0
  66. package/dist/fetch-utils-BMKjO-cc.js.map +1 -0
  67. package/dist/fetch-utils-Bv9WjUp0.d.ts +14 -0
  68. package/dist/fetch-utils-Bv9WjUp0.d.ts.map +1 -0
  69. package/dist/fetch-utils-DlPjrSk2.js +0 -0
  70. package/dist/fetch-utils-DzdRW4Yd.d.cts +14 -0
  71. package/dist/fetch-utils-DzdRW4Yd.d.cts.map +1 -0
  72. package/dist/fetch-utils-oab6uNp3.cjs +35 -0
  73. package/dist/fetch-utils-oab6uNp3.cjs.map +1 -0
  74. package/dist/find-dsns-CvfcLB9Z.js +52 -0
  75. package/dist/find-dsns-CvfcLB9Z.js.map +1 -0
  76. package/dist/find-dsns-ZZ-thiNk.cjs +58 -0
  77. package/dist/find-dsns-ZZ-thiNk.cjs.map +1 -0
  78. package/dist/find-errors-CuRm4PzL.js +91 -0
  79. package/dist/find-errors-CuRm4PzL.js.map +1 -0
  80. package/dist/find-errors-Drzv7hzM.cjs +97 -0
  81. package/dist/find-errors-Drzv7hzM.cjs.map +1 -0
  82. package/dist/find-issues-C3uk59rn.cjs +98 -0
  83. package/dist/find-issues-C3uk59rn.cjs.map +1 -0
  84. package/dist/find-issues-CAtNGBly.js +92 -0
  85. package/dist/find-issues-CAtNGBly.js.map +1 -0
  86. package/dist/find-organizations-BrdMfZRO.cjs +50 -0
  87. package/dist/find-organizations-BrdMfZRO.cjs.map +1 -0
  88. package/dist/find-organizations-ojXwWWzk.js +45 -0
  89. package/dist/find-organizations-ojXwWWzk.js.map +1 -0
  90. package/dist/find-projects-BZWhlYJh.cjs +45 -0
  91. package/dist/find-projects-BZWhlYJh.cjs.map +1 -0
  92. package/dist/find-projects-fcLG4KpT.js +39 -0
  93. package/dist/find-projects-fcLG4KpT.js.map +1 -0
  94. package/dist/find-releases-BUozr0Z-.js +93 -0
  95. package/dist/find-releases-BUozr0Z-.js.map +1 -0
  96. package/dist/find-releases-CZCVEOHZ.cjs +99 -0
  97. package/dist/find-releases-CZCVEOHZ.cjs.map +1 -0
  98. package/dist/find-tags-Byk4d3oZ.cjs +45 -0
  99. package/dist/find-tags-Byk4d3oZ.cjs.map +1 -0
  100. package/dist/find-tags-d-wF1Se8.js +39 -0
  101. package/dist/find-tags-d-wF1Se8.js.map +1 -0
  102. package/dist/find-teams-BZ118EIK.js +39 -0
  103. package/dist/find-teams-BZ118EIK.js.map +1 -0
  104. package/dist/find-teams-CnU5x9rQ.cjs +45 -0
  105. package/dist/find-teams-CnU5x9rQ.cjs.map +1 -0
  106. package/dist/find-transactions-DIJ80wkd.cjs +89 -0
  107. package/dist/find-transactions-DIJ80wkd.cjs.map +1 -0
  108. package/dist/find-transactions-DZCj81jP.js +83 -0
  109. package/dist/find-transactions-DZCj81jP.js.map +1 -0
  110. package/dist/formatting-BlMiQa9i.cjs +388 -0
  111. package/dist/formatting-BlMiQa9i.cjs.map +1 -0
  112. package/dist/formatting-CHh9Q_OW.d.cts +47 -0
  113. package/dist/formatting-CHh9Q_OW.d.cts.map +1 -0
  114. package/dist/formatting-kdIeURER.d.ts +47 -0
  115. package/dist/formatting-kdIeURER.d.ts.map +1 -0
  116. package/dist/formatting-pUm38KOj.js +370 -0
  117. package/dist/formatting-pUm38KOj.js.map +1 -0
  118. package/dist/formatting-utils-C3sej5ER.js +14 -0
  119. package/dist/formatting-utils-C3sej5ER.js.map +1 -0
  120. package/dist/formatting-utils-DDz14xeB.cjs +20 -0
  121. package/dist/formatting-utils-DDz14xeB.cjs.map +1 -0
  122. package/dist/get-doc-DaTCenOE.cjs +86 -0
  123. package/dist/get-doc-DaTCenOE.cjs.map +1 -0
  124. package/dist/get-doc-YTiQznr1.js +80 -0
  125. package/dist/get-doc-YTiQznr1.js.map +1 -0
  126. package/dist/get-event-attachment-ChRw3jlQ.cjs +144 -0
  127. package/dist/get-event-attachment-ChRw3jlQ.cjs.map +1 -0
  128. package/dist/get-event-attachment-CuU-_5T6.js +138 -0
  129. package/dist/get-event-attachment-CuU-_5T6.js.map +1 -0
  130. package/dist/get-issue-details-CxChU4U9.js +104 -0
  131. package/dist/get-issue-details-CxChU4U9.js.map +1 -0
  132. package/dist/get-issue-details-DFwZRbmU.cjs +110 -0
  133. package/dist/get-issue-details-DFwZRbmU.cjs.map +1 -0
  134. package/dist/index.cjs +73 -23
  135. package/dist/index.cjs.map +1 -1
  136. package/dist/index.js +75 -25
  137. package/dist/index.js.map +1 -1
  138. package/dist/internal/fetch-utils.cjs +3 -0
  139. package/dist/internal/fetch-utils.d.cts +2 -0
  140. package/dist/internal/fetch-utils.d.ts +2 -0
  141. package/dist/internal/fetch-utils.js +3 -0
  142. package/dist/internal/formatting.cjs +1 -1
  143. package/dist/internal/formatting.d.cts +5 -25
  144. package/dist/internal/formatting.d.ts +6 -26
  145. package/dist/internal/formatting.js +1 -1
  146. package/dist/internal/issue-helpers.cjs +1 -1
  147. package/dist/internal/issue-helpers.d.cts +2 -52
  148. package/dist/internal/issue-helpers.d.ts +2 -52
  149. package/dist/internal/issue-helpers.js +1 -1
  150. package/dist/internal/test-fixtures.cjs +214 -0
  151. package/dist/internal/test-fixtures.cjs.map +1 -0
  152. package/dist/internal/test-fixtures.d.cts +2138 -0
  153. package/dist/internal/test-fixtures.d.cts.map +1 -0
  154. package/dist/internal/test-fixtures.d.ts +2138 -0
  155. package/dist/internal/test-fixtures.d.ts.map +1 -0
  156. package/dist/internal/test-fixtures.js +205 -0
  157. package/dist/internal/test-fixtures.js.map +1 -0
  158. package/dist/issue-helpers-BJffpNoO.d.ts +52 -0
  159. package/dist/issue-helpers-BJffpNoO.d.ts.map +1 -0
  160. package/dist/{issue-helpers-BMVLc3mR.js → issue-helpers-CqqYnwYE.js} +1 -1
  161. package/dist/{issue-helpers-BMVLc3mR.js.map → issue-helpers-CqqYnwYE.js.map} +1 -1
  162. package/dist/issue-helpers-Cz01Ipvl.d.cts +52 -0
  163. package/dist/issue-helpers-Cz01Ipvl.d.cts.map +1 -0
  164. package/dist/{issue-helpers-D712fGT2.cjs → issue-helpers-DyAIO0w6.cjs} +1 -1
  165. package/dist/{issue-helpers-D712fGT2.cjs.map → issue-helpers-DyAIO0w6.cjs.map} +1 -1
  166. package/dist/issue-utils-BVAB6I-Z.js +0 -0
  167. package/dist/issue-utils-pdbo-5LW.cjs +0 -0
  168. package/dist/{logging-CXLD0FFB.js → logging-LnQMFw-_.js} +1 -1
  169. package/dist/{logging-CXLD0FFB.js.map → logging-LnQMFw-_.js.map} +1 -1
  170. package/dist/{logging-ByvSjT6V.cjs → logging-oIouXrcb.cjs} +1 -1
  171. package/dist/{logging-ByvSjT6V.cjs.map → logging-oIouXrcb.cjs.map} +1 -1
  172. package/dist/logging.cjs +1 -1
  173. package/dist/logging.js +1 -1
  174. package/dist/{promptDefinitions-BTLIBcGt.cjs → promptDefinitions-C29BWGYg.cjs} +4 -4
  175. package/dist/promptDefinitions-C29BWGYg.cjs.map +1 -0
  176. package/dist/{promptDefinitions-D8yow1m0.js → promptDefinitions-CSKE8T0a.js} +4 -4
  177. package/dist/{promptDefinitions-D8yow1m0.js.map → promptDefinitions-CSKE8T0a.js.map} +1 -1
  178. package/dist/{promptDefinitions-CF2VWdQ6.d.cts → promptDefinitions-CVHtYaj8.d.cts} +3 -3
  179. package/dist/promptDefinitions-CVHtYaj8.d.cts.map +1 -0
  180. package/dist/{promptDefinitions-D5FSQckL.d.ts → promptDefinitions-D3GTBGLr.d.ts} +3 -3
  181. package/dist/promptDefinitions-D3GTBGLr.d.ts.map +1 -0
  182. package/dist/promptDefinitions.cjs +3 -2
  183. package/dist/promptDefinitions.d.cts +1 -1
  184. package/dist/promptDefinitions.d.ts +1 -1
  185. package/dist/promptDefinitions.js +3 -2
  186. package/dist/{prompts-Dt3A8Qfl.js → prompts-C8Y9w5c4.js} +7 -7
  187. package/dist/{prompts-Dt3A8Qfl.js.map → prompts-C8Y9w5c4.js.map} +1 -1
  188. package/dist/{prompts-CDbQrutV.cjs → prompts-Df3i1XSB.cjs} +7 -7
  189. package/dist/{prompts-CDbQrutV.cjs.map → prompts-Df3i1XSB.cjs.map} +1 -1
  190. package/dist/prompts.cjs +2 -2
  191. package/dist/prompts.d.cts +4 -5
  192. package/dist/prompts.d.cts.map +1 -1
  193. package/dist/prompts.d.ts +4 -5
  194. package/dist/prompts.d.ts.map +1 -1
  195. package/dist/prompts.js +2 -2
  196. package/dist/resources-BHF8a1ZB.js +92 -0
  197. package/dist/resources-BHF8a1ZB.js.map +1 -0
  198. package/dist/resources-BM_YQGcb.cjs +104 -0
  199. package/dist/resources-BM_YQGcb.cjs.map +1 -0
  200. package/dist/resources.cjs +5 -2
  201. package/dist/resources.d.cts +26 -12
  202. package/dist/resources.d.cts.map +1 -1
  203. package/dist/resources.d.ts +26 -12
  204. package/dist/resources.d.ts.map +1 -1
  205. package/dist/resources.js +4 -2
  206. package/dist/{schema-BnxGHL_i.d.ts → schema--5m4KI84.d.ts} +3678 -619
  207. package/dist/schema--5m4KI84.d.ts.map +1 -0
  208. package/dist/{schema-BsvGMALe.cjs → schema-B_cMyyJJ.cjs} +94 -8
  209. package/dist/schema-B_cMyyJJ.cjs.map +1 -0
  210. package/dist/{schema-BTfISwFu.cjs → schema-BpJVmev8.cjs} +23 -1
  211. package/dist/{schema-Dv6aLZgz.js.map → schema-BpJVmev8.cjs.map} +1 -1
  212. package/dist/{schema-Dv6aLZgz.js → schema-DtsnsxMl.js} +6 -2
  213. package/dist/schema-DtsnsxMl.js.map +1 -0
  214. package/dist/{schema-C_hp0BR7.js → schema-WDk5Yqww.js} +53 -9
  215. package/dist/schema-WDk5Yqww.js.map +1 -0
  216. package/dist/{schema-BJv7kREf.d.cts → schema-ya35hkEL.d.cts} +3614 -555
  217. package/dist/schema-ya35hkEL.d.cts.map +1 -0
  218. package/dist/schema.cjs +5 -1
  219. package/dist/schema.d.cts +4 -1
  220. package/dist/schema.d.cts.map +1 -1
  221. package/dist/schema.d.ts +4 -1
  222. package/dist/schema.d.ts.map +1 -1
  223. package/dist/schema.js +3 -2
  224. package/dist/search-docs-BLbB_GV2.js +102 -0
  225. package/dist/search-docs-BLbB_GV2.js.map +1 -0
  226. package/dist/search-docs-D5Foht_0.cjs +108 -0
  227. package/dist/search-docs-D5Foht_0.cjs.map +1 -0
  228. package/dist/seer-utils-Ckr8nYlz.js +87 -0
  229. package/dist/seer-utils-Ckr8nYlz.js.map +1 -0
  230. package/dist/seer-utils-CzYEEZb2.cjs +129 -0
  231. package/dist/seer-utils-CzYEEZb2.cjs.map +1 -0
  232. package/dist/{server-DeutbO8v.cjs → server-BpEIZVaZ.cjs} +104 -57
  233. package/dist/server-BpEIZVaZ.cjs.map +1 -0
  234. package/dist/{server-C7cHq_pc.js → server-DOy-M9Ko.js} +104 -57
  235. package/dist/server-DOy-M9Ko.js.map +1 -0
  236. package/dist/server.cjs +40 -13
  237. package/dist/server.d.cts +2 -3
  238. package/dist/server.d.cts.map +1 -1
  239. package/dist/server.d.ts +2 -3
  240. package/dist/server.d.ts.map +1 -1
  241. package/dist/server.js +42 -15
  242. package/dist/{stdio-ZQLC-i5Q.js → stdio-B2NDq7Ax.js} +17 -7
  243. package/dist/stdio-B2NDq7Ax.js.map +1 -0
  244. package/dist/{stdio-B73CCTly.cjs → stdio-DMEgJ_fG.cjs} +17 -7
  245. package/dist/stdio-DMEgJ_fG.cjs.map +1 -0
  246. package/dist/test-setup.cjs +1420 -1230
  247. package/dist/test-setup.cjs.map +1 -1
  248. package/dist/test-setup.js +1262 -1045
  249. package/dist/test-setup.js.map +1 -1
  250. package/dist/toolDefinitions.d.ts +25 -2
  251. package/dist/toolDefinitions.js +1059 -4
  252. package/dist/tools/analyze-issue-with-seer.cjs +16 -0
  253. package/dist/tools/analyze-issue-with-seer.d.cts +16 -0
  254. package/dist/tools/analyze-issue-with-seer.d.cts.map +1 -0
  255. package/dist/tools/analyze-issue-with-seer.d.ts +16 -0
  256. package/dist/tools/analyze-issue-with-seer.d.ts.map +1 -0
  257. package/dist/tools/analyze-issue-with-seer.js +16 -0
  258. package/dist/tools/create-dsn.cjs +12 -0
  259. package/dist/tools/create-dsn.d.cts +15 -0
  260. package/dist/tools/create-dsn.d.cts.map +1 -0
  261. package/dist/tools/create-dsn.d.ts +15 -0
  262. package/dist/tools/create-dsn.d.ts.map +1 -0
  263. package/dist/tools/create-dsn.js +12 -0
  264. package/dist/tools/create-project.cjs +13 -0
  265. package/dist/tools/create-project.d.cts +16 -0
  266. package/dist/tools/create-project.d.cts.map +1 -0
  267. package/dist/tools/create-project.d.ts +16 -0
  268. package/dist/tools/create-project.d.ts.map +1 -0
  269. package/dist/tools/create-project.js +13 -0
  270. package/dist/tools/create-team.cjs +12 -0
  271. package/dist/tools/create-team.d.cts +14 -0
  272. package/dist/tools/create-team.d.cts.map +1 -0
  273. package/dist/tools/create-team.d.ts +14 -0
  274. package/dist/tools/create-team.d.ts.map +1 -0
  275. package/dist/tools/create-team.js +12 -0
  276. package/dist/tools/find-dsns.cjs +12 -0
  277. package/dist/tools/find-dsns.d.cts +14 -0
  278. package/dist/tools/find-dsns.d.cts.map +1 -0
  279. package/dist/tools/find-dsns.d.ts +14 -0
  280. package/dist/tools/find-dsns.d.ts.map +1 -0
  281. package/dist/tools/find-dsns.js +12 -0
  282. package/dist/tools/find-errors.cjs +12 -0
  283. package/dist/tools/find-errors.d.cts +18 -0
  284. package/dist/tools/find-errors.d.cts.map +1 -0
  285. package/dist/tools/find-errors.d.ts +18 -0
  286. package/dist/tools/find-errors.d.ts.map +1 -0
  287. package/dist/tools/find-errors.js +12 -0
  288. package/dist/tools/find-issues.cjs +12 -0
  289. package/dist/tools/find-issues.d.cts +16 -0
  290. package/dist/tools/find-issues.d.cts.map +1 -0
  291. package/dist/tools/find-issues.d.ts +16 -0
  292. package/dist/tools/find-issues.d.ts.map +1 -0
  293. package/dist/tools/find-issues.js +12 -0
  294. package/dist/tools/find-organizations.cjs +10 -0
  295. package/dist/tools/find-organizations.d.cts +9 -0
  296. package/dist/tools/find-organizations.d.cts.map +1 -0
  297. package/dist/tools/find-organizations.d.ts +9 -0
  298. package/dist/tools/find-organizations.d.ts.map +1 -0
  299. package/dist/tools/find-organizations.js +10 -0
  300. package/dist/tools/find-projects.cjs +12 -0
  301. package/dist/tools/find-projects.d.cts +13 -0
  302. package/dist/tools/find-projects.d.cts.map +1 -0
  303. package/dist/tools/find-projects.d.ts +13 -0
  304. package/dist/tools/find-projects.d.ts.map +1 -0
  305. package/dist/tools/find-projects.js +12 -0
  306. package/dist/tools/find-releases.cjs +12 -0
  307. package/dist/tools/find-releases.d.cts +15 -0
  308. package/dist/tools/find-releases.d.cts.map +1 -0
  309. package/dist/tools/find-releases.d.ts +15 -0
  310. package/dist/tools/find-releases.d.ts.map +1 -0
  311. package/dist/tools/find-releases.js +12 -0
  312. package/dist/tools/find-tags.cjs +12 -0
  313. package/dist/tools/find-tags.d.cts +13 -0
  314. package/dist/tools/find-tags.d.cts.map +1 -0
  315. package/dist/tools/find-tags.d.ts +13 -0
  316. package/dist/tools/find-tags.d.ts.map +1 -0
  317. package/dist/tools/find-tags.js +12 -0
  318. package/dist/tools/find-teams.cjs +12 -0
  319. package/dist/tools/find-teams.d.cts +13 -0
  320. package/dist/tools/find-teams.d.cts.map +1 -0
  321. package/dist/tools/find-teams.d.ts +13 -0
  322. package/dist/tools/find-teams.d.ts.map +1 -0
  323. package/dist/tools/find-teams.js +12 -0
  324. package/dist/tools/find-transactions.cjs +12 -0
  325. package/dist/tools/find-transactions.d.cts +17 -0
  326. package/dist/tools/find-transactions.d.cts.map +1 -0
  327. package/dist/tools/find-transactions.d.ts +17 -0
  328. package/dist/tools/find-transactions.d.ts.map +1 -0
  329. package/dist/tools/find-transactions.js +12 -0
  330. package/dist/tools/get-doc.cjs +11 -0
  331. package/dist/tools/get-doc.d.cts +12 -0
  332. package/dist/tools/get-doc.d.cts.map +1 -0
  333. package/dist/tools/get-doc.d.ts +12 -0
  334. package/dist/tools/get-doc.d.ts.map +1 -0
  335. package/dist/tools/get-doc.js +11 -0
  336. package/dist/tools/get-event-attachment.cjs +12 -0
  337. package/dist/tools/get-event-attachment.d.cts +16 -0
  338. package/dist/tools/get-event-attachment.d.cts.map +1 -0
  339. package/dist/tools/get-event-attachment.d.ts +16 -0
  340. package/dist/tools/get-event-attachment.d.ts.map +1 -0
  341. package/dist/tools/get-event-attachment.js +12 -0
  342. package/dist/tools/get-issue-details.cjs +15 -0
  343. package/dist/tools/get-issue-details.d.cts +16 -0
  344. package/dist/tools/get-issue-details.d.cts.map +1 -0
  345. package/dist/tools/get-issue-details.d.ts +16 -0
  346. package/dist/tools/get-issue-details.d.ts.map +1 -0
  347. package/dist/tools/get-issue-details.js +15 -0
  348. package/dist/tools/index.cjs +40 -0
  349. package/dist/tools/index.d.cts +127 -0
  350. package/dist/tools/index.d.cts.map +1 -0
  351. package/dist/tools/index.d.ts +127 -0
  352. package/dist/tools/index.d.ts.map +1 -0
  353. package/dist/tools/index.js +40 -0
  354. package/dist/tools/search-docs.cjs +12 -0
  355. package/dist/tools/search-docs.d.cts +14 -0
  356. package/dist/tools/search-docs.d.cts.map +1 -0
  357. package/dist/tools/search-docs.d.ts +14 -0
  358. package/dist/tools/search-docs.d.ts.map +1 -0
  359. package/dist/tools/search-docs.js +12 -0
  360. package/dist/tools/types.cjs +0 -0
  361. package/dist/tools/types.d.cts +4 -0
  362. package/dist/tools/types.d.ts +4 -0
  363. package/dist/tools/types.js +0 -0
  364. package/dist/tools/update-issue.cjs +16 -0
  365. package/dist/tools/update-issue.d.cts +17 -0
  366. package/dist/tools/update-issue.d.cts.map +1 -0
  367. package/dist/tools/update-issue.d.ts +17 -0
  368. package/dist/tools/update-issue.d.ts.map +1 -0
  369. package/dist/tools/update-issue.js +16 -0
  370. package/dist/tools/update-project.cjs +13 -0
  371. package/dist/tools/update-project.d.cts +18 -0
  372. package/dist/tools/update-project.d.cts.map +1 -0
  373. package/dist/tools/update-project.d.ts +18 -0
  374. package/dist/tools/update-project.d.ts.map +1 -0
  375. package/dist/tools/update-project.js +13 -0
  376. package/dist/tools/utils/api-utils.cjs +8 -0
  377. package/dist/tools/utils/api-utils.d.cts +24 -0
  378. package/dist/tools/utils/api-utils.d.cts.map +1 -0
  379. package/dist/tools/utils/api-utils.d.ts +24 -0
  380. package/dist/tools/utils/api-utils.d.ts.map +1 -0
  381. package/dist/tools/utils/api-utils.js +8 -0
  382. package/dist/tools/utils/defineTool.cjs +3 -0
  383. package/dist/tools/utils/defineTool.d.cts +12 -0
  384. package/dist/tools/utils/defineTool.d.cts.map +1 -0
  385. package/dist/tools/utils/defineTool.d.ts +12 -0
  386. package/dist/tools/utils/defineTool.d.ts.map +1 -0
  387. package/dist/tools/utils/defineTool.js +3 -0
  388. package/dist/tools/utils/fetch-utils.cjs +4 -0
  389. package/dist/tools/utils/fetch-utils.d.cts +2 -0
  390. package/dist/tools/utils/fetch-utils.d.ts +2 -0
  391. package/dist/tools/utils/fetch-utils.js +4 -0
  392. package/dist/tools/utils/formatting-utils.cjs +3 -0
  393. package/dist/tools/utils/formatting-utils.d.cts +15 -0
  394. package/dist/tools/utils/formatting-utils.d.cts.map +1 -0
  395. package/dist/tools/utils/formatting-utils.d.ts +15 -0
  396. package/dist/tools/utils/formatting-utils.d.ts.map +1 -0
  397. package/dist/tools/utils/formatting-utils.js +3 -0
  398. package/dist/tools/utils/issue-utils.cjs +6 -0
  399. package/dist/tools/utils/issue-utils.d.cts +7 -0
  400. package/dist/tools/utils/issue-utils.d.ts +7 -0
  401. package/dist/tools/utils/issue-utils.js +5 -0
  402. package/dist/tools/utils/seer-utils.cjs +9 -0
  403. package/dist/tools/utils/seer-utils.d.cts +28 -0
  404. package/dist/tools/utils/seer-utils.d.cts.map +1 -0
  405. package/dist/tools/utils/seer-utils.d.ts +28 -0
  406. package/dist/tools/utils/seer-utils.d.ts.map +1 -0
  407. package/dist/tools/utils/seer-utils.js +3 -0
  408. package/dist/tools/whoami.cjs +10 -0
  409. package/dist/tools/whoami.d.cts +9 -0
  410. package/dist/tools/whoami.d.cts.map +1 -0
  411. package/dist/tools/whoami.d.ts +9 -0
  412. package/dist/tools/whoami.d.ts.map +1 -0
  413. package/dist/tools/whoami.js +10 -0
  414. package/dist/tools-19Ms1kck.cjs +53 -0
  415. package/dist/tools-19Ms1kck.cjs.map +1 -0
  416. package/dist/tools-mThAUo_3.js +48 -0
  417. package/dist/tools-mThAUo_3.js.map +1 -0
  418. package/dist/transports/stdio.cjs +42 -14
  419. package/dist/transports/stdio.d.cts +2 -3
  420. package/dist/transports/stdio.d.cts.map +1 -1
  421. package/dist/transports/stdio.d.ts +2 -3
  422. package/dist/transports/stdio.d.ts.map +1 -1
  423. package/dist/transports/stdio.js +44 -16
  424. package/dist/{types-NIQW7KyF.d.cts → types-Bg17IGWJ.d.cts} +5 -3
  425. package/dist/types-Bg17IGWJ.d.cts.map +1 -0
  426. package/dist/types-CCHsZshF.js +0 -0
  427. package/dist/types-CUN-2OSS.d.cts +29 -0
  428. package/dist/types-CUN-2OSS.d.cts.map +1 -0
  429. package/dist/{types-Daq2fm0E.d.ts → types-CtTBwGbw.d.ts} +5 -3
  430. package/dist/types-CtTBwGbw.d.ts.map +1 -0
  431. package/dist/types-D_mx318Q.d.cts +29 -0
  432. package/dist/types-D_mx318Q.d.cts.map +1 -0
  433. package/dist/types-DkJtNDXU.d.ts +29 -0
  434. package/dist/types-DkJtNDXU.d.ts.map +1 -0
  435. package/dist/types-qB8a4WQT.d.ts +29 -0
  436. package/dist/types-qB8a4WQT.d.ts.map +1 -0
  437. package/dist/types.d.cts +3 -4
  438. package/dist/types.d.ts +3 -4
  439. package/dist/update-issue-B6eZhAPJ.cjs +115 -0
  440. package/dist/update-issue-B6eZhAPJ.cjs.map +1 -0
  441. package/dist/update-issue-DmLElHPS.js +109 -0
  442. package/dist/update-issue-DmLElHPS.js.map +1 -0
  443. package/dist/update-project-BNPev7W8.js +120 -0
  444. package/dist/update-project-BNPev7W8.js.map +1 -0
  445. package/dist/update-project-CijYCtG1.cjs +126 -0
  446. package/dist/update-project-CijYCtG1.cjs.map +1 -0
  447. package/dist/url-utils-C9hykWmk.cjs +106 -0
  448. package/dist/url-utils-C9hykWmk.cjs.map +1 -0
  449. package/dist/url-utils-DvZYfzPM.js +82 -0
  450. package/dist/url-utils-DvZYfzPM.js.map +1 -0
  451. package/dist/utils/url-utils.cjs +6 -0
  452. package/dist/utils/url-utils.d.cts +37 -0
  453. package/dist/utils/url-utils.d.cts.map +1 -0
  454. package/dist/utils/url-utils.d.ts +37 -0
  455. package/dist/utils/url-utils.d.ts.map +1 -0
  456. package/dist/utils/url-utils.js +3 -0
  457. package/dist/version-C4uvMmw0.js +6 -0
  458. package/dist/version-C4uvMmw0.js.map +1 -0
  459. package/dist/{version-BNmubeQI.cjs → version-Ddz4xg_q.cjs} +2 -2
  460. package/dist/version-Ddz4xg_q.cjs.map +1 -0
  461. package/dist/version.cjs +1 -1
  462. package/dist/version.js +1 -1
  463. package/dist/whoami-CEgbTUqt.cjs +28 -0
  464. package/dist/whoami-CEgbTUqt.cjs.map +1 -0
  465. package/dist/whoami-DesNZnaQ.js +23 -0
  466. package/dist/whoami-DesNZnaQ.js.map +1 -0
  467. package/package.json +24 -14
  468. package/dist/api-client/client.test.cjs +0 -33
  469. package/dist/api-client/client.test.cjs.map +0 -1
  470. package/dist/api-client/client.test.d.ts +0 -1
  471. package/dist/api-client/client.test.js +0 -33
  472. package/dist/api-client/client.test.js.map +0 -1
  473. package/dist/chunk-BLXvPPr8.js +0 -30
  474. package/dist/client-4jq_wVgn.d.ts.map +0 -1
  475. package/dist/client-B7vZ6JMk.cjs.map +0 -1
  476. package/dist/client-CAoHZbyK.js.map +0 -1
  477. package/dist/client-DkY0ifZf.d.cts.map +0 -1
  478. package/dist/dist-BlIWGSIM.cjs +0 -8197
  479. package/dist/dist-BlIWGSIM.cjs.map +0 -1
  480. package/dist/dist-DDpQABxe.js +0 -8054
  481. package/dist/dist-DDpQABxe.js.map +0 -1
  482. package/dist/errors.test.cjs +0 -24
  483. package/dist/errors.test.cjs.map +0 -1
  484. package/dist/errors.test.d.cts +0 -1
  485. package/dist/errors.test.d.ts +0 -1
  486. package/dist/errors.test.js +0 -24
  487. package/dist/errors.test.js.map +0 -1
  488. package/dist/formatting-BaARL2gT.js +0 -68
  489. package/dist/formatting-BaARL2gT.js.map +0 -1
  490. package/dist/formatting-C2kN0ok6.cjs +0 -86
  491. package/dist/formatting-C2kN0ok6.cjs.map +0 -1
  492. package/dist/index-h64gcVNJ.d.ts +0 -1
  493. package/dist/internal/formatting.d.cts.map +0 -1
  494. package/dist/internal/formatting.d.ts.map +0 -1
  495. package/dist/internal/issue-helpers.d.cts.map +0 -1
  496. package/dist/internal/issue-helpers.d.ts.map +0 -1
  497. package/dist/internal/issue-helpers.test.cjs +0 -110
  498. package/dist/internal/issue-helpers.test.cjs.map +0 -1
  499. package/dist/internal/issue-helpers.test.d.cts +0 -1
  500. package/dist/internal/issue-helpers.test.d.ts +0 -1
  501. package/dist/internal/issue-helpers.test.js +0 -110
  502. package/dist/internal/issue-helpers.test.js.map +0 -1
  503. package/dist/magic-string.es-CybcVAw7.cjs +0 -1016
  504. package/dist/magic-string.es-CybcVAw7.cjs.map +0 -1
  505. package/dist/magic-string.es-DY8GVHw9.js +0 -1015
  506. package/dist/magic-string.es-DY8GVHw9.js.map +0 -1
  507. package/dist/promptDefinitions-BTLIBcGt.cjs.map +0 -1
  508. package/dist/promptDefinitions-CF2VWdQ6.d.cts.map +0 -1
  509. package/dist/promptDefinitions-D5FSQckL.d.ts.map +0 -1
  510. package/dist/resources-Bol20Xuo.js +0 -38
  511. package/dist/resources-Bol20Xuo.js.map +0 -1
  512. package/dist/resources-DNyoutxH.cjs +0 -44
  513. package/dist/resources-DNyoutxH.cjs.map +0 -1
  514. package/dist/schema-BJv7kREf.d.cts.map +0 -1
  515. package/dist/schema-BTfISwFu.cjs.map +0 -1
  516. package/dist/schema-BnxGHL_i.d.ts.map +0 -1
  517. package/dist/schema-BsvGMALe.cjs.map +0 -1
  518. package/dist/schema-C_hp0BR7.js.map +0 -1
  519. package/dist/server-C7cHq_pc.js.map +0 -1
  520. package/dist/server-DeutbO8v.cjs.map +0 -1
  521. package/dist/stdio-B73CCTly.cjs.map +0 -1
  522. package/dist/stdio-ZQLC-i5Q.js.map +0 -1
  523. package/dist/toolDefinitions-BOMF-zIC.d.ts +0 -394
  524. package/dist/toolDefinitions-BOMF-zIC.d.ts.map +0 -1
  525. package/dist/toolDefinitions-CUegGcWU.cjs +0 -547
  526. package/dist/toolDefinitions-CUegGcWU.cjs.map +0 -1
  527. package/dist/toolDefinitions-DFAxp3nr.js +0 -541
  528. package/dist/toolDefinitions-DFAxp3nr.js.map +0 -1
  529. package/dist/toolDefinitions-Ipvr4Acw.d.cts +0 -394
  530. package/dist/toolDefinitions-Ipvr4Acw.d.cts.map +0 -1
  531. package/dist/toolDefinitions.cjs +0 -4
  532. package/dist/toolDefinitions.d.cts +0 -2
  533. package/dist/toolDefinitions.test.cjs +0 -15
  534. package/dist/toolDefinitions.test.cjs.map +0 -1
  535. package/dist/toolDefinitions.test.d.cts +0 -1
  536. package/dist/toolDefinitions.test.d.ts +0 -1
  537. package/dist/toolDefinitions.test.js +0 -15
  538. package/dist/toolDefinitions.test.js.map +0 -1
  539. package/dist/tools-DpiQwSTY.js +0 -596
  540. package/dist/tools-DpiQwSTY.js.map +0 -1
  541. package/dist/tools-DyOqlsCW.cjs +0 -602
  542. package/dist/tools-DyOqlsCW.cjs.map +0 -1
  543. package/dist/tools.cjs +0 -11
  544. package/dist/tools.d.cts +0 -335
  545. package/dist/tools.d.cts.map +0 -1
  546. package/dist/tools.d.ts +0 -335
  547. package/dist/tools.d.ts.map +0 -1
  548. package/dist/tools.js +0 -11
  549. package/dist/tools.test.cjs +0 -1298
  550. package/dist/tools.test.cjs.map +0 -1
  551. package/dist/tools.test.d.cts +0 -1
  552. package/dist/tools.test.d.ts +0 -1
  553. package/dist/tools.test.js +0 -1298
  554. package/dist/tools.test.js.map +0 -1
  555. package/dist/types-D5TPcOfv.d.ts +0 -39
  556. package/dist/types-D5TPcOfv.d.ts.map +0 -1
  557. package/dist/types-DRF2IoP_.d.cts +0 -39
  558. package/dist/types-DRF2IoP_.d.cts.map +0 -1
  559. package/dist/types-Daq2fm0E.d.ts.map +0 -1
  560. package/dist/types-NIQW7KyF.d.cts.map +0 -1
  561. package/dist/version-BNmubeQI.cjs.map +0 -1
  562. package/dist/version-CRto5Sn_.js +0 -6
  563. package/dist/version-CRto5Sn_.js.map +0 -1
  564. package/dist/vi.bdSIJ99Y-BfJr7I2s.js +0 -6349
  565. package/dist/vi.bdSIJ99Y-BfJr7I2s.js.map +0 -1
  566. package/dist/vi.bdSIJ99Y-Dft_B_Ta.cjs +0 -6355
  567. package/dist/vi.bdSIJ99Y-Dft_B_Ta.cjs.map +0 -1
  568. /package/dist/{api-client-CNv_hbPO.js → api-client-ChL_0F2u.js} +0 -0
  569. /package/dist/{types-6zHoEWAx.js → fetch-utils-C0F4eH6S.cjs} +0 -0
  570. /package/dist/{api-client/client.test.d.cts → index-DVGDAddE.d.ts} +0 -0
@@ -0,0 +1,80 @@
1
+ import { UserInputError } from "./errors-CIoxzIug.js";
2
+ import { defineTool } from "./defineTool-77H4nSna.js";
3
+ import { ApiError } from "./client-DOYWNvVM.js";
4
+ import { fetchWithTimeout } from "./fetch-utils-BMKjO-cc.js";
5
+ import { z } from "zod";
6
+ import { setTag } from "@sentry/core";
7
+
8
+ //#region src/tools/get-doc.ts
9
+ var get_doc_default = defineTool({
10
+ name: "get_doc",
11
+ description: [
12
+ "Fetch the full markdown content of a Sentry documentation page.",
13
+ "",
14
+ "Use this tool when you need to:",
15
+ "- Read the complete documentation for a specific topic",
16
+ "- Get detailed implementation examples or code snippets",
17
+ "- Access the full context of a documentation page",
18
+ "- Extract specific sections from documentation",
19
+ "",
20
+ "<examples>",
21
+ "### Get the Next.js integration guide",
22
+ "",
23
+ "```",
24
+ "get_doc(path='/platforms/javascript/guides/nextjs.md')",
25
+ "```",
26
+ "</examples>",
27
+ "",
28
+ "<hints>",
29
+ "- Use the path from search_docs results for accurate fetching",
30
+ "- Paths should end with .md extension",
31
+ "</hints>"
32
+ ].join("\n"),
33
+ inputSchema: { path: z.string().trim().describe("The documentation path (e.g., '/platforms/javascript/guides/nextjs.md'). Get this from search_docs results.") },
34
+ async handler(params, context) {
35
+ setTag("doc.path", params.path);
36
+ let output = `# Documentation Content\n\n`;
37
+ output += `**Path**: ${params.path}\n\n`;
38
+ if (!params.path.endsWith(".md")) throw new UserInputError("Invalid documentation path. Path must end with .md extension.");
39
+ const baseUrl = "https://docs.sentry.io";
40
+ const docUrl = new URL(params.path, baseUrl);
41
+ const allowedDomains = ["docs.sentry.io", "develop.sentry.io"];
42
+ if (!allowedDomains.includes(docUrl.hostname)) throw new UserInputError(`Invalid domain. Documentation can only be fetched from allowed domains: ${allowedDomains.join(", ")}`);
43
+ const response = await fetchWithTimeout(docUrl.toString(), { headers: {
44
+ Accept: "text/plain, text/markdown",
45
+ "User-Agent": "Sentry-MCP/1.0"
46
+ } }, 15e3);
47
+ if (!response.ok) {
48
+ if (response.status === 404) {
49
+ output += `**Error**: Documentation not found at this path.\n\n`;
50
+ output += `Please verify the path is correct. Common issues:\n`;
51
+ output += `- Path should start with / (e.g., /platforms/javascript/guides/nextjs.md)\n`;
52
+ output += `- Path should match exactly what's shown in search_docs results\n`;
53
+ output += `- Some pages may have been moved or renamed\n\n`;
54
+ output += `Try searching again with \`search_docs()\` to find the correct path.\n`;
55
+ return output;
56
+ }
57
+ throw new ApiError(`Failed to fetch documentation: ${response.statusText}`, response.status);
58
+ }
59
+ const content = await response.text();
60
+ if (content.trim().startsWith("<!DOCTYPE") || content.trim().startsWith("<html")) {
61
+ output += `> **Error**: Received HTML instead of markdown. The path may be incorrect.\n\n`;
62
+ output += `Make sure to use the .md extension in the path.\n`;
63
+ output += `Example: /platforms/javascript/guides/nextjs.md\n`;
64
+ return output;
65
+ }
66
+ output += "---\n\n";
67
+ output += content;
68
+ output += "\n\n---\n\n";
69
+ output += "## Using this documentation\n\n";
70
+ output += "- This is the raw markdown content from Sentry's documentation\n";
71
+ output += "- Code examples and configuration snippets can be copied directly\n";
72
+ output += "- Links in the documentation are relative to https://docs.sentry.io\n";
73
+ output += "- For more related topics, use `search_docs()` to find additional pages\n";
74
+ return output;
75
+ }
76
+ });
77
+
78
+ //#endregion
79
+ export { get_doc_default };
80
+ //# sourceMappingURL=get-doc-YTiQznr1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-doc-YTiQznr1.js","names":["context: ServerContext"],"sources":["../src/tools/get-doc.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { fetchWithTimeout } from \"./utils/fetch-utils\";\nimport { UserInputError } from \"../errors\";\nimport { ApiError } from \"../api-client/index\";\nimport type { ServerContext } from \"../types\";\n\nexport default defineTool({\n name: \"get_doc\",\n description: [\n \"Fetch the full markdown content of a Sentry documentation page.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Read the complete documentation for a specific topic\",\n \"- Get detailed implementation examples or code snippets\",\n \"- Access the full context of a documentation page\",\n \"- Extract specific sections from documentation\",\n \"\",\n \"<examples>\",\n \"### Get the Next.js integration guide\",\n \"\",\n \"```\",\n \"get_doc(path='/platforms/javascript/guides/nextjs.md')\",\n \"```\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- Use the path from search_docs results for accurate fetching\",\n \"- Paths should end with .md extension\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n path: z\n .string()\n .trim()\n .describe(\n \"The documentation path (e.g., '/platforms/javascript/guides/nextjs.md'). Get this from search_docs results.\",\n ),\n },\n async handler(params, context: ServerContext) {\n setTag(\"doc.path\", params.path);\n\n let output = `# Documentation Content\\n\\n`;\n output += `**Path**: ${params.path}\\n\\n`;\n\n // Validate path format\n if (!params.path.endsWith(\".md\")) {\n throw new UserInputError(\n \"Invalid documentation path. Path must end with .md extension.\",\n );\n }\n\n // Use docs.sentry.io for now - will be configurable via flag in the future\n const baseUrl = \"https://docs.sentry.io\";\n\n // Construct the full URL for the markdown file\n const docUrl = new URL(params.path, baseUrl);\n\n // Validate domain whitelist for security\n const allowedDomains = [\"docs.sentry.io\", \"develop.sentry.io\"];\n if (!allowedDomains.includes(docUrl.hostname)) {\n throw new UserInputError(\n `Invalid domain. Documentation can only be fetched from allowed domains: ${allowedDomains.join(\", \")}`,\n );\n }\n\n const response = await fetchWithTimeout(\n docUrl.toString(),\n {\n headers: {\n Accept: \"text/plain, text/markdown\",\n \"User-Agent\": \"Sentry-MCP/1.0\",\n },\n },\n 15000, // 15 second timeout\n );\n\n if (!response.ok) {\n if (response.status === 404) {\n output += `**Error**: Documentation not found at this path.\\n\\n`;\n output += `Please verify the path is correct. Common issues:\\n`;\n output += `- Path should start with / (e.g., /platforms/javascript/guides/nextjs.md)\\n`;\n output += `- Path should match exactly what's shown in search_docs results\\n`;\n output += `- Some pages may have been moved or renamed\\n\\n`;\n output += `Try searching again with \\`search_docs()\\` to find the correct path.\\n`;\n return output;\n }\n\n throw new ApiError(\n `Failed to fetch documentation: ${response.statusText}`,\n response.status,\n );\n }\n\n const content = await response.text();\n\n // Check if we got HTML instead of markdown (wrong path format)\n if (\n content.trim().startsWith(\"<!DOCTYPE\") ||\n content.trim().startsWith(\"<html\")\n ) {\n output += `> **Error**: Received HTML instead of markdown. The path may be incorrect.\\n\\n`;\n output += `Make sure to use the .md extension in the path.\\n`;\n output += `Example: /platforms/javascript/guides/nextjs.md\\n`;\n return output;\n }\n\n // Add the markdown content\n output += \"---\\n\\n\";\n output += content;\n output += \"\\n\\n---\\n\\n\";\n\n output += \"## Using this documentation\\n\\n\";\n output +=\n \"- This is the raw markdown content from Sentry's documentation\\n\";\n output +=\n \"- Code examples and configuration snippets can be copied directly\\n\";\n output +=\n \"- Links in the documentation are relative to https://docs.sentry.io\\n\";\n output +=\n \"- For more related topics, use `search_docs()` to find additional pages\\n\";\n\n return output;\n },\n});\n"],"mappings":";;;;;;;;AAQA,sBAAe,WAAW;CACxB,MAAM;CACN,aAAa;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACZ,aAAa,EACX,MAAM,EACH,QAAQ,CACR,MAAM,CACN,SACC,8GACD,CACJ;CACD,MAAM,QAAQ,QAAQA,SAAwB;AAC5C,SAAO,YAAY,OAAO,KAAK;EAE/B,IAAI,UAAU;AACd,aAAW,YAAY,OAAO,KAAK;AAGnC,OAAK,OAAO,KAAK,SAAS,MAAM,CAC9B,OAAM,IAAI,eACR;EAKJ,MAAM,UAAU;EAGhB,MAAM,SAAS,IAAI,IAAI,OAAO,MAAM;EAGpC,MAAM,iBAAiB,CAAC,kBAAkB,mBAAoB;AAC9D,OAAK,eAAe,SAAS,OAAO,SAAS,CAC3C,OAAM,IAAI,gBACP,0EAA0E,eAAe,KAAK,KAAK;EAIxG,MAAM,WAAW,MAAM,iBACrB,OAAO,UAAU,EACjB,EACE,SAAS;GACP,QAAQ;GACR,cAAc;EACf,EACF,GACD,KACD;AAED,OAAK,SAAS,IAAI;AAChB,OAAI,SAAS,WAAW,KAAK;AAC3B,eAAW;AACX,eAAW;AACX,eAAW;AACX,eAAW;AACX,eAAW;AACX,eAAW;AACX,WAAO;GACR;AAED,SAAM,IAAI,UACP,iCAAiC,SAAS,cAC3C,SAAS;EAEZ;EAED,MAAM,UAAU,MAAM,SAAS,MAAM;AAGrC,MACE,QAAQ,MAAM,CAAC,WAAW,YAAY,IACtC,QAAQ,MAAM,CAAC,WAAW,QAAQ,EAClC;AACA,cAAW;AACX,cAAW;AACX,cAAW;AACX,UAAO;EACR;AAGD,YAAU;AACV,YAAU;AACV,YAAU;AAEV,YAAU;AACV,YACE;AACF,YACE;AACF,YACE;AACF,YACE;AAEF,SAAO;CACR;AACF,EAAC"}
@@ -0,0 +1,144 @@
1
+ const require_chunk = require('./chunk-DWy1uDak.cjs');
2
+ const require_defineTool = require('./defineTool-lWNTzWl_.cjs');
3
+ const require_api_utils = require('./api-utils-d36iteNO.cjs');
4
+ const require_schema = require('./schema-BpJVmev8.cjs');
5
+ const __sentry_core = require_chunk.__toESM(require("@sentry/core"));
6
+
7
+ //#region src/tools/get-event-attachment.ts
8
+ var get_event_attachment_default = require_defineTool.defineTool({
9
+ name: "get_event_attachment",
10
+ description: [
11
+ "Download attachments from a Sentry event.",
12
+ "",
13
+ "Use this tool when you need to:",
14
+ "- Download files attached to a specific event",
15
+ "- Access screenshots, log files, or other attachments uploaded with an error report",
16
+ "- Retrieve attachment metadata and download URLs",
17
+ "",
18
+ "<examples>",
19
+ "### Download a specific attachment by ID",
20
+ "",
21
+ "```",
22
+ "get_event_attachment(organizationSlug='my-organization', projectSlug='my-project', eventId='c49541c747cb4d8aa3efb70ca5aba243', attachmentId='12345')",
23
+ "```",
24
+ "",
25
+ "### List all attachments for an event",
26
+ "",
27
+ "```",
28
+ "get_event_attachment(organizationSlug='my-organization', projectSlug='my-project', eventId='c49541c747cb4d8aa3efb70ca5aba243')",
29
+ "```",
30
+ "",
31
+ "</examples>",
32
+ "",
33
+ "<hints>",
34
+ "- If `attachmentId` is provided, the specific attachment will be downloaded as an embedded resource",
35
+ "- If `attachmentId` is omitted, all attachments for the event will be listed with download information",
36
+ "- The `projectSlug` is required to identify which project the event belongs to",
37
+ "</hints>"
38
+ ].join("\n"),
39
+ inputSchema: {
40
+ organizationSlug: require_schema.ParamOrganizationSlug,
41
+ projectSlug: require_schema.ParamProjectSlug,
42
+ eventId: require_schema.ParamEventId,
43
+ attachmentId: require_schema.ParamAttachmentId.optional(),
44
+ regionUrl: require_schema.ParamRegionUrl.optional()
45
+ },
46
+ async handler(params, context) {
47
+ const apiService = require_api_utils.apiServiceFromContext(context, { regionUrl: params.regionUrl });
48
+ (0, __sentry_core.setTag)("organization.slug", params.organizationSlug);
49
+ if (params.attachmentId) {
50
+ const attachment = await apiService.getEventAttachment({
51
+ organizationSlug: params.organizationSlug,
52
+ projectSlug: params.projectSlug,
53
+ eventId: params.eventId,
54
+ attachmentId: params.attachmentId
55
+ });
56
+ const contentParts = [];
57
+ const isBinary = !attachment.attachment.mimetype?.startsWith("text/");
58
+ if (isBinary) {
59
+ const isImage = attachment.attachment.mimetype?.startsWith("image/");
60
+ const uint8Array = new Uint8Array(await attachment.blob.arrayBuffer());
61
+ let binary = "";
62
+ for (let i = 0; i < uint8Array.byteLength; i++) binary += String.fromCharCode(uint8Array[i]);
63
+ if (isImage) {
64
+ const image = {
65
+ type: "image",
66
+ mimeType: attachment.attachment.mimetype,
67
+ data: btoa(binary)
68
+ };
69
+ contentParts.push(image);
70
+ } else {
71
+ const resource = {
72
+ id: params.attachmentId,
73
+ type: "resource",
74
+ resource: {
75
+ uri: `file://${attachment.filename}`,
76
+ mimeType: attachment.attachment.mimetype,
77
+ blob: btoa(binary)
78
+ }
79
+ };
80
+ contentParts.push(resource);
81
+ }
82
+ }
83
+ let output$1 = `# Event Attachment Download\n\n`;
84
+ output$1 += `**Event ID:** ${params.eventId}\n`;
85
+ output$1 += `**Attachment ID:** ${params.attachmentId}\n`;
86
+ output$1 += `**Filename:** ${attachment.filename}\n`;
87
+ output$1 += `**Type:** ${attachment.attachment.type}\n`;
88
+ output$1 += `**Size:** ${attachment.attachment.size} bytes\n`;
89
+ output$1 += `**MIME Type:** ${attachment.attachment.mimetype}\n`;
90
+ output$1 += `**Created:** ${attachment.attachment.dateCreated}\n`;
91
+ output$1 += `**SHA1:** ${attachment.attachment.sha1}\n\n`;
92
+ output$1 += `**Download URL:** ${attachment.downloadUrl}\n\n`;
93
+ if (isBinary) {
94
+ output$1 += `## Binary Content\n\n`;
95
+ output$1 += `The attachment is included as a resource and accessible through your client.\n`;
96
+ } else {
97
+ const textContent = await attachment.blob.text();
98
+ output$1 += `## File Content\n\n`;
99
+ output$1 += `\`\`\`\n${textContent}\n\`\`\`\n\n`;
100
+ }
101
+ const text = {
102
+ type: "text",
103
+ text: output$1
104
+ };
105
+ contentParts.push(text);
106
+ return contentParts;
107
+ }
108
+ const attachments = await apiService.listEventAttachments({
109
+ organizationSlug: params.organizationSlug,
110
+ projectSlug: params.projectSlug,
111
+ eventId: params.eventId
112
+ });
113
+ let output = `# Event Attachments\n\n`;
114
+ output += `**Event ID:** ${params.eventId}\n`;
115
+ output += `**Project:** ${params.projectSlug}\n\n`;
116
+ if (attachments.length === 0) {
117
+ output += "No attachments found for this event.\n";
118
+ return output;
119
+ }
120
+ output += `Found ${attachments.length} attachment(s):\n\n`;
121
+ attachments.forEach((attachment, index) => {
122
+ output += `## Attachment ${index + 1}\n\n`;
123
+ output += `**ID:** ${attachment.id}\n`;
124
+ output += `**Name:** ${attachment.name}\n`;
125
+ output += `**Type:** ${attachment.type}\n`;
126
+ output += `**Size:** ${attachment.size} bytes\n`;
127
+ output += `**MIME Type:** ${attachment.mimetype}\n`;
128
+ output += `**Created:** ${attachment.dateCreated}\n`;
129
+ output += `**SHA1:** ${attachment.sha1}\n\n`;
130
+ output += `To download this attachment, use the "get_event_attachment" tool with the attachmentId provided:\n`;
131
+ output += `\`get_event_attachment(organizationSlug="${params.organizationSlug}", projectSlug="${params.projectSlug}", eventId="${params.eventId}", attachmentId="${attachment.id}")\`\n\n`;
132
+ });
133
+ return output;
134
+ }
135
+ });
136
+
137
+ //#endregion
138
+ Object.defineProperty(exports, 'get_event_attachment_default', {
139
+ enumerable: true,
140
+ get: function () {
141
+ return get_event_attachment_default;
142
+ }
143
+ });
144
+ //# sourceMappingURL=get-event-attachment-ChRw3jlQ.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-event-attachment-ChRw3jlQ.cjs","names":["ParamOrganizationSlug","ParamProjectSlug","ParamEventId","context: ServerContext","contentParts: (TextContent | ImageContent | EmbeddedResource)[]","image: ImageContent","resource: EmbeddedResource","output","text: TextContent"],"sources":["../src/tools/get-event-attachment.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport type { ServerContext } from \"../types\";\nimport type {\n TextContent,\n ImageContent,\n EmbeddedResource,\n} from \"@modelcontextprotocol/sdk/types.js\";\nimport {\n ParamOrganizationSlug,\n ParamProjectSlug,\n ParamEventId,\n ParamAttachmentId,\n ParamRegionUrl,\n} from \"../schema\";\nimport { setTag } from \"@sentry/core\";\n\nexport default defineTool({\n name: \"get_event_attachment\",\n description: [\n \"Download attachments from a Sentry event.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Download files attached to a specific event\",\n \"- Access screenshots, log files, or other attachments uploaded with an error report\",\n \"- Retrieve attachment metadata and download URLs\",\n \"\",\n \"<examples>\",\n \"### Download a specific attachment by ID\",\n \"\",\n \"```\",\n \"get_event_attachment(organizationSlug='my-organization', projectSlug='my-project', eventId='c49541c747cb4d8aa3efb70ca5aba243', attachmentId='12345')\",\n \"```\",\n \"\",\n \"### List all attachments for an event\",\n \"\",\n \"```\",\n \"get_event_attachment(organizationSlug='my-organization', projectSlug='my-project', eventId='c49541c747cb4d8aa3efb70ca5aba243')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If `attachmentId` is provided, the specific attachment will be downloaded as an embedded resource\",\n \"- If `attachmentId` is omitted, all attachments for the event will be listed with download information\",\n \"- The `projectSlug` is required to identify which project the event belongs to\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug,\n projectSlug: ParamProjectSlug,\n eventId: ParamEventId,\n attachmentId: ParamAttachmentId.optional(),\n regionUrl: ParamRegionUrl.optional(),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n\n setTag(\"organization.slug\", params.organizationSlug);\n\n // If attachmentId is provided, download the specific attachment\n if (params.attachmentId) {\n const attachment = await apiService.getEventAttachment({\n organizationSlug: params.organizationSlug,\n projectSlug: params.projectSlug,\n eventId: params.eventId,\n attachmentId: params.attachmentId,\n });\n\n const contentParts: (TextContent | ImageContent | EmbeddedResource)[] =\n [];\n const isBinary = !attachment.attachment.mimetype?.startsWith(\"text/\");\n\n if (isBinary) {\n const isImage = attachment.attachment.mimetype?.startsWith(\"image/\");\n // Base64 encode the binary attachment content\n // and add to the content as an embedded resource\n const uint8Array = new Uint8Array(await attachment.blob.arrayBuffer());\n let binary = \"\";\n for (let i = 0; i < uint8Array.byteLength; i++) {\n binary += String.fromCharCode(uint8Array[i]);\n }\n if (isImage) {\n const image: ImageContent = {\n type: \"image\",\n mimeType: attachment.attachment.mimetype,\n data: btoa(binary),\n };\n contentParts.push(image);\n } else {\n const resource: EmbeddedResource = {\n id: params.attachmentId,\n type: \"resource\",\n resource: {\n uri: `file://${attachment.filename}`,\n mimeType: attachment.attachment.mimetype,\n blob: btoa(binary),\n },\n };\n contentParts.push(resource);\n }\n }\n\n let output = `# Event Attachment Download\\n\\n`;\n output += `**Event ID:** ${params.eventId}\\n`;\n output += `**Attachment ID:** ${params.attachmentId}\\n`;\n output += `**Filename:** ${attachment.filename}\\n`;\n output += `**Type:** ${attachment.attachment.type}\\n`;\n output += `**Size:** ${attachment.attachment.size} bytes\\n`;\n output += `**MIME Type:** ${attachment.attachment.mimetype}\\n`;\n output += `**Created:** ${attachment.attachment.dateCreated}\\n`;\n output += `**SHA1:** ${attachment.attachment.sha1}\\n\\n`;\n output += `**Download URL:** ${attachment.downloadUrl}\\n\\n`;\n\n if (isBinary) {\n output += `## Binary Content\\n\\n`;\n output += `The attachment is included as a resource and accessible through your client.\\n`;\n } else {\n // If it's a text file and we have blob content, decode and display it instead\n // of embedding it as an image or resource\n const textContent = await attachment.blob.text();\n output += `## File Content\\n\\n`;\n output += `\\`\\`\\`\\n${textContent}\\n\\`\\`\\`\\n\\n`;\n }\n\n const text: TextContent = {\n type: \"text\",\n text: output,\n };\n contentParts.push(text);\n\n return contentParts;\n }\n\n // List all attachments for the event\n const attachments = await apiService.listEventAttachments({\n organizationSlug: params.organizationSlug,\n projectSlug: params.projectSlug,\n eventId: params.eventId,\n });\n\n let output = `# Event Attachments\\n\\n`;\n output += `**Event ID:** ${params.eventId}\\n`;\n output += `**Project:** ${params.projectSlug}\\n\\n`;\n\n if (attachments.length === 0) {\n output += \"No attachments found for this event.\\n\";\n return output;\n }\n\n output += `Found ${attachments.length} attachment(s):\\n\\n`;\n\n attachments.forEach((attachment, index) => {\n output += `## Attachment ${index + 1}\\n\\n`;\n output += `**ID:** ${attachment.id}\\n`;\n output += `**Name:** ${attachment.name}\\n`;\n output += `**Type:** ${attachment.type}\\n`;\n output += `**Size:** ${attachment.size} bytes\\n`;\n output += `**MIME Type:** ${attachment.mimetype}\\n`;\n output += `**Created:** ${attachment.dateCreated}\\n`;\n output += `**SHA1:** ${attachment.sha1}\\n\\n`;\n output += `To download this attachment, use the \"get_event_attachment\" tool with the attachmentId provided:\\n`;\n output += `\\`get_event_attachment(organizationSlug=\"${params.organizationSlug}\", projectSlug=\"${params.projectSlug}\", eventId=\"${params.eventId}\", attachmentId=\"${attachment.id}\")\\`\\n\\n`;\n });\n\n return output;\n },\n});\n"],"mappings":"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"}
@@ -0,0 +1,138 @@
1
+ import { defineTool } from "./defineTool-77H4nSna.js";
2
+ import { apiServiceFromContext } from "./api-utils-C6QJAzFL.js";
3
+ import { ParamAttachmentId, ParamEventId, ParamOrganizationSlug, ParamProjectSlug, ParamRegionUrl } from "./schema-DtsnsxMl.js";
4
+ import { setTag } from "@sentry/core";
5
+
6
+ //#region src/tools/get-event-attachment.ts
7
+ var get_event_attachment_default = defineTool({
8
+ name: "get_event_attachment",
9
+ description: [
10
+ "Download attachments from a Sentry event.",
11
+ "",
12
+ "Use this tool when you need to:",
13
+ "- Download files attached to a specific event",
14
+ "- Access screenshots, log files, or other attachments uploaded with an error report",
15
+ "- Retrieve attachment metadata and download URLs",
16
+ "",
17
+ "<examples>",
18
+ "### Download a specific attachment by ID",
19
+ "",
20
+ "```",
21
+ "get_event_attachment(organizationSlug='my-organization', projectSlug='my-project', eventId='c49541c747cb4d8aa3efb70ca5aba243', attachmentId='12345')",
22
+ "```",
23
+ "",
24
+ "### List all attachments for an event",
25
+ "",
26
+ "```",
27
+ "get_event_attachment(organizationSlug='my-organization', projectSlug='my-project', eventId='c49541c747cb4d8aa3efb70ca5aba243')",
28
+ "```",
29
+ "",
30
+ "</examples>",
31
+ "",
32
+ "<hints>",
33
+ "- If `attachmentId` is provided, the specific attachment will be downloaded as an embedded resource",
34
+ "- If `attachmentId` is omitted, all attachments for the event will be listed with download information",
35
+ "- The `projectSlug` is required to identify which project the event belongs to",
36
+ "</hints>"
37
+ ].join("\n"),
38
+ inputSchema: {
39
+ organizationSlug: ParamOrganizationSlug,
40
+ projectSlug: ParamProjectSlug,
41
+ eventId: ParamEventId,
42
+ attachmentId: ParamAttachmentId.optional(),
43
+ regionUrl: ParamRegionUrl.optional()
44
+ },
45
+ async handler(params, context) {
46
+ const apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl });
47
+ setTag("organization.slug", params.organizationSlug);
48
+ if (params.attachmentId) {
49
+ const attachment = await apiService.getEventAttachment({
50
+ organizationSlug: params.organizationSlug,
51
+ projectSlug: params.projectSlug,
52
+ eventId: params.eventId,
53
+ attachmentId: params.attachmentId
54
+ });
55
+ const contentParts = [];
56
+ const isBinary = !attachment.attachment.mimetype?.startsWith("text/");
57
+ if (isBinary) {
58
+ const isImage = attachment.attachment.mimetype?.startsWith("image/");
59
+ const uint8Array = new Uint8Array(await attachment.blob.arrayBuffer());
60
+ let binary = "";
61
+ for (let i = 0; i < uint8Array.byteLength; i++) binary += String.fromCharCode(uint8Array[i]);
62
+ if (isImage) {
63
+ const image = {
64
+ type: "image",
65
+ mimeType: attachment.attachment.mimetype,
66
+ data: btoa(binary)
67
+ };
68
+ contentParts.push(image);
69
+ } else {
70
+ const resource = {
71
+ id: params.attachmentId,
72
+ type: "resource",
73
+ resource: {
74
+ uri: `file://${attachment.filename}`,
75
+ mimeType: attachment.attachment.mimetype,
76
+ blob: btoa(binary)
77
+ }
78
+ };
79
+ contentParts.push(resource);
80
+ }
81
+ }
82
+ let output$1 = `# Event Attachment Download\n\n`;
83
+ output$1 += `**Event ID:** ${params.eventId}\n`;
84
+ output$1 += `**Attachment ID:** ${params.attachmentId}\n`;
85
+ output$1 += `**Filename:** ${attachment.filename}\n`;
86
+ output$1 += `**Type:** ${attachment.attachment.type}\n`;
87
+ output$1 += `**Size:** ${attachment.attachment.size} bytes\n`;
88
+ output$1 += `**MIME Type:** ${attachment.attachment.mimetype}\n`;
89
+ output$1 += `**Created:** ${attachment.attachment.dateCreated}\n`;
90
+ output$1 += `**SHA1:** ${attachment.attachment.sha1}\n\n`;
91
+ output$1 += `**Download URL:** ${attachment.downloadUrl}\n\n`;
92
+ if (isBinary) {
93
+ output$1 += `## Binary Content\n\n`;
94
+ output$1 += `The attachment is included as a resource and accessible through your client.\n`;
95
+ } else {
96
+ const textContent = await attachment.blob.text();
97
+ output$1 += `## File Content\n\n`;
98
+ output$1 += `\`\`\`\n${textContent}\n\`\`\`\n\n`;
99
+ }
100
+ const text = {
101
+ type: "text",
102
+ text: output$1
103
+ };
104
+ contentParts.push(text);
105
+ return contentParts;
106
+ }
107
+ const attachments = await apiService.listEventAttachments({
108
+ organizationSlug: params.organizationSlug,
109
+ projectSlug: params.projectSlug,
110
+ eventId: params.eventId
111
+ });
112
+ let output = `# Event Attachments\n\n`;
113
+ output += `**Event ID:** ${params.eventId}\n`;
114
+ output += `**Project:** ${params.projectSlug}\n\n`;
115
+ if (attachments.length === 0) {
116
+ output += "No attachments found for this event.\n";
117
+ return output;
118
+ }
119
+ output += `Found ${attachments.length} attachment(s):\n\n`;
120
+ attachments.forEach((attachment, index) => {
121
+ output += `## Attachment ${index + 1}\n\n`;
122
+ output += `**ID:** ${attachment.id}\n`;
123
+ output += `**Name:** ${attachment.name}\n`;
124
+ output += `**Type:** ${attachment.type}\n`;
125
+ output += `**Size:** ${attachment.size} bytes\n`;
126
+ output += `**MIME Type:** ${attachment.mimetype}\n`;
127
+ output += `**Created:** ${attachment.dateCreated}\n`;
128
+ output += `**SHA1:** ${attachment.sha1}\n\n`;
129
+ output += `To download this attachment, use the "get_event_attachment" tool with the attachmentId provided:\n`;
130
+ output += `\`get_event_attachment(organizationSlug="${params.organizationSlug}", projectSlug="${params.projectSlug}", eventId="${params.eventId}", attachmentId="${attachment.id}")\`\n\n`;
131
+ });
132
+ return output;
133
+ }
134
+ });
135
+
136
+ //#endregion
137
+ export { get_event_attachment_default };
138
+ //# sourceMappingURL=get-event-attachment-CuU-_5T6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-event-attachment-CuU-_5T6.js","names":["context: ServerContext","contentParts: (TextContent | ImageContent | EmbeddedResource)[]","image: ImageContent","resource: EmbeddedResource","output","text: TextContent"],"sources":["../src/tools/get-event-attachment.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport type { ServerContext } from \"../types\";\nimport type {\n TextContent,\n ImageContent,\n EmbeddedResource,\n} from \"@modelcontextprotocol/sdk/types.js\";\nimport {\n ParamOrganizationSlug,\n ParamProjectSlug,\n ParamEventId,\n ParamAttachmentId,\n ParamRegionUrl,\n} from \"../schema\";\nimport { setTag } from \"@sentry/core\";\n\nexport default defineTool({\n name: \"get_event_attachment\",\n description: [\n \"Download attachments from a Sentry event.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Download files attached to a specific event\",\n \"- Access screenshots, log files, or other attachments uploaded with an error report\",\n \"- Retrieve attachment metadata and download URLs\",\n \"\",\n \"<examples>\",\n \"### Download a specific attachment by ID\",\n \"\",\n \"```\",\n \"get_event_attachment(organizationSlug='my-organization', projectSlug='my-project', eventId='c49541c747cb4d8aa3efb70ca5aba243', attachmentId='12345')\",\n \"```\",\n \"\",\n \"### List all attachments for an event\",\n \"\",\n \"```\",\n \"get_event_attachment(organizationSlug='my-organization', projectSlug='my-project', eventId='c49541c747cb4d8aa3efb70ca5aba243')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If `attachmentId` is provided, the specific attachment will be downloaded as an embedded resource\",\n \"- If `attachmentId` is omitted, all attachments for the event will be listed with download information\",\n \"- The `projectSlug` is required to identify which project the event belongs to\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug,\n projectSlug: ParamProjectSlug,\n eventId: ParamEventId,\n attachmentId: ParamAttachmentId.optional(),\n regionUrl: ParamRegionUrl.optional(),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n\n setTag(\"organization.slug\", params.organizationSlug);\n\n // If attachmentId is provided, download the specific attachment\n if (params.attachmentId) {\n const attachment = await apiService.getEventAttachment({\n organizationSlug: params.organizationSlug,\n projectSlug: params.projectSlug,\n eventId: params.eventId,\n attachmentId: params.attachmentId,\n });\n\n const contentParts: (TextContent | ImageContent | EmbeddedResource)[] =\n [];\n const isBinary = !attachment.attachment.mimetype?.startsWith(\"text/\");\n\n if (isBinary) {\n const isImage = attachment.attachment.mimetype?.startsWith(\"image/\");\n // Base64 encode the binary attachment content\n // and add to the content as an embedded resource\n const uint8Array = new Uint8Array(await attachment.blob.arrayBuffer());\n let binary = \"\";\n for (let i = 0; i < uint8Array.byteLength; i++) {\n binary += String.fromCharCode(uint8Array[i]);\n }\n if (isImage) {\n const image: ImageContent = {\n type: \"image\",\n mimeType: attachment.attachment.mimetype,\n data: btoa(binary),\n };\n contentParts.push(image);\n } else {\n const resource: EmbeddedResource = {\n id: params.attachmentId,\n type: \"resource\",\n resource: {\n uri: `file://${attachment.filename}`,\n mimeType: attachment.attachment.mimetype,\n blob: btoa(binary),\n },\n };\n contentParts.push(resource);\n }\n }\n\n let output = `# Event Attachment Download\\n\\n`;\n output += `**Event ID:** ${params.eventId}\\n`;\n output += `**Attachment ID:** ${params.attachmentId}\\n`;\n output += `**Filename:** ${attachment.filename}\\n`;\n output += `**Type:** ${attachment.attachment.type}\\n`;\n output += `**Size:** ${attachment.attachment.size} bytes\\n`;\n output += `**MIME Type:** ${attachment.attachment.mimetype}\\n`;\n output += `**Created:** ${attachment.attachment.dateCreated}\\n`;\n output += `**SHA1:** ${attachment.attachment.sha1}\\n\\n`;\n output += `**Download URL:** ${attachment.downloadUrl}\\n\\n`;\n\n if (isBinary) {\n output += `## Binary Content\\n\\n`;\n output += `The attachment is included as a resource and accessible through your client.\\n`;\n } else {\n // If it's a text file and we have blob content, decode and display it instead\n // of embedding it as an image or resource\n const textContent = await attachment.blob.text();\n output += `## File Content\\n\\n`;\n output += `\\`\\`\\`\\n${textContent}\\n\\`\\`\\`\\n\\n`;\n }\n\n const text: TextContent = {\n type: \"text\",\n text: output,\n };\n contentParts.push(text);\n\n return contentParts;\n }\n\n // List all attachments for the event\n const attachments = await apiService.listEventAttachments({\n organizationSlug: params.organizationSlug,\n projectSlug: params.projectSlug,\n eventId: params.eventId,\n });\n\n let output = `# Event Attachments\\n\\n`;\n output += `**Event ID:** ${params.eventId}\\n`;\n output += `**Project:** ${params.projectSlug}\\n\\n`;\n\n if (attachments.length === 0) {\n output += \"No attachments found for this event.\\n\";\n return output;\n }\n\n output += `Found ${attachments.length} attachment(s):\\n\\n`;\n\n attachments.forEach((attachment, index) => {\n output += `## Attachment ${index + 1}\\n\\n`;\n output += `**ID:** ${attachment.id}\\n`;\n output += `**Name:** ${attachment.name}\\n`;\n output += `**Type:** ${attachment.type}\\n`;\n output += `**Size:** ${attachment.size} bytes\\n`;\n output += `**MIME Type:** ${attachment.mimetype}\\n`;\n output += `**Created:** ${attachment.dateCreated}\\n`;\n output += `**SHA1:** ${attachment.sha1}\\n\\n`;\n output += `To download this attachment, use the \"get_event_attachment\" tool with the attachmentId provided:\\n`;\n output += `\\`get_event_attachment(organizationSlug=\"${params.organizationSlug}\", projectSlug=\"${params.projectSlug}\", eventId=\"${params.eventId}\", attachmentId=\"${attachment.id}\")\\`\\n\\n`;\n });\n\n return output;\n },\n});\n"],"mappings":"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"}
@@ -0,0 +1,104 @@
1
+ import { UserInputError } from "./errors-CIoxzIug.js";
2
+ import { defineTool } from "./defineTool-77H4nSna.js";
3
+ import { apiServiceFromContext } from "./api-utils-C6QJAzFL.js";
4
+ import { ParamIssueShortId, ParamIssueUrl, ParamOrganizationSlug, ParamRegionUrl } from "./schema-DtsnsxMl.js";
5
+ import { parseIssueParams } from "./issue-helpers-CqqYnwYE.js";
6
+ import { formatIssueOutput } from "./formatting-pUm38KOj.js";
7
+ import { z } from "zod";
8
+ import { setTag } from "@sentry/core";
9
+
10
+ //#region src/tools/get-issue-details.ts
11
+ var get_issue_details_default = defineTool({
12
+ name: "get_issue_details",
13
+ description: [
14
+ "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.",
15
+ "",
16
+ "**NOTE: If the user asks HOW TO FIX an issue, use `analyze_issue_with_seer` instead!**",
17
+ "",
18
+ "Use this tool when you need to:",
19
+ "- View error details, stacktraces, and metadata",
20
+ "- Investigate when/where an error occurred",
21
+ "- Access raw error information from Sentry",
22
+ "",
23
+ "Do NOT use this tool when:",
24
+ "- User asks \"how do I fix this?\" → Use `analyze_issue_with_seer`",
25
+ "- User wants root cause analysis → Use `analyze_issue_with_seer`",
26
+ "- User needs code fixes → Use `analyze_issue_with_seer`",
27
+ "",
28
+ "<examples>",
29
+ "### Get details for issue ID 'CLOUDFLARE-MCP-41'",
30
+ "",
31
+ "```",
32
+ "get_issue_details(organizationSlug='my-organization', issueId='CLOUDFLARE-MCP-41')",
33
+ "```",
34
+ "",
35
+ "### Get details for event ID 'c49541c747cb4d8aa3efb70ca5aba243'",
36
+ "",
37
+ "```",
38
+ "get_issue_details(organizationSlug='my-organization', eventId='c49541c747cb4d8aa3efb70ca5aba243')",
39
+ "```",
40
+ "</examples>",
41
+ "",
42
+ "<hints>",
43
+ "- If the user provides the `issueUrl`, you can ignore the other parameters.",
44
+ "- If the user provides `issueId` or `eventId` (only one is needed), `organizationSlug` is required.",
45
+ "</hints>"
46
+ ].join("\n"),
47
+ inputSchema: {
48
+ organizationSlug: ParamOrganizationSlug.optional(),
49
+ regionUrl: ParamRegionUrl.optional(),
50
+ issueId: ParamIssueShortId.optional(),
51
+ eventId: z.string().trim().describe("The ID of the event.").optional(),
52
+ issueUrl: ParamIssueUrl.optional()
53
+ },
54
+ async handler(params, context) {
55
+ const apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl });
56
+ if (params.eventId) {
57
+ const orgSlug$1 = params.organizationSlug;
58
+ if (!orgSlug$1) throw new UserInputError("`organizationSlug` is required when providing `eventId`");
59
+ setTag("organization.slug", orgSlug$1);
60
+ const [issue$1] = await apiService.listIssues({
61
+ organizationSlug: orgSlug$1,
62
+ query: params.eventId
63
+ });
64
+ if (!issue$1) return `# Event Not Found\n\nNo issue found for Event ID: ${params.eventId}`;
65
+ const event$1 = await apiService.getEventForIssue({
66
+ organizationSlug: orgSlug$1,
67
+ issueId: issue$1.shortId,
68
+ eventId: params.eventId
69
+ });
70
+ return formatIssueOutput({
71
+ organizationSlug: orgSlug$1,
72
+ issue: issue$1,
73
+ event: event$1,
74
+ apiService
75
+ });
76
+ }
77
+ if (!params.issueUrl && !params.issueId) throw new UserInputError("Either `issueId` or `issueUrl` must be provided");
78
+ if (!params.issueUrl && !params.organizationSlug) throw new UserInputError("`organizationSlug` is required when providing `issueId`");
79
+ const { organizationSlug: orgSlug, issueId: parsedIssueId } = parseIssueParams({
80
+ organizationSlug: params.organizationSlug,
81
+ issueId: params.issueId,
82
+ issueUrl: params.issueUrl
83
+ });
84
+ setTag("organization.slug", orgSlug);
85
+ const issue = await apiService.getIssue({
86
+ organizationSlug: orgSlug,
87
+ issueId: parsedIssueId
88
+ });
89
+ const event = await apiService.getLatestEventForIssue({
90
+ organizationSlug: orgSlug,
91
+ issueId: issue.shortId
92
+ });
93
+ return formatIssueOutput({
94
+ organizationSlug: orgSlug,
95
+ issue,
96
+ event,
97
+ apiService
98
+ });
99
+ }
100
+ });
101
+
102
+ //#endregion
103
+ export { get_issue_details_default };
104
+ //# sourceMappingURL=get-issue-details-CxChU4U9.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-issue-details-CxChU4U9.js","names":["context: ServerContext","orgSlug","issue","event"],"sources":["../src/tools/get-issue-details.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport { parseIssueParams, formatIssueOutput } from \"./utils/issue-utils\";\nimport { UserInputError } from \"../errors\";\nimport type { ServerContext } from \"../types\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamIssueShortId,\n ParamIssueUrl,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"get_issue_details\",\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 \"**NOTE: If the user asks HOW TO FIX an issue, use `analyze_issue_with_seer` instead!**\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View error details, stacktraces, and metadata\",\n \"- Investigate when/where an error occurred\",\n \"- Access raw error information from Sentry\",\n \"\",\n \"Do NOT use this tool when:\",\n '- User asks \"how do I fix this?\" → Use `analyze_issue_with_seer`',\n \"- User wants root cause analysis → Use `analyze_issue_with_seer`\",\n \"- User needs code fixes → Use `analyze_issue_with_seer`\",\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_issue_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 \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n eventId: z.string().trim().describe(\"The ID of the event.\").optional(),\n issueUrl: ParamIssueUrl.optional(),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n\n if (params.eventId) {\n const orgSlug = params.organizationSlug;\n if (!orgSlug) {\n throw new UserInputError(\n \"`organizationSlug` is required when providing `eventId`\",\n );\n }\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 // Validate that we have the minimum required parameters\n if (!params.issueUrl && !params.issueId) {\n throw new UserInputError(\n \"Either `issueId` or `issueUrl` must be provided\",\n );\n }\n\n if (!params.issueUrl && !params.organizationSlug) {\n throw new UserInputError(\n \"`organizationSlug` is required when providing `issueId`\",\n );\n }\n\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n\n setTag(\"organization.slug\", orgSlug);\n\n const issue = await apiService.getIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n });\n const event = await apiService.getLatestEventForIssue({\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n });\n return formatIssueOutput({\n organizationSlug: orgSlug,\n issue,\n event,\n apiService,\n });\n },\n});\n"],"mappings":";;;;;;;;;;AAcA,gCAAe,WAAW;CACxB,MAAM;CACN,aAAa;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACZ,aAAa;EACX,kBAAkB,sBAAsB,UAAU;EAClD,WAAW,eAAe,UAAU;EACpC,SAAS,kBAAkB,UAAU;EACrC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,uBAAuB,CAAC,UAAU;EACtE,UAAU,cAAc,UAAU;CACnC;CACD,MAAM,QAAQ,QAAQA,SAAwB;EAC5C,MAAM,aAAa,sBAAsB,SAAS,EAChD,WAAW,OAAO,UACnB,EAAC;AAEF,MAAI,OAAO,SAAS;GAClB,MAAMC,YAAU,OAAO;AACvB,QAAKA,UACH,OAAM,IAAI,eACR;AAIJ,UAAO,qBAAqBA,UAAQ;GACpC,MAAM,CAACC,QAAM,GAAG,MAAM,WAAW,WAAW;IAC1C,kBAAkBD;IAClB,OAAO,OAAO;GACf,EAAC;AACF,QAAKC,QACH,SAAQ,oDAAoD,OAAO;GAErE,MAAMC,UAAQ,MAAM,WAAW,iBAAiB;IAC9C,kBAAkBF;IAClB,SAASC,QAAM;IACf,SAAS,OAAO;GACjB,EAAC;AACF,UAAO,kBAAkB;IACvB,kBAAkBD;IAClB;IACA;IACA;GACD,EAAC;EACH;AAGD,OAAK,OAAO,aAAa,OAAO,QAC9B,OAAM,IAAI,eACR;AAIJ,OAAK,OAAO,aAAa,OAAO,iBAC9B,OAAM,IAAI,eACR;EAIJ,MAAM,EAAE,kBAAkB,SAAS,SAAS,eAAe,GACzD,iBAAiB;GACf,kBAAkB,OAAO;GACzB,SAAS,OAAO;GAChB,UAAU,OAAO;EAClB,EAAC;AAEJ,SAAO,qBAAqB,QAAQ;EAEpC,MAAM,QAAQ,MAAM,WAAW,SAAS;GACtC,kBAAkB;GAClB,SAAS;EACV,EAAC;EACF,MAAM,QAAQ,MAAM,WAAW,uBAAuB;GACpD,kBAAkB;GAClB,SAAS,MAAM;EAChB,EAAC;AACF,SAAO,kBAAkB;GACvB,kBAAkB;GAClB;GACA;GACA;EACD,EAAC;CACH;AACF,EAAC"}
@@ -0,0 +1,110 @@
1
+ const require_chunk = require('./chunk-DWy1uDak.cjs');
2
+ const require_errors = require('./errors-YmiXLOyx.cjs');
3
+ const require_defineTool = require('./defineTool-lWNTzWl_.cjs');
4
+ const require_api_utils = require('./api-utils-d36iteNO.cjs');
5
+ const require_schema = require('./schema-BpJVmev8.cjs');
6
+ const require_issue_helpers = require('./issue-helpers-DyAIO0w6.cjs');
7
+ const require_formatting = require('./formatting-BlMiQa9i.cjs');
8
+ const zod = require_chunk.__toESM(require("zod"));
9
+ const __sentry_core = require_chunk.__toESM(require("@sentry/core"));
10
+
11
+ //#region src/tools/get-issue-details.ts
12
+ var get_issue_details_default = require_defineTool.defineTool({
13
+ name: "get_issue_details",
14
+ description: [
15
+ "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.",
16
+ "",
17
+ "**NOTE: If the user asks HOW TO FIX an issue, use `analyze_issue_with_seer` instead!**",
18
+ "",
19
+ "Use this tool when you need to:",
20
+ "- View error details, stacktraces, and metadata",
21
+ "- Investigate when/where an error occurred",
22
+ "- Access raw error information from Sentry",
23
+ "",
24
+ "Do NOT use this tool when:",
25
+ "- User asks \"how do I fix this?\" → Use `analyze_issue_with_seer`",
26
+ "- User wants root cause analysis → Use `analyze_issue_with_seer`",
27
+ "- User needs code fixes → Use `analyze_issue_with_seer`",
28
+ "",
29
+ "<examples>",
30
+ "### Get details for issue ID 'CLOUDFLARE-MCP-41'",
31
+ "",
32
+ "```",
33
+ "get_issue_details(organizationSlug='my-organization', issueId='CLOUDFLARE-MCP-41')",
34
+ "```",
35
+ "",
36
+ "### Get details for event ID 'c49541c747cb4d8aa3efb70ca5aba243'",
37
+ "",
38
+ "```",
39
+ "get_issue_details(organizationSlug='my-organization', eventId='c49541c747cb4d8aa3efb70ca5aba243')",
40
+ "```",
41
+ "</examples>",
42
+ "",
43
+ "<hints>",
44
+ "- If the user provides the `issueUrl`, you can ignore the other parameters.",
45
+ "- If the user provides `issueId` or `eventId` (only one is needed), `organizationSlug` is required.",
46
+ "</hints>"
47
+ ].join("\n"),
48
+ inputSchema: {
49
+ organizationSlug: require_schema.ParamOrganizationSlug.optional(),
50
+ regionUrl: require_schema.ParamRegionUrl.optional(),
51
+ issueId: require_schema.ParamIssueShortId.optional(),
52
+ eventId: zod.z.string().trim().describe("The ID of the event.").optional(),
53
+ issueUrl: require_schema.ParamIssueUrl.optional()
54
+ },
55
+ async handler(params, context) {
56
+ const apiService = require_api_utils.apiServiceFromContext(context, { regionUrl: params.regionUrl });
57
+ if (params.eventId) {
58
+ const orgSlug$1 = params.organizationSlug;
59
+ if (!orgSlug$1) throw new require_errors.UserInputError("`organizationSlug` is required when providing `eventId`");
60
+ (0, __sentry_core.setTag)("organization.slug", orgSlug$1);
61
+ const [issue$1] = await apiService.listIssues({
62
+ organizationSlug: orgSlug$1,
63
+ query: params.eventId
64
+ });
65
+ if (!issue$1) return `# Event Not Found\n\nNo issue found for Event ID: ${params.eventId}`;
66
+ const event$1 = await apiService.getEventForIssue({
67
+ organizationSlug: orgSlug$1,
68
+ issueId: issue$1.shortId,
69
+ eventId: params.eventId
70
+ });
71
+ return require_formatting.formatIssueOutput({
72
+ organizationSlug: orgSlug$1,
73
+ issue: issue$1,
74
+ event: event$1,
75
+ apiService
76
+ });
77
+ }
78
+ if (!params.issueUrl && !params.issueId) throw new require_errors.UserInputError("Either `issueId` or `issueUrl` must be provided");
79
+ if (!params.issueUrl && !params.organizationSlug) throw new require_errors.UserInputError("`organizationSlug` is required when providing `issueId`");
80
+ const { organizationSlug: orgSlug, issueId: parsedIssueId } = require_issue_helpers.parseIssueParams({
81
+ organizationSlug: params.organizationSlug,
82
+ issueId: params.issueId,
83
+ issueUrl: params.issueUrl
84
+ });
85
+ (0, __sentry_core.setTag)("organization.slug", orgSlug);
86
+ const issue = await apiService.getIssue({
87
+ organizationSlug: orgSlug,
88
+ issueId: parsedIssueId
89
+ });
90
+ const event = await apiService.getLatestEventForIssue({
91
+ organizationSlug: orgSlug,
92
+ issueId: issue.shortId
93
+ });
94
+ return require_formatting.formatIssueOutput({
95
+ organizationSlug: orgSlug,
96
+ issue,
97
+ event,
98
+ apiService
99
+ });
100
+ }
101
+ });
102
+
103
+ //#endregion
104
+ Object.defineProperty(exports, 'get_issue_details_default', {
105
+ enumerable: true,
106
+ get: function () {
107
+ return get_issue_details_default;
108
+ }
109
+ });
110
+ //# sourceMappingURL=get-issue-details-DFwZRbmU.cjs.map