@sentry/mcp-server 0.9.0 → 0.11.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 (258) hide show
  1. package/README.md +1 -1
  2. package/dist/api-client/client.cjs +4 -4
  3. package/dist/api-client/client.d.cts +3 -3
  4. package/dist/api-client/client.d.ts +3 -3
  5. package/dist/api-client/client.js +2 -2
  6. package/dist/api-client/client.test.cjs +8 -9
  7. package/dist/api-client/client.test.cjs.map +1 -1
  8. package/dist/api-client/client.test.js +4 -4
  9. package/dist/api-client/index.cjs +40 -38
  10. package/dist/api-client/index.d.cts +4 -4
  11. package/dist/api-client/index.d.ts +4 -4
  12. package/dist/api-client/index.js +5 -5
  13. package/dist/api-client/schema.cjs +35 -33
  14. package/dist/api-client/schema.d.cts +2 -2
  15. package/dist/api-client/schema.d.ts +2 -2
  16. package/dist/api-client/schema.js +2 -2
  17. package/dist/api-client/types.cjs +1 -1
  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/{chunk-CsIcISPO.js → chunk-BLXvPPr8.js} +1 -1
  22. package/dist/{chunk-BtT13l48.cjs → chunk-DWy1uDak.cjs} +0 -1
  23. package/dist/{client-1dRfG57H.d.ts → client-Bxf4MxOz.d.cts} +10 -6
  24. package/dist/client-Bxf4MxOz.d.cts.map +1 -0
  25. package/dist/{client-CTm4cvI7.js → client-D5xFZtxK.js} +19 -7
  26. package/dist/client-D5xFZtxK.js.map +1 -0
  27. package/dist/{client-BsYOQsEI.d.cts → client-DOhBiaMJ.d.ts} +9 -5
  28. package/dist/client-DOhBiaMJ.d.ts.map +1 -0
  29. package/dist/{client-DQ837FXP.cjs → client-GKHZSXgV.cjs} +19 -8
  30. package/dist/client-GKHZSXgV.cjs.map +1 -0
  31. package/dist/{dist-wiyJYfAH.cjs → dist-BlIWGSIM.cjs} +318 -164
  32. package/dist/dist-BlIWGSIM.cjs.map +1 -0
  33. package/dist/{dist-BKh-M1A1.js → dist-DDpQABxe.js} +318 -163
  34. package/dist/dist-DDpQABxe.js.map +1 -0
  35. package/dist/errors-B9fwS-aP.cjs +21 -0
  36. package/dist/errors-B9fwS-aP.cjs.map +1 -0
  37. package/dist/errors-BJSrT6Ou.js +15 -0
  38. package/dist/errors-BJSrT6Ou.js.map +1 -0
  39. package/dist/errors.cjs +3 -0
  40. package/dist/errors.d.cts +12 -0
  41. package/dist/errors.d.cts.map +1 -0
  42. package/dist/errors.d.ts +12 -0
  43. package/dist/errors.d.ts.map +1 -0
  44. package/dist/errors.js +3 -0
  45. package/dist/errors.test.cjs +24 -0
  46. package/dist/errors.test.cjs.map +1 -0
  47. package/dist/errors.test.d.cts +1 -0
  48. package/dist/errors.test.d.ts +1 -0
  49. package/dist/errors.test.js +24 -0
  50. package/dist/errors.test.js.map +1 -0
  51. package/dist/{formatting-BQRAzO5v.js → formatting-BaARL2gT.js} +11 -3
  52. package/dist/formatting-BaARL2gT.js.map +1 -0
  53. package/dist/{formatting-C-0bHtbh.cjs → formatting-C2kN0ok6.cjs} +11 -4
  54. package/dist/formatting-C2kN0ok6.cjs.map +1 -0
  55. package/dist/index.cjs +19 -19
  56. package/dist/index.js +18 -17
  57. package/dist/index.js.map +1 -1
  58. package/dist/internal/formatting.cjs +4 -4
  59. package/dist/internal/formatting.d.cts +4 -5
  60. package/dist/internal/formatting.d.cts.map +1 -1
  61. package/dist/internal/formatting.d.ts +4 -5
  62. package/dist/internal/formatting.d.ts.map +1 -1
  63. package/dist/internal/formatting.js +1 -1
  64. package/dist/internal/issue-helpers.cjs +4 -4
  65. package/dist/internal/issue-helpers.d.cts +2 -2
  66. package/dist/internal/issue-helpers.d.cts.map +1 -1
  67. package/dist/internal/issue-helpers.d.ts +2 -2
  68. package/dist/internal/issue-helpers.d.ts.map +1 -1
  69. package/dist/internal/issue-helpers.js +1 -1
  70. package/dist/internal/issue-helpers.test.cjs +23 -27
  71. package/dist/internal/issue-helpers.test.cjs.map +1 -1
  72. package/dist/internal/issue-helpers.test.js +7 -10
  73. package/dist/internal/issue-helpers.test.js.map +1 -1
  74. package/dist/{issue-helpers-DbsECZFq.cjs → issue-helpers-71XgJVXC.cjs} +8 -3
  75. package/dist/issue-helpers-71XgJVXC.cjs.map +1 -0
  76. package/dist/{issue-helpers-CyoHu5j4.js → issue-helpers-CSNNO03f.js} +8 -2
  77. package/dist/issue-helpers-CSNNO03f.js.map +1 -0
  78. package/dist/{logging-BEMgC5SA.cjs → logging-ByvSjT6V.cjs} +2 -3
  79. package/dist/{logging-BEMgC5SA.cjs.map → logging-ByvSjT6V.cjs.map} +1 -1
  80. package/dist/{logging-Cxm8lQvg.js → logging-CXLD0FFB.js} +1 -1
  81. package/dist/{logging-Cxm8lQvg.js.map → logging-CXLD0FFB.js.map} +1 -1
  82. package/dist/logging.cjs +2 -2
  83. package/dist/logging.d.cts +1 -2
  84. package/dist/logging.d.cts.map +1 -1
  85. package/dist/logging.d.ts +1 -2
  86. package/dist/logging.d.ts.map +1 -1
  87. package/dist/logging.js +1 -1
  88. package/dist/{magic-string.es-m-ldRjOa.cjs → magic-string.es-CybcVAw7.cjs} +2 -3
  89. package/dist/{magic-string.es-m-ldRjOa.cjs.map → magic-string.es-CybcVAw7.cjs.map} +1 -1
  90. package/dist/{promptDefinitions-5jiZMBg5.cjs → promptDefinitions-D3ll3qCd.cjs} +6 -7
  91. package/dist/promptDefinitions-D3ll3qCd.cjs.map +1 -0
  92. package/dist/{promptDefinitions-Dcz3d9wL.d.cts → promptDefinitions-DMucOchd.d.cts} +5 -5
  93. package/dist/promptDefinitions-DMucOchd.d.cts.map +1 -0
  94. package/dist/{promptDefinitions-DrGK-v8n.d.ts → promptDefinitions-H0q1_X-K.d.ts} +6 -6
  95. package/dist/promptDefinitions-H0q1_X-K.d.ts.map +1 -0
  96. package/dist/{promptDefinitions-CPTadtuI.js → promptDefinitions-aKmUZWWO.js} +5 -5
  97. package/dist/promptDefinitions-aKmUZWWO.js.map +1 -0
  98. package/dist/promptDefinitions.cjs +3 -3
  99. package/dist/promptDefinitions.d.cts +1 -1
  100. package/dist/promptDefinitions.d.ts +1 -1
  101. package/dist/promptDefinitions.js +2 -2
  102. package/dist/{prompts-DgWOD2rU.js → prompts-CzD0yl7Z.js} +1 -1
  103. package/dist/{prompts-DgWOD2rU.js.map → prompts-CzD0yl7Z.js.map} +1 -1
  104. package/dist/{prompts-nfFU-zY-.cjs → prompts-DMwoay8l.cjs} +1 -2
  105. package/dist/{prompts-nfFU-zY-.cjs.map → prompts-DMwoay8l.cjs.map} +1 -1
  106. package/dist/prompts.cjs +2 -2
  107. package/dist/prompts.d.cts +6 -7
  108. package/dist/prompts.d.cts.map +1 -1
  109. package/dist/prompts.d.ts +6 -7
  110. package/dist/prompts.d.ts.map +1 -1
  111. package/dist/prompts.js +1 -1
  112. package/dist/{resources-BAE7VVZZ.cjs → resources-D6TW2ER0.cjs} +1 -2
  113. package/dist/{resources-BAE7VVZZ.cjs.map → resources-D6TW2ER0.cjs.map} +1 -1
  114. package/dist/{resources-OM3EAnnj.js → resources-x-GaokG8.js} +1 -1
  115. package/dist/{resources-OM3EAnnj.js.map → resources-x-GaokG8.js.map} +1 -1
  116. package/dist/resources.cjs +2 -2
  117. package/dist/resources.d.cts +0 -1
  118. package/dist/resources.d.cts.map +1 -1
  119. package/dist/resources.d.ts +0 -1
  120. package/dist/resources.d.ts.map +1 -1
  121. package/dist/resources.js +1 -1
  122. package/dist/schema-B8lT632E.cjs +77 -0
  123. package/dist/schema-B8lT632E.cjs.map +1 -0
  124. package/dist/schema-BkHf97d7.js +17 -0
  125. package/dist/schema-BkHf97d7.js.map +1 -0
  126. package/dist/{schema-CaJV2aIO.d.cts → schema-C-MLkWMc.d.ts} +385 -272
  127. package/dist/schema-C-MLkWMc.d.ts.map +1 -0
  128. package/dist/{schema-nyYqVk4Y.js → schema-CewAKS9A.js} +19 -3
  129. package/dist/schema-CewAKS9A.js.map +1 -0
  130. package/dist/{schema-KEMqYaQn.cjs → schema-DkyWSqp_.cjs} +31 -4
  131. package/dist/schema-DkyWSqp_.cjs.map +1 -0
  132. package/dist/{schema-DwPOkoSP.d.ts → schema-DqxkW9Tx.d.cts} +387 -274
  133. package/dist/schema-DqxkW9Tx.d.cts.map +1 -0
  134. package/dist/schema.cjs +11 -9
  135. package/dist/schema.d.cts +4 -3
  136. package/dist/schema.d.cts.map +1 -1
  137. package/dist/schema.d.ts +4 -3
  138. package/dist/schema.d.ts.map +1 -1
  139. package/dist/schema.js +2 -2
  140. package/dist/{server-BWoJZj5B.cjs → server-pGtEIwE3.cjs} +33 -27
  141. package/dist/server-pGtEIwE3.cjs.map +1 -0
  142. package/dist/{server-DtNbD1c-.js → server-qpWdf-ST.js} +32 -25
  143. package/dist/server-qpWdf-ST.js.map +1 -0
  144. package/dist/server.cjs +16 -15
  145. package/dist/server.d.cts +4 -5
  146. package/dist/server.d.cts.map +1 -1
  147. package/dist/server.d.ts +4 -5
  148. package/dist/server.d.ts.map +1 -1
  149. package/dist/server.js +15 -14
  150. package/dist/{stdio-D4oW-qT6.js → stdio-D8u2W847.js} +2 -2
  151. package/dist/{stdio-D4oW-qT6.js.map → stdio-D8u2W847.js.map} +1 -1
  152. package/dist/{stdio-BLzMxGqU.cjs → stdio-DydB2Pxu.cjs} +3 -4
  153. package/dist/{stdio-BLzMxGqU.cjs.map → stdio-DydB2Pxu.cjs.map} +1 -1
  154. package/dist/test-setup.cjs +1568 -1320
  155. package/dist/test-setup.cjs.map +1 -1
  156. package/dist/test-setup.js +1568 -1319
  157. package/dist/test-setup.js.map +1 -1
  158. package/dist/{toolDefinitions-BF-D81bS.js → toolDefinitions-BSC2D_S-.js} +95 -79
  159. package/dist/toolDefinitions-BSC2D_S-.js.map +1 -0
  160. package/dist/{toolDefinitions-CO65cU86.cjs → toolDefinitions-BtHN8t_d.cjs} +96 -81
  161. package/dist/toolDefinitions-BtHN8t_d.cjs.map +1 -0
  162. package/dist/{toolDefinitions-CCscRQoM.d.ts → toolDefinitions-Dp13BpEu.d.cts} +58 -26
  163. package/dist/toolDefinitions-Dp13BpEu.d.cts.map +1 -0
  164. package/dist/{toolDefinitions-K_TVqaLU.d.cts → toolDefinitions-fQrpWznJ.d.ts} +57 -25
  165. package/dist/toolDefinitions-fQrpWznJ.d.ts.map +1 -0
  166. package/dist/toolDefinitions.cjs +3 -3
  167. package/dist/toolDefinitions.d.cts +1 -1
  168. package/dist/toolDefinitions.d.ts +1 -1
  169. package/dist/toolDefinitions.js +2 -2
  170. package/dist/toolDefinitions.test.cjs +3 -4
  171. package/dist/toolDefinitions.test.cjs.map +1 -1
  172. package/dist/toolDefinitions.test.js +3 -3
  173. package/dist/{tools-B8ufMRZx.js → tools-4Rtn4WEf.js} +58 -57
  174. package/dist/tools-4Rtn4WEf.js.map +1 -0
  175. package/dist/{tools-BYt-G6p2.cjs → tools-DHHqAqP9.cjs} +59 -59
  176. package/dist/tools-DHHqAqP9.cjs.map +1 -0
  177. package/dist/tools.cjs +10 -9
  178. package/dist/tools.d.cts +55 -26
  179. package/dist/tools.d.cts.map +1 -1
  180. package/dist/tools.d.ts +55 -26
  181. package/dist/tools.d.ts.map +1 -1
  182. package/dist/tools.js +9 -8
  183. package/dist/tools.test.cjs +154 -62
  184. package/dist/tools.test.cjs.map +1 -1
  185. package/dist/tools.test.js +135 -42
  186. package/dist/tools.test.js.map +1 -1
  187. package/dist/transports/stdio.cjs +17 -16
  188. package/dist/transports/stdio.d.cts +4 -5
  189. package/dist/transports/stdio.d.cts.map +1 -1
  190. package/dist/transports/stdio.d.ts +4 -5
  191. package/dist/transports/stdio.d.ts.map +1 -1
  192. package/dist/transports/stdio.js +16 -15
  193. package/dist/{types-TaJcaAVg.d.cts → types-CbLyQvVe.d.cts} +3 -4
  194. package/dist/types-CbLyQvVe.d.cts.map +1 -0
  195. package/dist/{types-Ds7qzCBB.d.ts → types-CcffrLXB.d.cts} +5 -5
  196. package/dist/types-CcffrLXB.d.cts.map +1 -0
  197. package/dist/{types-DyM4kaGZ.d.ts → types-CfJ51LyL.d.ts} +3 -4
  198. package/dist/types-CfJ51LyL.d.ts.map +1 -0
  199. package/dist/{types-CPuN4Qmi.d.cts → types-DuUmV9zh.d.ts} +5 -5
  200. package/dist/types-DuUmV9zh.d.ts.map +1 -0
  201. package/dist/types.d.cts +3 -3
  202. package/dist/types.d.ts +3 -3
  203. package/dist/version-BT9r_3jm.js +6 -0
  204. package/dist/{version-dTEKpaGt.js.map → version-BT9r_3jm.js.map} +1 -1
  205. package/dist/{version-B0O4KvZ9.cjs → version-CRzAHHGZ.cjs} +2 -3
  206. package/dist/{version-B0O4KvZ9.cjs.map → version-CRzAHHGZ.cjs.map} +1 -1
  207. package/dist/version.cjs +2 -2
  208. package/dist/version.d.cts +1 -2
  209. package/dist/version.d.cts.map +1 -1
  210. package/dist/version.d.ts +1 -2
  211. package/dist/version.d.ts.map +1 -1
  212. package/dist/version.js +1 -1
  213. package/dist/{vi.ClIskdbk-De9q3829.js → vi.bdSIJ99Y-BfJr7I2s.js} +241 -171
  214. package/dist/vi.bdSIJ99Y-BfJr7I2s.js.map +1 -0
  215. package/dist/{vi.ClIskdbk-Bs263gvI.cjs → vi.bdSIJ99Y-Dft_B_Ta.cjs} +243 -182
  216. package/dist/vi.bdSIJ99Y-Dft_B_Ta.cjs.map +1 -0
  217. package/package.json +8 -8
  218. package/dist/client-1dRfG57H.d.ts.map +0 -1
  219. package/dist/client-BsYOQsEI.d.cts.map +0 -1
  220. package/dist/client-CTm4cvI7.js.map +0 -1
  221. package/dist/client-DQ837FXP.cjs.map +0 -1
  222. package/dist/dist-BKh-M1A1.js.map +0 -1
  223. package/dist/dist-wiyJYfAH.cjs.map +0 -1
  224. package/dist/formatting-BQRAzO5v.js.map +0 -1
  225. package/dist/formatting-C-0bHtbh.cjs.map +0 -1
  226. package/dist/issue-helpers-CyoHu5j4.js.map +0 -1
  227. package/dist/issue-helpers-DbsECZFq.cjs.map +0 -1
  228. package/dist/promptDefinitions-5jiZMBg5.cjs.map +0 -1
  229. package/dist/promptDefinitions-CPTadtuI.js.map +0 -1
  230. package/dist/promptDefinitions-Dcz3d9wL.d.cts.map +0 -1
  231. package/dist/promptDefinitions-DrGK-v8n.d.ts.map +0 -1
  232. package/dist/schema-BCkBPgjj.cjs +0 -64
  233. package/dist/schema-BCkBPgjj.cjs.map +0 -1
  234. package/dist/schema-CJrk_GUH.js +0 -15
  235. package/dist/schema-CJrk_GUH.js.map +0 -1
  236. package/dist/schema-CaJV2aIO.d.cts.map +0 -1
  237. package/dist/schema-DwPOkoSP.d.ts.map +0 -1
  238. package/dist/schema-KEMqYaQn.cjs.map +0 -1
  239. package/dist/schema-nyYqVk4Y.js.map +0 -1
  240. package/dist/server-BWoJZj5B.cjs.map +0 -1
  241. package/dist/server-DtNbD1c-.js.map +0 -1
  242. package/dist/toolDefinitions-BF-D81bS.js.map +0 -1
  243. package/dist/toolDefinitions-CCscRQoM.d.ts.map +0 -1
  244. package/dist/toolDefinitions-CO65cU86.cjs.map +0 -1
  245. package/dist/toolDefinitions-K_TVqaLU.d.cts.map +0 -1
  246. package/dist/tools-B8ufMRZx.js.map +0 -1
  247. package/dist/tools-BYt-G6p2.cjs.map +0 -1
  248. package/dist/types-CPuN4Qmi.d.cts.map +0 -1
  249. package/dist/types-Ds7qzCBB.d.ts.map +0 -1
  250. package/dist/types-DyM4kaGZ.d.ts.map +0 -1
  251. package/dist/types-TaJcaAVg.d.cts.map +0 -1
  252. package/dist/version-dTEKpaGt.js +0 -6
  253. package/dist/vi.ClIskdbk-Bs263gvI.cjs.map +0 -1
  254. package/dist/vi.ClIskdbk-De9q3829.js.map +0 -1
  255. /package/dist/{api-client-9mzrj2HY.js → api-client-CL1WDkw9.cjs} +0 -0
  256. /package/dist/{api-client-CEBuz3Zu.cjs → api-client-CNv_hbPO.js} +0 -0
  257. /package/dist/{types-H-TSmRpm.js → types-6zHoEWAx.js} +0 -0
  258. /package/dist/{types-o3zWarRp.cjs → types-MYBaygjr.cjs} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"tools.test.cjs","names":["TOOL_HANDLERS"],"sources":["../src/tools.test.ts"],"sourcesContent":["import { describe, it, expect } from \"vitest\";\nimport { TOOL_HANDLERS } from \"./tools\";\n\ndescribe(\"list_organizations\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.list_organizations;\n const result = await tool({\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n });\n expect(result).toMatchInlineSnapshot(`\n \"# Organizations\n\n ## **sentry-mcp-evals**\n\n **Web URL:** https://sentry.io/sentry-mcp-evals\n **Region URL:** https://us.sentry.io\n\n # Using this information\n\n - The organization's name is the identifier for the organization, and is used in many tools for \\`organizationSlug\\`.\n - If a tool supports passing in the \\`regionUrl\\`, you should also pass in the correct value there.\n \"\n `);\n });\n});\n\ndescribe(\"list_teams\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.list_teams;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Teams in **sentry-mcp-evals**\n\n - the-goats\n \"\n `);\n });\n});\n\ndescribe(\"list_projects\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.list_projects;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Projects in **sentry-mcp-evals**\n\n - **cloudflare-mcp**\n \"\n `);\n });\n});\n\ndescribe(\"list_issues\", () => {\n it(\"serializes with project\", async () => {\n const tool = TOOL_HANDLERS.list_issues;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: \"cloudflare-mcp\",\n query: undefined,\n sortBy: \"last_seen\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issues in **sentry-mcp-evals/cloudflare-mcp**\n\n ## CLOUDFLARE-MCP-41\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n\n ## CLOUDFLARE-MCP-42\n\n **Description**: Error: Tool list_issues is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-11T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-42\n\n # Using this information\n\n - You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\n - You can get more details about a specific issue by using the tool: \\`get_issue_details(organizationSlug=\"sentry-mcp-evals\", issueId=<issueID>)\\`\n \"\n `);\n });\n\n it(\"serializes without project\", async () => {\n const tool = TOOL_HANDLERS.list_issues;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: undefined,\n query: undefined,\n sortBy: \"last_seen\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issues in **sentry-mcp-evals**\n\n ## CLOUDFLARE-MCP-41\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n\n ## CLOUDFLARE-MCP-42\n\n **Description**: Error: Tool list_issues is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-11T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-42\n\n # Using this information\n\n - You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\n - You can get more details about a specific issue by using the tool: \\`get_issue_details(organizationSlug=\"sentry-mcp-evals\", issueId=<issueID>)\\`\n \"\n `);\n });\n});\n\ndescribe(\"list_releases\", () => {\n it(\"works without project\", async () => {\n const tool = TOOL_HANDLERS.list_releases;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: undefined,\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Releases in **sentry-mcp-evals**\n\n ## 8ce89484-0fec-4913-a2cd-e8e2d41dee36\n\n **Created**: 2025-04-13T19:54:21.764Z\n **First Event**: 2025-04-13T19:54:21.000Z\n **Last Event**: 2025-04-13T20:28:23.000Z\n **New Issues**: 0\n **Projects**: cloudflare-mcp\n\n # Using this information\n\n - You can reference the Release version in commit messages or documentation.\n - You can search for issues in a specific release using the \\`search_errors()\\` tool with the query \\`release:8ce89484-0fec-4913-a2cd-e8e2d41dee36\\`.\n \"\n `);\n });\n it(\"works with project\", async () => {\n const tool = TOOL_HANDLERS.list_releases;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: \"cloudflare-mcp\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Releases in **sentry-mcp-evals/cloudflare-mcp**\n\n ## 8ce89484-0fec-4913-a2cd-e8e2d41dee36\n\n **Created**: 2025-04-13T19:54:21.764Z\n **First Event**: 2025-04-13T19:54:21.000Z\n **Last Event**: 2025-04-13T20:28:23.000Z\n **New Issues**: 0\n **Projects**: cloudflare-mcp\n\n # Using this information\n\n - You can reference the Release version in commit messages or documentation.\n - You can search for issues in a specific release using the \\`search_errors()\\` tool with the query \\`release:8ce89484-0fec-4913-a2cd-e8e2d41dee36\\`.\n \"\n `);\n });\n});\n\ndescribe(\"list_tags\", () => {\n it(\"works\", async () => {\n const tool = TOOL_HANDLERS.list_tags;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: undefined,\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Tags in **sentry-mcp-evals**\n\n - transaction\n - runtime.name\n - level\n - device\n - os\n - user\n - runtime\n - release\n - url\n - uptime_rule\n - server_name\n - browser\n - os.name\n - device.family\n - replayId\n - client_os.name\n - environment\n - service\n - browser.name\n\n # Using this information\n\n - You can reference tags in the \\`query\\` parameter of various tools: \\`tagName:tagValue\\`.\n \"\n `);\n });\n});\n\ndescribe(\"search_errors\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.search_errors;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: undefined,\n filename: undefined,\n transaction: undefined,\n query: undefined,\n sortBy: \"count\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Errors in **sentry-mcp-evals**\n\n\n ## CLOUDFLARE-MCP-41\n\n **Description**: Error: Tool list_organizations is already registered\n **Issue ID**: CLOUDFLARE-MCP-41\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n **Project**: test-suite\n **Last Seen**: 2025-04-07T12:23:39+00:00\n **Occurrences**: 2\n\n # Using this information\n\n - You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\n - You can get more details about an error by using the tool: \\`get_issue_details(organizationSlug=\"sentry-mcp-evals\", issueId=<issueID>)\\`\n \"\n `);\n });\n});\n\ndescribe(\"search_transactions\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.search_transactions;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: undefined,\n transaction: undefined,\n query: undefined,\n sortBy: \"duration\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Transactions in **sentry-mcp-evals**\n\n\n ## GET /trpc/bottleList\n\n **Span ID**: 07752c6aeb027c8f\n **Trace ID**: 6a477f5b0f31ef7b6b9b5e1dea66c91d\n **Span Operation**: http.server\n **Span Description**: GET /trpc/bottleList\n **Duration**: 12\n **Timestamp**: 2025-04-13T14:19:18+00:00\n **Project**: peated\n **URL**: https://sentry-mcp-evals.sentry.io/explore/traces/trace/6a477f5b0f31ef7b6b9b5e1dea66c91d\n\n ## GET /trpc/bottleList\n\n **Span ID**: 7ab5edf5b3ba42c9\n **Trace ID**: 54177131c7b192a446124daba3136045\n **Span Operation**: http.server\n **Span Description**: GET /trpc/bottleList\n **Duration**: 18\n **Timestamp**: 2025-04-13T14:19:17+00:00\n **Project**: peated\n **URL**: https://sentry-mcp-evals.sentry.io/explore/traces/trace/54177131c7b192a446124daba3136045\n\n \"\n `);\n });\n});\n\ndescribe(\"get_issue_details\", () => {\n it(\"serializes with issueId\", async () => {\n const tool = TOOL_HANDLERS.get_issue_details;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"CLOUDFLARE-MCP-41\",\n eventId: undefined,\n issueUrl: undefined,\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issue CLOUDFLARE-MCP-41 in **sentry-mcp-evals**\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **Occurrences**: 25\n **Users Impacted**: 1\n **Status**: unresolved\n **Platform**: javascript\n **Project**: CLOUDFLARE-MCP\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n\n ## Event Details\n\n **Event ID**: 7ca573c0f4814912aaa9bdc77d1a7d51\n **Occurred At**: 2025-04-08T21:15:04.000Z\n **Error:**\n \\`\\`\\`\n Error: Tool list_organizations is already registered\n \\`\\`\\`\n\n **Stacktrace:**\n \\`\\`\\`\n index.js:7809:27\n index.js:8029:24 (OAuthProviderImpl.fetch)\n index.js:19631:28 (Object.fetch)\n \\`\\`\\`\n\n **HTTP Method:** GET\n **URL:** https://mcp.sentry.dev/sse\n # Using this information\n\n - You can reference the IssueID in commit messages (e.g. \\`Fixes CLOUDFLARE-MCP-41\\`) to automatically close the issue when the commit is merged.\n - The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\n \"\n `);\n });\n\n it(\"serializes with issueUrl\", async () => {\n const tool = TOOL_HANDLERS.get_issue_details;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: undefined,\n issueId: undefined,\n eventId: undefined,\n issueUrl: \"https://sentry-mcp-evals.sentry.io/issues/6507376925\",\n regionUrl: undefined,\n },\n );\n\n expect(result).toMatchInlineSnapshot(`\n \"# Issue CLOUDFLARE-MCP-41 in **sentry-mcp-evals**\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **Occurrences**: 25\n **Users Impacted**: 1\n **Status**: unresolved\n **Platform**: javascript\n **Project**: CLOUDFLARE-MCP\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n\n ## Event Details\n\n **Event ID**: 7ca573c0f4814912aaa9bdc77d1a7d51\n **Occurred At**: 2025-04-08T21:15:04.000Z\n **Error:**\n \\`\\`\\`\n Error: Tool list_organizations is already registered\n \\`\\`\\`\n\n **Stacktrace:**\n \\`\\`\\`\n index.js:7809:27\n index.js:8029:24 (OAuthProviderImpl.fetch)\n index.js:19631:28 (Object.fetch)\n \\`\\`\\`\n\n **HTTP Method:** GET\n **URL:** https://mcp.sentry.dev/sse\n # Using this information\n\n - You can reference the IssueID in commit messages (e.g. \\`Fixes CLOUDFLARE-MCP-41\\`) to automatically close the issue when the commit is merged.\n - The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\n \"\n `);\n });\n it(\"serializes with eventId\", async () => {\n const tool = TOOL_HANDLERS.get_issue_details;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n issueId: undefined,\n issueUrl: undefined,\n eventId: \"7ca573c0f4814912aaa9bdc77d1a7d51\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issue CLOUDFLARE-MCP-41 in **sentry-mcp-evals**\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **Occurrences**: 25\n **Users Impacted**: 1\n **Status**: unresolved\n **Platform**: javascript\n **Project**: CLOUDFLARE-MCP\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n\n ## Event Details\n\n **Event ID**: 7ca573c0f4814912aaa9bdc77d1a7d51\n **Occurred At**: 2025-04-08T21:15:04.000Z\n **Error:**\n \\`\\`\\`\n Error: Tool list_organizations is already registered\n \\`\\`\\`\n\n **Stacktrace:**\n \\`\\`\\`\n index.js:7809:27\n index.js:8029:24 (OAuthProviderImpl.fetch)\n index.js:19631:28 (Object.fetch)\n \\`\\`\\`\n\n **HTTP Method:** GET\n **URL:** https://mcp.sentry.dev/sse\n # Using this information\n\n - You can reference the IssueID in commit messages (e.g. \\`Fixes CLOUDFLARE-MCP-41\\`) to automatically close the issue when the commit is merged.\n - The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\n \"\n `);\n });\n});\n\ndescribe(\"create_team\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.create_team;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n name: \"the-goats\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# New Team in **sentry-mcp-evals**\n\n **ID**: 4509109078196224\n **Slug**: the-goats\n **Name**: the-goats\n # Using this information\n\n - You should always inform the user of the Team Slug value.\n \"\n `);\n });\n});\n\ndescribe(\"create_project\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.create_project;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n teamSlug: \"the-goats\",\n name: \"cloudflare-mcp\",\n platform: \"javascript\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# New Project in **sentry-mcp-evals**\n\n **ID**: 4509109104082945\n **Slug**: cloudflare-mcp\n **Name**: cloudflare-mcp\n **SENTRY_DSN**: https://d20df0a1ab5031c7f3c7edca9c02814d@o4509106732793856.ingest.us.sentry.io/4509109104082945\n\n # Using this information\n\n - You can reference the **SENTRY_DSN** value to initialize Sentry's SDKs.\n - You should always inform the user of the **SENTRY_DSN** and Project Slug values.\n \"\n `);\n });\n});\n\ndescribe(\"create_dsn\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.create_dsn;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: \"cloudflare-mcp\",\n name: \"Default\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# New DSN in **sentry-mcp-evals/cloudflare-mcp**\n\n **DSN**: https://d20df0a1ab5031c7f3c7edca9c02814d@o4509106732793856.ingest.us.sentry.io/4509109104082945\n **Name**: Default\n\n # Using this information\n\n - The \\`SENTRY_DSN\\` value is a URL that you can use to initialize Sentry's SDKs.\n \"\n `);\n });\n});\n\ndescribe(\"list_dsn\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.list_dsns;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: \"cloudflare-mcp\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# DSNs in **sentry-mcp-evals/cloudflare-mcp**\n\n ## Default\n **ID**: d20df0a1ab5031c7f3c7edca9c02814d\n **DSN**: https://d20df0a1ab5031c7f3c7edca9c02814d@o4509106732793856.ingest.us.sentry.io/4509109104082945\n\n # Using this information\n\n - The \\`SENTRY_DSN\\` value is a URL that you can use to initialize Sentry's SDKs.\n \"\n `);\n });\n});\n\ndescribe(\"begin_seer_issue_fix\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.begin_seer_issue_fix;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"PEATED-A8\",\n issueUrl: undefined,\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issue Fix Started for Issue PEATED-A8\n\n **Run ID:**: 123\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 get_seer_issue_fix_status(organizationSlug=\"sentry-mcp-evals\", issueId=\"PEATED-A8\")\n \\`\\`\\`\"\n `);\n });\n});\n\ndescribe(\"get_seer_issue_fix_status\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.get_seer_issue_fix_status;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"PEATED-A8\",\n issueUrl: undefined,\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issue Fix Status for Issue PEATED-A8\n\n ## Analyzing the Issue\n\n **The \\`bottleById\\` query fails because the input ID (3216) doesn't exist in the database.\n **\n The exception details show that the \\`input\\` value at the time of the \\`TRPCError\\` in \\`bottleById.ts\\` was 3216, and the query likely failed because a bottle with ID 3216 was not found in the database.\n\n \\`\\`\\`\n Variable values at the time of the exception::\n {\n \"input\": 3216\n }\n \\`\\`\\`\n\n\n **However, the request also includes a different ID (16720) for \\`bottlePriceList\\`.\n **\n The root cause is likely a mismatch of input IDs within the batched TRPC request, where \\`bottlePriceList\\` expects bottle ID 16720, but \\`bottleById\\` receives a different ID (3216) leading to the \"Bottle not found\" error.\n\n \\`\\`\\`\n GET http://api.peated.com/trpc/bottlePriceList,bottleById\n \\`\\`\\`\n\n \\`\\`\\`json\n {\n \"input\": 3216\n }\n \\`\\`\\`\n\n \\`\\`\\`\n TRPCError: Bottle not found. (occurred in: GET /trpc/bottlePriceList,bottleById)\n \\`\\`\\`\n\n\n **This suggests a data consistency issue or incorrect client-side request.\n **\n The \\`TRPCError\\` originates from \\`bottleById.ts\\` with the input value being \\`3216\\`, indicating the procedure failed to find a bottle with that specific ID in the database.\n\n \\`\\`\\`\n <anonymous> in file /app/apps/server/src/trpc/routes/bottleById.ts [Line 33, column 13] (In app)\n .select({\n ...getTableColumns(bottles),\n })\n .from(bottleTombstones)\n .innerJoin(bottles, eq(bottleTombstones.newBottleId, bottles.id))\n .where(eq(bottleTombstones.bottleId, input));\n if (!bottle) {\n throw new TRPCError({ <-- SUSPECT LINE\n message: \"Bottle not found.\",\n code: \"NOT_FOUND\",\n });\n }\n }\n\n const createdBy = await db.query.users.findFirst({\n ---\n Variable values at the time of the exception::\n {\n \"input\": 3216\n }\n \\`\\`\\`\n\n\n\n ## Root Cause Analysis\n\n **The client initiates a batched TRPC request to the \\`/trpc/bottlePriceList,bottleById\\` endpoint, intending to fetch both the price list and details for a specific bottle.**\n\n This is the entry point where the client requests data from two different procedures in a single HTTP request. The server needs to correctly route and process the parameters for each procedure.\n\n **The TRPC server receives the batched request and begins processing the \\`bottlePriceList\\` procedure, intending to fetch the price list for bottle ID 16720.**\n\n \\`\\`\\`typescript\n // apps/server/src/trpc/routes/bottlePriceList.ts\n .input(z.object({ bottle: z.number(), onlyValid: z.boolean().optional() }))\n .query(async function ({ input, ctx }) {\n const [bottle] = await db.select().from(bottles).where(eq(bottles.id, input.bottle));\n if (!bottle) { ... }\n \\`\\`\\`\n This procedure expects a 'bottle' parameter in the input, which is used to query the database.\n\n **The TRPC server also processes the \\`bottleById\\` procedure, but due to a parameter mapping issue or client-side error, it receives bottle ID 3216 as input instead of 16720.**\n\n \\`\\`\\`typescript\n // apps/server/src/trpc/routes/bottleById.ts\n export default publicProcedure.input(z.number()).query(async function ({ input, ctx }) {\n let [bottle] = await db.select().from(bottles).where(eq(bottles.id, input));\n if (!bottle) { ... }\n \\`\\`\\`\n This procedure expects a numerical ID as input to find the bottle.\n\n **The \\`bottleById\\` procedure queries the \\`bottles\\` table for a bottle with ID 3216, but no such bottle exists.**\n\n The database query returns no results because bottle ID 3216 is not present in the \\`bottles\\` table.\n\n **The \\`bottleById\\` procedure then checks the \\`bottleTombstones\\` table to see if bottle ID 3216 has been tombstoned (redirected to a new ID), but no such tombstone exists.**\n\n The query to \\`bottleTombstones\\` also returns no results, indicating that bottle ID 3216 has not been redirected.\n\n **Since the \\`bottleById\\` procedure cannot find a bottle with ID 3216 in either the \\`bottles\\` or \\`bottleTombstones\\` tables, it throws a \\`TRPCError\\` with the message \"Bottle not found.\"**\n\n \\`\\`\\`typescript\n // apps/server/src/trpc/routes/bottleById.ts\n if (!bottle) {\n throw new TRPCError({ message: \"Bottle not found.\", code: \"NOT_FOUND\" });\n }\n \\`\\`\\`\n This is where the error is thrown, indicating that the bottle could not be found.\n\n\n ## Planning Solution\n\n **The discrepancy between inputs suggests a potential issue with batch request handling.\n **\n The \\`TRPCError\\` occurred in \\`bottleById.ts\\` with an input of \\`3216\\`, while the request was initiated with a bottle ID of \\`16720\\`, indicating a mismatch in the bottle ID being processed.\n\n \\`\\`\\`\n Variable values at the time of the exception::\n {\n \"input\": 3216\n }\n \\`\\`\\`\n\n \\`\\`\\`\n GET http://api.peated.com/trpc/bottlePriceList,bottleById\n \\`\\`\\`\n\n\n **The client-side batch request construction is the most likely source of error.\n **\n The discrepancy between the bottle ID in the error message (16720) and the ID being processed (3216) strongly suggests a client-side parameter mapping issue in the batched TRPC request.\n\n To fix this, I propose the following steps:\n\n 1. **Inspect the Client-Side Code:** Identify the code responsible for constructing the TRPC batch request to \\`/trpc/bottlePriceList,bottleById\\`.\n\n 2. **Verify Parameter Mapping:** Ensure that both \\`bottlePriceList\\` and \\`bottleById\\` are receiving the correct bottle ID (which should be 16720 in this case).\n\n 3. **Correct Parameter Assignment:** If the parameters are being incorrectly assigned, modify the client-side code to ensure that both procedures receive the same, correct bottle ID.\n\n 4. **Add Logging (Client-Side):** Add temporary logging to the client-side code to confirm the parameters being sent to each procedure in the batch request. This will help verify the fix.\n\n \\`\\`\\`typescript\n // Example logging (add to the client-side code where the batch request is created)\n console.log(\"bottlePriceList input:\", { bottle: 16720 }); // Replace 16720 with the actual ID\n console.log(\"bottleById input:\", { bottle: 16720 }); // Replace 16720 with the actual ID\n \\`\\`\\`\n\n 5. **Test the Fix:** After applying the fix, test the affected functionality to ensure that the \"Bottle not found\" error is resolved and that both procedures are working correctly.\n\n 6. **Remove Logging:** Once the fix is verified, remove the temporary logging.\n\n This approach directly addresses the most likely cause of the issue and provides a clear path to resolution.\n\n\n **Ensuring consistent bottle IDs will likely resolve this inconsistency.\n **\n The error message references bottle ID 16720, but the exception details show the procedure was actually processing ID 3216, indicating a parameter mismatch in the batch request.\n\n To fix this, I recommend the following steps:\n\n 1. **Client-Side Investigation**:\n\n * Examine the client-side code where the TRPC batch request is constructed.\n * Verify that the same \\`bottleId\\` parameter is being passed to both \\`bottlePriceList\\` and \\`bottleById\\` procedures.\n * If the IDs are being passed correctly, inspect the network request payload to confirm the correct structure of the batched request.\n\n \\`\\`\\`typescript\n // Example (Hypothetical) Client-Side Code\n const bottleId = 16720; // Example bottle ID\n\n // Ensure both procedures receive the same bottleId\n const [priceList, bottleDetails] = await trpc.batch(() => [\n trpc.bottlePriceList.fetch({ bottle: bottleId }),\n trpc.bottleById.fetch(bottleId),\n ]);\n \\`\\`\\`\n\n 2. **Server-Side Logging (Temporary)**:\n\n * Add temporary logging to both \\`bottlePriceList\\` and \\`bottleById\\` procedures to log the received \\`input\\` value.\n * This will help confirm whether the server is receiving the correct IDs from the client.\n * **Important**: Remove these logs after debugging to avoid unnecessary overhead.\n\n \\`\\`\\`typescript\n // apps/server/src/trpc/routes/bottlePriceList.ts\n export default publicProcedure\n .input(\n z.object({\n bottle: z.number(),\n onlyValid: z.boolean().optional(),\n }),\n )\n .query(async function ({ input, ctx }) {\n console.log(\"bottlePriceList input:\", input); // Add this line\n // ... rest of the code\n });\n\n // apps/server/src/trpc/routes/bottleById.ts\n export default publicProcedure.input(z.number()).query(async function ({\n input,\n ctx,\n }) {\n console.log(\"bottleById input:\", input); // Add this line\n // ... rest of the code\n });\n \\`\\`\\`\n\n 3. **TRPC Batch Request Configuration**:\n\n * Review the TRPC batch link configuration on the client-side.\n * Ensure that the batching logic is correctly mapping parameters to the corresponding procedures.\n * If using a custom batching implementation, verify its correctness.\n\n 4. **Data Integrity Check**:\n\n * If the client-side code appears correct, investigate whether bottle ID 3216 should exist in the database.\n * Check the \\`bottles\\` table and \\`bottleTombstones\\` table for any entries related to bottle ID 3216.\n * If the bottle should exist but is missing, investigate potential data deletion or migration issues.\n\n 5. **Tombstone Logic**:\n\n * Double-check the logic for creating and using tombstones.\n * Ensure that when a bottle is deleted, a tombstone entry is created correctly, pointing to the new bottle (if any).\n\n 6. **Error Handling**:\n\n * While this isn't the primary fix, consider improving the error message in \\`bottleById.ts\\` to include more context.\n * Include the original requested bottle ID (if available) in the error message to aid debugging.\n\n 7. **Client-Side Retries**:\n\n * Implement a retry mechanism on the client-side for TRPC requests.\n * If a \"Bottle not found\" error occurs, retry the request a few times before giving up. This can help mitigate transient issues.\n\n By following these steps, you should be able to identify the root cause of the parameter mismatch and implement a fix that ensures consistent bottle IDs are passed to both TRPC procedures in the batch request.\n\n\n\n ## Solution\n\n Consolidate bottle and price data fetching into a single batched TRPC request using \\`Promise.all\\` to ensure ID consistency.\n\n **Create a shared utility function to fetch bottle details and price data together.**\n \\`\\`\\`typescript\n // In a shared utility function or component\n export async function getBottleWithPrices(bottleId: number) {\n const trpcClient = await getTrpcClient();\n \n // Use Promise.all to ensure both requests are part of the same batch\n // and receive the same parameters\n const [bottle, priceList] = await Promise.all([\n trpcClient.bottleById.fetch(bottleId),\n trpcClient.bottlePriceList.fetch({ bottle: bottleId }),\n ]);\n \n return { bottle, priceList };\n }\n \\`\\`\\`\n This code creates a function that uses \\`Promise.all\\` to fetch both bottle details and price data concurrently. This ensures that both TRPC procedures are part of the same batch and receive the same \\`bottleId\\`.\n\n **Modify the page components to use the shared utility function.**\n \\`\\`\\`typescript\n // Then in the page components:\n const { bottle, priceList } = await getBottleWithPrices(Number(bottleId));\n \\`\\`\\`\n This code replaces the separate calls to \\`bottleById\\` and \\`bottlePriceList\\` with a single call to the \\`getBottleWithPrices\\` function, ensuring that both components receive data for the same bottle.\n\n **Add a unit test that reproduces the issue.**\n null\n\n\n \"\n `);\n });\n});\n"],"mappings":";;;;;;;;;;;;;AAGA,sBAAS,sBAAsB,MAAM;AACnC,iBAAG,cAAc,YAAY;EAC3B,MAAM,OAAOA,4BAAc;EAC3B,MAAM,SAAS,MAAM,KA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MAAM,OAAOA,4BAAc;EAC3B,MAAM,SAAS,MAAM,KACnB;GACE,aAAa;GACb,QAAQ;GACR,kBAAkB;EACnB,GACD;GACE,kBAAkB;GAClB,SAAS;GACT;GACA;EACD,EACF;AACD,mCAAO,OAAO,CAAC,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmRpC;CACH,EAAC;AACH,EAAC"}
1
+ {"version":3,"file":"tools.test.cjs","names":["TOOL_HANDLERS"],"sources":["../src/tools.test.ts"],"sourcesContent":["import { describe, it, expect } from \"vitest\";\nimport { TOOL_HANDLERS } from \"./tools\";\n\ndescribe(\"whoami\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.whoami;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(\n `\n \"You are authenticated as John Doe (john.doe@example.com).\n\n Your Sentry User ID is 1.\"\n `,\n );\n });\n});\n\ndescribe(\"find_organizations\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.find_organizations;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Organizations\n\n ## **sentry-mcp-evals**\n\n **Web URL:** https://sentry.io/sentry-mcp-evals\n **Region URL:** https://us.sentry.io\n\n # Using this information\n\n - The organization's name is the identifier for the organization, and is used in many tools for \\`organizationSlug\\`.\n - If a tool supports passing in the \\`regionUrl\\`, you MUST pass in the correct value there.\n \"\n `);\n });\n});\n\ndescribe(\"find_teams\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.find_teams;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Teams in **sentry-mcp-evals**\n\n - the-goats\n \"\n `);\n });\n});\n\ndescribe(\"find_projects\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.find_projects;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Projects in **sentry-mcp-evals**\n\n - **cloudflare-mcp**\n \"\n `);\n });\n});\n\ndescribe(\"find_issues\", () => {\n it(\"serializes with project\", async () => {\n const tool = TOOL_HANDLERS.find_issues;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: \"cloudflare-mcp\",\n query: undefined,\n sortBy: \"last_seen\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issues in **sentry-mcp-evals/cloudflare-mcp**\n\n ## CLOUDFLARE-MCP-41\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n\n ## CLOUDFLARE-MCP-42\n\n **Description**: Error: Tool list_issues is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-11T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-42\n\n # Using this information\n\n - You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\n - You can get more details about a specific issue by using the tool: \\`get_issue_details(organizationSlug=\"sentry-mcp-evals\", issueId=<issueID>)\\`\n \"\n `);\n });\n\n it(\"serializes without project\", async () => {\n const tool = TOOL_HANDLERS.find_issues;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: undefined,\n query: undefined,\n sortBy: \"last_seen\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issues in **sentry-mcp-evals**\n\n ## CLOUDFLARE-MCP-41\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n\n ## CLOUDFLARE-MCP-42\n\n **Description**: Error: Tool list_issues is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-11T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-42\n\n # Using this information\n\n - You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\n - You can get more details about a specific issue by using the tool: \\`get_issue_details(organizationSlug=\"sentry-mcp-evals\", issueId=<issueID>)\\`\n \"\n `);\n });\n});\n\ndescribe(\"find_releases\", () => {\n it(\"works without project\", async () => {\n const tool = TOOL_HANDLERS.find_releases;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: undefined,\n regionUrl: undefined,\n query: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Releases in **sentry-mcp-evals**\n\n ## 8ce89484-0fec-4913-a2cd-e8e2d41dee36\n\n **Created**: 2025-04-13T19:54:21.764Z\n **First Event**: 2025-04-13T19:54:21.000Z\n **Last Event**: 2025-04-13T20:28:23.000Z\n **New Issues**: 0\n **Projects**: cloudflare-mcp\n\n # Using this information\n\n - You can reference the Release version in commit messages or documentation.\n - You can search for issues in a specific release using the \\`find_errors()\\` tool with the query \\`release:8ce89484-0fec-4913-a2cd-e8e2d41dee36\\`.\n \"\n `);\n });\n it(\"works with project\", async () => {\n const tool = TOOL_HANDLERS.find_releases;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: \"cloudflare-mcp\",\n regionUrl: undefined,\n query: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Releases in **sentry-mcp-evals/cloudflare-mcp**\n\n ## 8ce89484-0fec-4913-a2cd-e8e2d41dee36\n\n **Created**: 2025-04-13T19:54:21.764Z\n **First Event**: 2025-04-13T19:54:21.000Z\n **Last Event**: 2025-04-13T20:28:23.000Z\n **New Issues**: 0\n **Projects**: cloudflare-mcp\n\n # Using this information\n\n - You can reference the Release version in commit messages or documentation.\n - You can search for issues in a specific release using the \\`find_errors()\\` tool with the query \\`release:8ce89484-0fec-4913-a2cd-e8e2d41dee36\\`.\n \"\n `);\n });\n});\n\ndescribe(\"find_tags\", () => {\n it(\"works\", async () => {\n const tool = TOOL_HANDLERS.find_tags;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: undefined,\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Tags in **sentry-mcp-evals**\n\n - transaction\n - runtime.name\n - level\n - device\n - os\n - user\n - runtime\n - release\n - url\n - uptime_rule\n - server_name\n - browser\n - os.name\n - device.family\n - replayId\n - client_os.name\n - environment\n - service\n - browser.name\n\n # Using this information\n\n - You can reference tags in the \\`query\\` parameter of various tools: \\`tagName:tagValue\\`.\n \"\n `);\n });\n});\n\ndescribe(\"find_errors\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.find_errors;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: undefined,\n filename: undefined,\n transaction: undefined,\n query: undefined,\n sortBy: \"count\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Errors in **sentry-mcp-evals**\n\n\n ## CLOUDFLARE-MCP-41\n\n **Description**: Error: Tool list_organizations is already registered\n **Issue ID**: CLOUDFLARE-MCP-41\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n **Project**: test-suite\n **Last Seen**: 2025-04-07T12:23:39+00:00\n **Occurrences**: 2\n\n # Using this information\n\n - You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\n - You can get more details about an error by using the tool: \\`get_issue_details(organizationSlug=\"sentry-mcp-evals\", issueId=<issueID>)\\`\n \"\n `);\n });\n});\n\ndescribe(\"find_transactions\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.find_transactions;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: undefined,\n transaction: undefined,\n query: undefined,\n sortBy: \"duration\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Transactions in **sentry-mcp-evals**\n\n\n ## GET /trpc/bottleList\n\n **Span ID**: 07752c6aeb027c8f\n **Trace ID**: 6a477f5b0f31ef7b6b9b5e1dea66c91d\n **Span Operation**: http.server\n **Span Description**: GET /trpc/bottleList\n **Duration**: 12\n **Timestamp**: 2025-04-13T14:19:18+00:00\n **Project**: peated\n **URL**: https://sentry-mcp-evals.sentry.io/explore/traces/trace/6a477f5b0f31ef7b6b9b5e1dea66c91d\n\n ## GET /trpc/bottleList\n\n **Span ID**: 7ab5edf5b3ba42c9\n **Trace ID**: 54177131c7b192a446124daba3136045\n **Span Operation**: http.server\n **Span Description**: GET /trpc/bottleList\n **Duration**: 18\n **Timestamp**: 2025-04-13T14:19:17+00:00\n **Project**: peated\n **URL**: https://sentry-mcp-evals.sentry.io/explore/traces/trace/54177131c7b192a446124daba3136045\n\n \"\n `);\n });\n});\n\ndescribe(\"get_issue_details\", () => {\n it(\"serializes with issueId\", async () => {\n const tool = TOOL_HANDLERS.get_issue_details;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"CLOUDFLARE-MCP-41\",\n eventId: undefined,\n issueUrl: undefined,\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issue CLOUDFLARE-MCP-41 in **sentry-mcp-evals**\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **Occurrences**: 25\n **Users Impacted**: 1\n **Status**: unresolved\n **Platform**: javascript\n **Project**: CLOUDFLARE-MCP\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n\n ## Event Details\n\n **Event ID**: 7ca573c0f4814912aaa9bdc77d1a7d51\n **Occurred At**: 2025-04-08T21:15:04.000Z\n\n ### Error\n\n \\`\\`\\`\n Error: Tool list_organizations is already registered\n \\`\\`\\`\n\n **Stacktrace:**\n \\`\\`\\`\n index.js:7809:27\n index.js:8029:24 (OAuthProviderImpl.fetch)\n index.js:19631:28 (Object.fetch)\n \\`\\`\\`\n\n ### HTTP Request\n\n **Method:** GET\n **URL:** https://mcp.sentry.dev/sse\n\n ### Additional Context\n\n These are additional context provided by the user when they're instrumenting their application.\n\n **cloud_resource**\n cloud.provider: \"cloudflare\"\n\n **culture**\n timezone: \"Europe/London\"\n\n **runtime**\n name: \"cloudflare\"\n\n **trace**\n trace_id: \"3032af8bcdfe4423b937fc5c041d5d82\"\n span_id: \"953da703d2a6f4c7\"\n status: \"unknown\"\n client_sample_rate: 1\n sampled: true\n\n # Using this information\n\n - You can reference the IssueID in commit messages (e.g. \\`Fixes CLOUDFLARE-MCP-41\\`) to automatically close the issue when the commit is merged.\n - The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\n \"\n `);\n });\n\n it(\"serializes with issueUrl\", async () => {\n const tool = TOOL_HANDLERS.get_issue_details;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: undefined,\n issueId: undefined,\n eventId: undefined,\n issueUrl: \"https://sentry-mcp-evals.sentry.io/issues/6507376925\",\n regionUrl: undefined,\n },\n );\n\n expect(result).toMatchInlineSnapshot(`\n \"# Issue CLOUDFLARE-MCP-41 in **sentry-mcp-evals**\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **Occurrences**: 25\n **Users Impacted**: 1\n **Status**: unresolved\n **Platform**: javascript\n **Project**: CLOUDFLARE-MCP\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n\n ## Event Details\n\n **Event ID**: 7ca573c0f4814912aaa9bdc77d1a7d51\n **Occurred At**: 2025-04-08T21:15:04.000Z\n\n ### Error\n\n \\`\\`\\`\n Error: Tool list_organizations is already registered\n \\`\\`\\`\n\n **Stacktrace:**\n \\`\\`\\`\n index.js:7809:27\n index.js:8029:24 (OAuthProviderImpl.fetch)\n index.js:19631:28 (Object.fetch)\n \\`\\`\\`\n\n ### HTTP Request\n\n **Method:** GET\n **URL:** https://mcp.sentry.dev/sse\n\n ### Additional Context\n\n These are additional context provided by the user when they're instrumenting their application.\n\n **cloud_resource**\n cloud.provider: \"cloudflare\"\n\n **culture**\n timezone: \"Europe/London\"\n\n **runtime**\n name: \"cloudflare\"\n\n **trace**\n trace_id: \"3032af8bcdfe4423b937fc5c041d5d82\"\n span_id: \"953da703d2a6f4c7\"\n status: \"unknown\"\n client_sample_rate: 1\n sampled: true\n\n # Using this information\n\n - You can reference the IssueID in commit messages (e.g. \\`Fixes CLOUDFLARE-MCP-41\\`) to automatically close the issue when the commit is merged.\n - The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\n \"\n `);\n });\n it(\"serializes with eventId\", async () => {\n const tool = TOOL_HANDLERS.get_issue_details;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n issueId: undefined,\n issueUrl: undefined,\n eventId: \"7ca573c0f4814912aaa9bdc77d1a7d51\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issue CLOUDFLARE-MCP-41 in **sentry-mcp-evals**\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **Occurrences**: 25\n **Users Impacted**: 1\n **Status**: unresolved\n **Platform**: javascript\n **Project**: CLOUDFLARE-MCP\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n\n ## Event Details\n\n **Event ID**: 7ca573c0f4814912aaa9bdc77d1a7d51\n **Occurred At**: 2025-04-08T21:15:04.000Z\n\n ### Error\n\n \\`\\`\\`\n Error: Tool list_organizations is already registered\n \\`\\`\\`\n\n **Stacktrace:**\n \\`\\`\\`\n index.js:7809:27\n index.js:8029:24 (OAuthProviderImpl.fetch)\n index.js:19631:28 (Object.fetch)\n \\`\\`\\`\n\n ### HTTP Request\n\n **Method:** GET\n **URL:** https://mcp.sentry.dev/sse\n\n ### Additional Context\n\n These are additional context provided by the user when they're instrumenting their application.\n\n **cloud_resource**\n cloud.provider: \"cloudflare\"\n\n **culture**\n timezone: \"Europe/London\"\n\n **runtime**\n name: \"cloudflare\"\n\n **trace**\n trace_id: \"3032af8bcdfe4423b937fc5c041d5d82\"\n span_id: \"953da703d2a6f4c7\"\n status: \"unknown\"\n client_sample_rate: 1\n sampled: true\n\n # Using this information\n\n - You can reference the IssueID in commit messages (e.g. \\`Fixes CLOUDFLARE-MCP-41\\`) to automatically close the issue when the commit is merged.\n - The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\n \"\n `);\n });\n});\n\ndescribe(\"create_team\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.create_team;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n name: \"the-goats\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# New Team in **sentry-mcp-evals**\n\n **ID**: 4509109078196224\n **Slug**: the-goats\n **Name**: the-goats\n # Using this information\n\n - You should always inform the user of the Team Slug value.\n \"\n `);\n });\n});\n\ndescribe(\"create_project\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.create_project;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n teamSlug: \"the-goats\",\n name: \"cloudflare-mcp\",\n platform: \"javascript\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# New Project in **sentry-mcp-evals**\n\n **ID**: 4509109104082945\n **Slug**: cloudflare-mcp\n **Name**: cloudflare-mcp\n **SENTRY_DSN**: https://d20df0a1ab5031c7f3c7edca9c02814d@o4509106732793856.ingest.us.sentry.io/4509109104082945\n\n # Using this information\n\n - You can reference the **SENTRY_DSN** value to initialize Sentry's SDKs.\n - You should always inform the user of the **SENTRY_DSN** and Project Slug values.\n \"\n `);\n });\n});\n\ndescribe(\"create_dsn\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.create_dsn;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: \"cloudflare-mcp\",\n name: \"Default\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# New DSN in **sentry-mcp-evals/cloudflare-mcp**\n\n **DSN**: https://d20df0a1ab5031c7f3c7edca9c02814d@o4509106732793856.ingest.us.sentry.io/4509109104082945\n **Name**: Default\n\n # Using this information\n\n - The \\`SENTRY_DSN\\` value is a URL that you can use to initialize Sentry's SDKs.\n \"\n `);\n });\n});\n\ndescribe(\"find_dsns\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.find_dsns;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: \"cloudflare-mcp\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# DSNs in **sentry-mcp-evals/cloudflare-mcp**\n\n ## Default\n **ID**: d20df0a1ab5031c7f3c7edca9c02814d\n **DSN**: https://d20df0a1ab5031c7f3c7edca9c02814d@o4509106732793856.ingest.us.sentry.io/4509109104082945\n\n # Using this information\n\n - The \\`SENTRY_DSN\\` value is a URL that you can use to initialize Sentry's SDKs.\n \"\n `);\n });\n});\n\ndescribe(\"begin_seer_issue_fix\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.begin_seer_issue_fix;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"PEATED-A8\",\n issueUrl: undefined,\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issue Fix Started for Issue PEATED-A8\n\n **Run ID:**: 123\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 get_seer_issue_fix_status(organizationSlug=\"sentry-mcp-evals\", issueId=\"PEATED-A8\")\n \\`\\`\\`\"\n `);\n });\n});\n\ndescribe(\"get_seer_issue_fix_status\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.get_seer_issue_fix_status;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"PEATED-A8\",\n issueUrl: undefined,\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issue Fix Status for Issue PEATED-A8\n\n ## Analyzing the Issue\n\n **The \\`bottleById\\` query fails because the input ID (3216) doesn't exist in the database.\n **\n The exception details show that the \\`input\\` value at the time of the \\`TRPCError\\` in \\`bottleById.ts\\` was 3216, and the query likely failed because a bottle with ID 3216 was not found in the database.\n\n \\`\\`\\`\n Variable values at the time of the exception::\n {\n \"input\": 3216\n }\n \\`\\`\\`\n\n\n **However, the request also includes a different ID (16720) for \\`bottlePriceList\\`.\n **\n The root cause is likely a mismatch of input IDs within the batched TRPC request, where \\`bottlePriceList\\` expects bottle ID 16720, but \\`bottleById\\` receives a different ID (3216) leading to the \"Bottle not found\" error.\n\n \\`\\`\\`\n GET http://api.peated.com/trpc/bottlePriceList,bottleById\n \\`\\`\\`\n\n \\`\\`\\`json\n {\n \"input\": 3216\n }\n \\`\\`\\`\n\n \\`\\`\\`\n TRPCError: Bottle not found. (occurred in: GET /trpc/bottlePriceList,bottleById)\n \\`\\`\\`\n\n\n **This suggests a data consistency issue or incorrect client-side request.\n **\n The \\`TRPCError\\` originates from \\`bottleById.ts\\` with the input value being \\`3216\\`, indicating the procedure failed to find a bottle with that specific ID in the database.\n\n \\`\\`\\`\n <anonymous> in file /app/apps/server/src/trpc/routes/bottleById.ts [Line 33, column 13] (In app)\n .select({\n ...getTableColumns(bottles),\n })\n .from(bottleTombstones)\n .innerJoin(bottles, eq(bottleTombstones.newBottleId, bottles.id))\n .where(eq(bottleTombstones.bottleId, input));\n if (!bottle) {\n throw new TRPCError({ <-- SUSPECT LINE\n message: \"Bottle not found.\",\n code: \"NOT_FOUND\",\n });\n }\n }\n\n const createdBy = await db.query.users.findFirst({\n ---\n Variable values at the time of the exception::\n {\n \"input\": 3216\n }\n \\`\\`\\`\n\n\n\n ## Root Cause Analysis\n\n **The client initiates a batched TRPC request to the \\`/trpc/bottlePriceList,bottleById\\` endpoint, intending to fetch both the price list and details for a specific bottle.**\n\n This is the entry point where the client requests data from two different procedures in a single HTTP request. The server needs to correctly route and process the parameters for each procedure.\n\n **The TRPC server receives the batched request and begins processing the \\`bottlePriceList\\` procedure, intending to fetch the price list for bottle ID 16720.**\n\n \\`\\`\\`typescript\n // apps/server/src/trpc/routes/bottlePriceList.ts\n .input(z.object({ bottle: z.number(), onlyValid: z.boolean().optional() }))\n .query(async function ({ input, ctx }) {\n const [bottle] = await db.select().from(bottles).where(eq(bottles.id, input.bottle));\n if (!bottle) { ... }\n \\`\\`\\`\n This procedure expects a 'bottle' parameter in the input, which is used to query the database.\n\n **The TRPC server also processes the \\`bottleById\\` procedure, but due to a parameter mapping issue or client-side error, it receives bottle ID 3216 as input instead of 16720.**\n\n \\`\\`\\`typescript\n // apps/server/src/trpc/routes/bottleById.ts\n export default publicProcedure.input(z.number()).query(async function ({ input, ctx }) {\n let [bottle] = await db.select().from(bottles).where(eq(bottles.id, input));\n if (!bottle) { ... }\n \\`\\`\\`\n This procedure expects a numerical ID as input to find the bottle.\n\n **The \\`bottleById\\` procedure queries the \\`bottles\\` table for a bottle with ID 3216, but no such bottle exists.**\n\n The database query returns no results because bottle ID 3216 is not present in the \\`bottles\\` table.\n\n **The \\`bottleById\\` procedure then checks the \\`bottleTombstones\\` table to see if bottle ID 3216 has been tombstoned (redirected to a new ID), but no such tombstone exists.**\n\n The query to \\`bottleTombstones\\` also returns no results, indicating that bottle ID 3216 has not been redirected.\n\n **Since the \\`bottleById\\` procedure cannot find a bottle with ID 3216 in either the \\`bottles\\` or \\`bottleTombstones\\` tables, it throws a \\`TRPCError\\` with the message \"Bottle not found.\"**\n\n \\`\\`\\`typescript\n // apps/server/src/trpc/routes/bottleById.ts\n if (!bottle) {\n throw new TRPCError({ message: \"Bottle not found.\", code: \"NOT_FOUND\" });\n }\n \\`\\`\\`\n This is where the error is thrown, indicating that the bottle could not be found.\n\n\n ## Planning Solution\n\n **The discrepancy between inputs suggests a potential issue with batch request handling.\n **\n The \\`TRPCError\\` occurred in \\`bottleById.ts\\` with an input of \\`3216\\`, while the request was initiated with a bottle ID of \\`16720\\`, indicating a mismatch in the bottle ID being processed.\n\n \\`\\`\\`\n Variable values at the time of the exception::\n {\n \"input\": 3216\n }\n \\`\\`\\`\n\n \\`\\`\\`\n GET http://api.peated.com/trpc/bottlePriceList,bottleById\n \\`\\`\\`\n\n\n **The client-side batch request construction is the most likely source of error.\n **\n The discrepancy between the bottle ID in the error message (16720) and the ID being processed (3216) strongly suggests a client-side parameter mapping issue in the batched TRPC request.\n\n To fix this, I propose the following steps:\n\n 1. **Inspect the Client-Side Code:** Identify the code responsible for constructing the TRPC batch request to \\`/trpc/bottlePriceList,bottleById\\`.\n\n 2. **Verify Parameter Mapping:** Ensure that both \\`bottlePriceList\\` and \\`bottleById\\` are receiving the correct bottle ID (which should be 16720 in this case).\n\n 3. **Correct Parameter Assignment:** If the parameters are being incorrectly assigned, modify the client-side code to ensure that both procedures receive the same, correct bottle ID.\n\n 4. **Add Logging (Client-Side):** Add temporary logging to the client-side code to confirm the parameters being sent to each procedure in the batch request. This will help verify the fix.\n\n \\`\\`\\`typescript\n // Example logging (add to the client-side code where the batch request is created)\n console.log(\"bottlePriceList input:\", { bottle: 16720 }); // Replace 16720 with the actual ID\n console.log(\"bottleById input:\", { bottle: 16720 }); // Replace 16720 with the actual ID\n \\`\\`\\`\n\n 5. **Test the Fix:** After applying the fix, test the affected functionality to ensure that the \"Bottle not found\" error is resolved and that both procedures are working correctly.\n\n 6. **Remove Logging:** Once the fix is verified, remove the temporary logging.\n\n This approach directly addresses the most likely cause of the issue and provides a clear path to resolution.\n\n\n **Ensuring consistent bottle IDs will likely resolve this inconsistency.\n **\n The error message references bottle ID 16720, but the exception details show the procedure was actually processing ID 3216, indicating a parameter mismatch in the batch request.\n\n To fix this, I recommend the following steps:\n\n 1. **Client-Side Investigation**:\n\n * Examine the client-side code where the TRPC batch request is constructed.\n * Verify that the same \\`bottleId\\` parameter is being passed to both \\`bottlePriceList\\` and \\`bottleById\\` procedures.\n * If the IDs are being passed correctly, inspect the network request payload to confirm the correct structure of the batched request.\n\n \\`\\`\\`typescript\n // Example (Hypothetical) Client-Side Code\n const bottleId = 16720; // Example bottle ID\n\n // Ensure both procedures receive the same bottleId\n const [priceList, bottleDetails] = await trpc.batch(() => [\n trpc.bottlePriceList.fetch({ bottle: bottleId }),\n trpc.bottleById.fetch(bottleId),\n ]);\n \\`\\`\\`\n\n 2. **Server-Side Logging (Temporary)**:\n\n * Add temporary logging to both \\`bottlePriceList\\` and \\`bottleById\\` procedures to log the received \\`input\\` value.\n * This will help confirm whether the server is receiving the correct IDs from the client.\n * **Important**: Remove these logs after debugging to avoid unnecessary overhead.\n\n \\`\\`\\`typescript\n // apps/server/src/trpc/routes/bottlePriceList.ts\n export default publicProcedure\n .input(\n z.object({\n bottle: z.number(),\n onlyValid: z.boolean().optional(),\n }),\n )\n .query(async function ({ input, ctx }) {\n console.log(\"bottlePriceList input:\", input); // Add this line\n // ... rest of the code\n });\n\n // apps/server/src/trpc/routes/bottleById.ts\n export default publicProcedure.input(z.number()).query(async function ({\n input,\n ctx,\n }) {\n console.log(\"bottleById input:\", input); // Add this line\n // ... rest of the code\n });\n \\`\\`\\`\n\n 3. **TRPC Batch Request Configuration**:\n\n * Review the TRPC batch link configuration on the client-side.\n * Ensure that the batching logic is correctly mapping parameters to the corresponding procedures.\n * If using a custom batching implementation, verify its correctness.\n\n 4. **Data Integrity Check**:\n\n * If the client-side code appears correct, investigate whether bottle ID 3216 should exist in the database.\n * Check the \\`bottles\\` table and \\`bottleTombstones\\` table for any entries related to bottle ID 3216.\n * If the bottle should exist but is missing, investigate potential data deletion or migration issues.\n\n 5. **Tombstone Logic**:\n\n * Double-check the logic for creating and using tombstones.\n * Ensure that when a bottle is deleted, a tombstone entry is created correctly, pointing to the new bottle (if any).\n\n 6. **Error Handling**:\n\n * While this isn't the primary fix, consider improving the error message in \\`bottleById.ts\\` to include more context.\n * Include the original requested bottle ID (if available) in the error message to aid debugging.\n\n 7. **Client-Side Retries**:\n\n * Implement a retry mechanism on the client-side for TRPC requests.\n * If a \"Bottle not found\" error occurs, retry the request a few times before giving up. This can help mitigate transient issues.\n\n By following these steps, you should be able to identify the root cause of the parameter mismatch and implement a fix that ensures consistent bottle IDs are passed to both TRPC procedures in the batch request.\n\n\n\n ## Solution\n\n Consolidate bottle and price data fetching into a single batched TRPC request using \\`Promise.all\\` to ensure ID consistency.\n\n **Create a shared utility function to fetch bottle details and price data together.**\n \\`\\`\\`typescript\n // In a shared utility function or component\n export async function getBottleWithPrices(bottleId: number) {\n const trpcClient = await getTrpcClient();\n \n // Use Promise.all to ensure both requests are part of the same batch\n // and receive the same parameters\n const [bottle, priceList] = await Promise.all([\n trpcClient.bottleById.fetch(bottleId),\n trpcClient.bottlePriceList.fetch({ bottle: bottleId }),\n ]);\n \n return { bottle, priceList };\n }\n \\`\\`\\`\n This code creates a function that uses \\`Promise.all\\` to fetch both bottle details and price data concurrently. This ensures that both TRPC procedures are part of the same batch and receive the same \\`bottleId\\`.\n\n **Modify the page components to use the shared utility function.**\n \\`\\`\\`typescript\n // Then in the page components:\n const { bottle, priceList } = await getBottleWithPrices(Number(bottleId));\n \\`\\`\\`\n This code replaces the separate calls to \\`bottleById\\` and \\`bottlePriceList\\` with a single call to the \\`getBottleWithPrices\\` function, ensuring that both components receive data for the same bottle.\n\n **Add a unit test that reproduces the issue.**\n null\n\n\n \"\n `);\n });\n});\n"],"mappings":";;;;;;;;;;;;;AAGA,sBAAS,UAAU,MAAM;AACvB,iBAAG,cAAc,YAAY;EAC3B,MAAM,OAAOA,4BAAc;EAC3B,MAAM,SAAS,MAAM,KACnB;GACE,aAAa;GACb,QAAQ;GACR,kBAAkB;EACnB,GACD,EACE,kBACD,EACF;AACD,mCAAO,OAAO,CAAC,uBACZ;;;;MAKF;CACF,EAAC;AACH,EAAC;AAEF,sBAAS,sBAAsB,MAAM;AACnC,iBAAG,cAAc,YAAY;EAC3B,MAAM,OAAOA,4BAAc;EAC3B,MAAM,SAAS,MAAM,KACnB;GACE,aAAa;GACb,QAAQ;GACR,kBAAkB;EACnB,GACD,EACE,kBACD,EACF;AACD,mCAAO,OAAO,CAAC,uBAAuB;;;;;;;;;;;;;MAapC;CACH,EAAC;AACH,EAAC;AAEF,sBAAS,cAAc,MAAM;AAC3B,iBAAG,cAAc,YAAY;EAC3B,MAAM,OAAOA,4BAAc;EAC3B,MAAM,SAAS,MAAM,KACnB;GACE,aAAa;GACb,QAAQ;GACR,kBAAkB;EACnB,GACD;GACE,kBAAkB;GAClB;EACD,EACF;AACD,mCAAO,OAAO,CAAC,uBAAuB;;;;;MAKpC;CACH,EAAC;AACH,EAAC;AAEF,sBAAS,iBAAiB,MAAM;AAC9B,iBAAG,cAAc,YAAY;EAC3B,MAAM,OAAOA,4BAAc;EAC3B,MAAM,SAAS,MAAM,KACnB;GACE,aAAa;GACb,QAAQ;GACR,kBAAkB;EACnB,GACD;GACE,kBAAkB;GAClB;EACD,EACF;AACD,mCAAO,OAAO,CAAC,uBAAuB;;;;;MAKpC;CACH,EAAC;AACH,EAAC;AAEF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-1,23 +1,39 @@
1
- import "./schema-nyYqVk4Y.js";
2
- import "./client-CTm4cvI7.js";
3
- import "./types-H-TSmRpm.js";
4
- import "./api-client-9mzrj2HY.js";
5
- import "./formatting-BQRAzO5v.js";
6
- import "./issue-helpers-CyoHu5j4.js";
7
- import "./logging-Cxm8lQvg.js";
8
- import { TOOL_HANDLERS } from "./tools-B8ufMRZx.js";
9
- import { describe, it } from "./dist-BKh-M1A1.js";
10
- import { globalExpect } from "./vi.ClIskdbk-De9q3829.js";
1
+ import { describe, it } from "./dist-DDpQABxe.js";
2
+ import { globalExpect } from "./vi.bdSIJ99Y-BfJr7I2s.js";
3
+ import "./errors-BJSrT6Ou.js";
4
+ import "./schema-CewAKS9A.js";
5
+ import "./client-D5xFZtxK.js";
6
+ import "./types-6zHoEWAx.js";
7
+ import "./api-client-CNv_hbPO.js";
8
+ import "./formatting-BaARL2gT.js";
9
+ import "./issue-helpers-CSNNO03f.js";
10
+ import "./logging-CXLD0FFB.js";
11
+ import { TOOL_HANDLERS } from "./tools-4Rtn4WEf.js";
11
12
 
12
13
  //#region src/tools.test.ts
13
- describe("list_organizations", () => {
14
+ describe("whoami", () => {
14
15
  it("serializes", async () => {
15
- const tool = TOOL_HANDLERS.list_organizations;
16
+ const tool = TOOL_HANDLERS.whoami;
16
17
  const result = await tool({
17
18
  accessToken: "access-token",
18
19
  userId: "1",
19
20
  organizationSlug: null
20
- });
21
+ }, { regionUrl: void 0 });
22
+ globalExpect(result).toMatchInlineSnapshot(`
23
+ "You are authenticated as John Doe (john.doe@example.com).
24
+
25
+ Your Sentry User ID is 1."
26
+ `);
27
+ });
28
+ });
29
+ describe("find_organizations", () => {
30
+ it("serializes", async () => {
31
+ const tool = TOOL_HANDLERS.find_organizations;
32
+ const result = await tool({
33
+ accessToken: "access-token",
34
+ userId: "1",
35
+ organizationSlug: null
36
+ }, { regionUrl: void 0 });
21
37
  globalExpect(result).toMatchInlineSnapshot(`
22
38
  "# Organizations
23
39
 
@@ -29,14 +45,14 @@ describe("list_organizations", () => {
29
45
  # Using this information
30
46
 
31
47
  - The organization's name is the identifier for the organization, and is used in many tools for \`organizationSlug\`.
32
- - If a tool supports passing in the \`regionUrl\`, you should also pass in the correct value there.
48
+ - If a tool supports passing in the \`regionUrl\`, you MUST pass in the correct value there.
33
49
  "
34
50
  `);
35
51
  });
36
52
  });
37
- describe("list_teams", () => {
53
+ describe("find_teams", () => {
38
54
  it("serializes", async () => {
39
- const tool = TOOL_HANDLERS.list_teams;
55
+ const tool = TOOL_HANDLERS.find_teams;
40
56
  const result = await tool({
41
57
  accessToken: "access-token",
42
58
  userId: "1",
@@ -53,9 +69,9 @@ describe("list_teams", () => {
53
69
  `);
54
70
  });
55
71
  });
56
- describe("list_projects", () => {
72
+ describe("find_projects", () => {
57
73
  it("serializes", async () => {
58
- const tool = TOOL_HANDLERS.list_projects;
74
+ const tool = TOOL_HANDLERS.find_projects;
59
75
  const result = await tool({
60
76
  accessToken: "access-token",
61
77
  userId: "1",
@@ -72,9 +88,9 @@ describe("list_projects", () => {
72
88
  `);
73
89
  });
74
90
  });
75
- describe("list_issues", () => {
91
+ describe("find_issues", () => {
76
92
  it("serializes with project", async () => {
77
- const tool = TOOL_HANDLERS.list_issues;
93
+ const tool = TOOL_HANDLERS.find_issues;
78
94
  const result = await tool({
79
95
  accessToken: "access-token",
80
96
  userId: "1",
@@ -113,7 +129,7 @@ describe("list_issues", () => {
113
129
  `);
114
130
  });
115
131
  it("serializes without project", async () => {
116
- const tool = TOOL_HANDLERS.list_issues;
132
+ const tool = TOOL_HANDLERS.find_issues;
117
133
  const result = await tool({
118
134
  accessToken: "access-token",
119
135
  userId: "1",
@@ -152,9 +168,9 @@ describe("list_issues", () => {
152
168
  `);
153
169
  });
154
170
  });
155
- describe("list_releases", () => {
171
+ describe("find_releases", () => {
156
172
  it("works without project", async () => {
157
- const tool = TOOL_HANDLERS.list_releases;
173
+ const tool = TOOL_HANDLERS.find_releases;
158
174
  const result = await tool({
159
175
  accessToken: "access-token",
160
176
  userId: "1",
@@ -162,7 +178,8 @@ describe("list_releases", () => {
162
178
  }, {
163
179
  organizationSlug: "sentry-mcp-evals",
164
180
  projectSlug: void 0,
165
- regionUrl: void 0
181
+ regionUrl: void 0,
182
+ query: void 0
166
183
  });
167
184
  globalExpect(result).toMatchInlineSnapshot(`
168
185
  "# Releases in **sentry-mcp-evals**
@@ -178,12 +195,12 @@ describe("list_releases", () => {
178
195
  # Using this information
179
196
 
180
197
  - You can reference the Release version in commit messages or documentation.
181
- - You can search for issues in a specific release using the \`search_errors()\` tool with the query \`release:8ce89484-0fec-4913-a2cd-e8e2d41dee36\`.
198
+ - You can search for issues in a specific release using the \`find_errors()\` tool with the query \`release:8ce89484-0fec-4913-a2cd-e8e2d41dee36\`.
182
199
  "
183
200
  `);
184
201
  });
185
202
  it("works with project", async () => {
186
- const tool = TOOL_HANDLERS.list_releases;
203
+ const tool = TOOL_HANDLERS.find_releases;
187
204
  const result = await tool({
188
205
  accessToken: "access-token",
189
206
  userId: "1",
@@ -191,7 +208,8 @@ describe("list_releases", () => {
191
208
  }, {
192
209
  organizationSlug: "sentry-mcp-evals",
193
210
  projectSlug: "cloudflare-mcp",
194
- regionUrl: void 0
211
+ regionUrl: void 0,
212
+ query: void 0
195
213
  });
196
214
  globalExpect(result).toMatchInlineSnapshot(`
197
215
  "# Releases in **sentry-mcp-evals/cloudflare-mcp**
@@ -207,14 +225,14 @@ describe("list_releases", () => {
207
225
  # Using this information
208
226
 
209
227
  - You can reference the Release version in commit messages or documentation.
210
- - You can search for issues in a specific release using the \`search_errors()\` tool with the query \`release:8ce89484-0fec-4913-a2cd-e8e2d41dee36\`.
228
+ - You can search for issues in a specific release using the \`find_errors()\` tool with the query \`release:8ce89484-0fec-4913-a2cd-e8e2d41dee36\`.
211
229
  "
212
230
  `);
213
231
  });
214
232
  });
215
- describe("list_tags", () => {
233
+ describe("find_tags", () => {
216
234
  it("works", async () => {
217
- const tool = TOOL_HANDLERS.list_tags;
235
+ const tool = TOOL_HANDLERS.find_tags;
218
236
  const result = await tool({
219
237
  accessToken: "access-token",
220
238
  userId: "1",
@@ -254,9 +272,9 @@ describe("list_tags", () => {
254
272
  `);
255
273
  });
256
274
  });
257
- describe("search_errors", () => {
275
+ describe("find_errors", () => {
258
276
  it("serializes", async () => {
259
- const tool = TOOL_HANDLERS.search_errors;
277
+ const tool = TOOL_HANDLERS.find_errors;
260
278
  const result = await tool({
261
279
  accessToken: "access-token",
262
280
  userId: "1",
@@ -291,9 +309,9 @@ describe("search_errors", () => {
291
309
  `);
292
310
  });
293
311
  });
294
- describe("search_transactions", () => {
312
+ describe("find_transactions", () => {
295
313
  it("serializes", async () => {
296
- const tool = TOOL_HANDLERS.search_transactions;
314
+ const tool = TOOL_HANDLERS.find_transactions;
297
315
  const result = await tool({
298
316
  accessToken: "access-token",
299
317
  userId: "1",
@@ -368,7 +386,9 @@ describe("get_issue_details", () => {
368
386
 
369
387
  **Event ID**: 7ca573c0f4814912aaa9bdc77d1a7d51
370
388
  **Occurred At**: 2025-04-08T21:15:04.000Z
371
- **Error:**
389
+
390
+ ### Error
391
+
372
392
  \`\`\`
373
393
  Error: Tool list_organizations is already registered
374
394
  \`\`\`
@@ -380,8 +400,31 @@ describe("get_issue_details", () => {
380
400
  index.js:19631:28 (Object.fetch)
381
401
  \`\`\`
382
402
 
383
- **HTTP Method:** GET
403
+ ### HTTP Request
404
+
405
+ **Method:** GET
384
406
  **URL:** https://mcp.sentry.dev/sse
407
+
408
+ ### Additional Context
409
+
410
+ These are additional context provided by the user when they're instrumenting their application.
411
+
412
+ **cloud_resource**
413
+ cloud.provider: "cloudflare"
414
+
415
+ **culture**
416
+ timezone: "Europe/London"
417
+
418
+ **runtime**
419
+ name: "cloudflare"
420
+
421
+ **trace**
422
+ trace_id: "3032af8bcdfe4423b937fc5c041d5d82"
423
+ span_id: "953da703d2a6f4c7"
424
+ status: "unknown"
425
+ client_sample_rate: 1
426
+ sampled: true
427
+
385
428
  # Using this information
386
429
 
387
430
  - You can reference the IssueID in commit messages (e.g. \`Fixes CLOUDFLARE-MCP-41\`) to automatically close the issue when the commit is merged.
@@ -420,7 +463,9 @@ describe("get_issue_details", () => {
420
463
 
421
464
  **Event ID**: 7ca573c0f4814912aaa9bdc77d1a7d51
422
465
  **Occurred At**: 2025-04-08T21:15:04.000Z
423
- **Error:**
466
+
467
+ ### Error
468
+
424
469
  \`\`\`
425
470
  Error: Tool list_organizations is already registered
426
471
  \`\`\`
@@ -432,8 +477,31 @@ describe("get_issue_details", () => {
432
477
  index.js:19631:28 (Object.fetch)
433
478
  \`\`\`
434
479
 
435
- **HTTP Method:** GET
480
+ ### HTTP Request
481
+
482
+ **Method:** GET
436
483
  **URL:** https://mcp.sentry.dev/sse
484
+
485
+ ### Additional Context
486
+
487
+ These are additional context provided by the user when they're instrumenting their application.
488
+
489
+ **cloud_resource**
490
+ cloud.provider: "cloudflare"
491
+
492
+ **culture**
493
+ timezone: "Europe/London"
494
+
495
+ **runtime**
496
+ name: "cloudflare"
497
+
498
+ **trace**
499
+ trace_id: "3032af8bcdfe4423b937fc5c041d5d82"
500
+ span_id: "953da703d2a6f4c7"
501
+ status: "unknown"
502
+ client_sample_rate: 1
503
+ sampled: true
504
+
437
505
  # Using this information
438
506
 
439
507
  - You can reference the IssueID in commit messages (e.g. \`Fixes CLOUDFLARE-MCP-41\`) to automatically close the issue when the commit is merged.
@@ -472,7 +540,9 @@ describe("get_issue_details", () => {
472
540
 
473
541
  **Event ID**: 7ca573c0f4814912aaa9bdc77d1a7d51
474
542
  **Occurred At**: 2025-04-08T21:15:04.000Z
475
- **Error:**
543
+
544
+ ### Error
545
+
476
546
  \`\`\`
477
547
  Error: Tool list_organizations is already registered
478
548
  \`\`\`
@@ -484,8 +554,31 @@ describe("get_issue_details", () => {
484
554
  index.js:19631:28 (Object.fetch)
485
555
  \`\`\`
486
556
 
487
- **HTTP Method:** GET
557
+ ### HTTP Request
558
+
559
+ **Method:** GET
488
560
  **URL:** https://mcp.sentry.dev/sse
561
+
562
+ ### Additional Context
563
+
564
+ These are additional context provided by the user when they're instrumenting their application.
565
+
566
+ **cloud_resource**
567
+ cloud.provider: "cloudflare"
568
+
569
+ **culture**
570
+ timezone: "Europe/London"
571
+
572
+ **runtime**
573
+ name: "cloudflare"
574
+
575
+ **trace**
576
+ trace_id: "3032af8bcdfe4423b937fc5c041d5d82"
577
+ span_id: "953da703d2a6f4c7"
578
+ status: "unknown"
579
+ client_sample_rate: 1
580
+ sampled: true
581
+
489
582
  # Using this information
490
583
 
491
584
  - You can reference the IssueID in commit messages (e.g. \`Fixes CLOUDFLARE-MCP-41\`) to automatically close the issue when the commit is merged.
@@ -575,9 +668,9 @@ describe("create_dsn", () => {
575
668
  `);
576
669
  });
577
670
  });
578
- describe("list_dsn", () => {
671
+ describe("find_dsns", () => {
579
672
  it("serializes", async () => {
580
- const tool = TOOL_HANDLERS.list_dsns;
673
+ const tool = TOOL_HANDLERS.find_dsns;
581
674
  const result = await tool({
582
675
  accessToken: "access-token",
583
676
  userId: "1",