@sentry/mcp-server 0.9.0 → 0.10.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 (161) hide show
  1. package/README.md +1 -1
  2. package/dist/api-client/client.cjs +2 -2
  3. package/dist/api-client/client.d.cts +3 -3
  4. package/dist/api-client/client.d.ts +3 -3
  5. package/dist/api-client/client.js +2 -2
  6. package/dist/api-client/client.test.cjs +2 -2
  7. package/dist/api-client/client.test.js +2 -2
  8. package/dist/api-client/index.cjs +2 -2
  9. package/dist/api-client/index.d.cts +3 -3
  10. package/dist/api-client/index.d.ts +3 -3
  11. package/dist/api-client/index.js +2 -2
  12. package/dist/api-client/schema.cjs +1 -1
  13. package/dist/api-client/schema.d.cts +1 -1
  14. package/dist/api-client/schema.d.ts +1 -1
  15. package/dist/api-client/schema.js +1 -1
  16. package/dist/api-client/types.d.cts +2 -2
  17. package/dist/api-client/types.d.ts +2 -2
  18. package/dist/{client-DQ837FXP.cjs → client-B4Ux5Zdg.cjs} +7 -4
  19. package/dist/client-B4Ux5Zdg.cjs.map +1 -0
  20. package/dist/{client-CTm4cvI7.js → client-Bz_PNC8o.js} +7 -4
  21. package/dist/client-Bz_PNC8o.js.map +1 -0
  22. package/dist/{client-1dRfG57H.d.ts → client-J6VSRmQS.d.ts} +5 -3
  23. package/dist/client-J6VSRmQS.d.ts.map +1 -0
  24. package/dist/{client-BsYOQsEI.d.cts → client-tE6FD__9.d.cts} +5 -3
  25. package/dist/client-tE6FD__9.d.cts.map +1 -0
  26. package/dist/{formatting-C-0bHtbh.cjs → formatting-B0SJqiqX.cjs} +11 -3
  27. package/dist/formatting-B0SJqiqX.cjs.map +1 -0
  28. package/dist/{formatting-BQRAzO5v.js → formatting-ggD6YRYR.js} +11 -3
  29. package/dist/formatting-ggD6YRYR.js.map +1 -0
  30. package/dist/index.cjs +11 -11
  31. package/dist/index.js +11 -11
  32. package/dist/internal/formatting.cjs +1 -1
  33. package/dist/internal/formatting.d.cts +3 -3
  34. package/dist/internal/formatting.d.cts.map +1 -1
  35. package/dist/internal/formatting.d.ts +3 -3
  36. package/dist/internal/formatting.d.ts.map +1 -1
  37. package/dist/internal/formatting.js +1 -1
  38. package/dist/internal/issue-helpers.test.cjs +2 -2
  39. package/dist/internal/issue-helpers.test.cjs.map +1 -1
  40. package/dist/internal/issue-helpers.test.js +2 -2
  41. package/dist/internal/issue-helpers.test.js.map +1 -1
  42. package/dist/{promptDefinitions-Dcz3d9wL.d.cts → promptDefinitions-BR7PxWcH.d.cts} +3 -3
  43. package/dist/promptDefinitions-BR7PxWcH.d.cts.map +1 -0
  44. package/dist/{promptDefinitions-CPTadtuI.js → promptDefinitions-DBNOeSg-.js} +5 -5
  45. package/dist/promptDefinitions-DBNOeSg-.js.map +1 -0
  46. package/dist/{promptDefinitions-5jiZMBg5.cjs → promptDefinitions-pHRpPOpJ.cjs} +5 -5
  47. package/dist/promptDefinitions-pHRpPOpJ.cjs.map +1 -0
  48. package/dist/{promptDefinitions-DrGK-v8n.d.ts → promptDefinitions-tpKruPny.d.ts} +3 -3
  49. package/dist/promptDefinitions-tpKruPny.d.ts.map +1 -0
  50. package/dist/promptDefinitions.cjs +2 -2
  51. package/dist/promptDefinitions.d.cts +1 -1
  52. package/dist/promptDefinitions.d.ts +1 -1
  53. package/dist/promptDefinitions.js +2 -2
  54. package/dist/prompts.d.cts +5 -5
  55. package/dist/prompts.d.ts +5 -5
  56. package/dist/{schema-KEMqYaQn.cjs → schema-3VLYcf4D.cjs} +9 -2
  57. package/dist/schema-3VLYcf4D.cjs.map +1 -0
  58. package/dist/{schema-DwPOkoSP.d.ts → schema-B7A-FyIi.d.ts} +341 -263
  59. package/dist/{schema-DwPOkoSP.d.ts.map → schema-B7A-FyIi.d.ts.map} +1 -1
  60. package/dist/schema-BKa41TQ4.js +17 -0
  61. package/dist/schema-BKa41TQ4.js.map +1 -0
  62. package/dist/{schema-nyYqVk4Y.js → schema-Dltbjui7.js} +9 -2
  63. package/dist/schema-Dltbjui7.js.map +1 -0
  64. package/dist/{schema-CaJV2aIO.d.cts → schema-PvgLrC1b.d.cts} +339 -261
  65. package/dist/{schema-CaJV2aIO.d.cts.map → schema-PvgLrC1b.d.cts.map} +1 -1
  66. package/dist/schema-jk88gqOu.cjs +78 -0
  67. package/dist/schema-jk88gqOu.cjs.map +1 -0
  68. package/dist/schema.cjs +3 -1
  69. package/dist/schema.d.cts +3 -1
  70. package/dist/schema.d.cts.map +1 -1
  71. package/dist/schema.d.ts +3 -1
  72. package/dist/schema.d.ts.map +1 -1
  73. package/dist/schema.js +2 -2
  74. package/dist/{server-BWoJZj5B.cjs → server-VwFSUPQn.cjs} +5 -5
  75. package/dist/{server-BWoJZj5B.cjs.map → server-VwFSUPQn.cjs.map} +1 -1
  76. package/dist/{server-DtNbD1c-.js → server-yb4PkNyo.js} +5 -5
  77. package/dist/{server-DtNbD1c-.js.map → server-yb4PkNyo.js.map} +1 -1
  78. package/dist/server.cjs +8 -8
  79. package/dist/server.d.cts +3 -3
  80. package/dist/server.d.ts +3 -3
  81. package/dist/server.js +8 -8
  82. package/dist/{stdio-BLzMxGqU.cjs → stdio-65sYKLOk.cjs} +2 -2
  83. package/dist/{stdio-BLzMxGqU.cjs.map → stdio-65sYKLOk.cjs.map} +1 -1
  84. package/dist/{stdio-D4oW-qT6.js → stdio-DkU2-spy.js} +2 -2
  85. package/dist/{stdio-D4oW-qT6.js.map → stdio-DkU2-spy.js.map} +1 -1
  86. package/dist/test-setup.cjs +1338 -1142
  87. package/dist/test-setup.cjs.map +1 -1
  88. package/dist/test-setup.js +1338 -1141
  89. package/dist/test-setup.js.map +1 -1
  90. package/dist/{toolDefinitions-K_TVqaLU.d.cts → toolDefinitions-B94CNDbt.d.cts} +22 -22
  91. package/dist/toolDefinitions-B94CNDbt.d.cts.map +1 -0
  92. package/dist/{toolDefinitions-BF-D81bS.js → toolDefinitions-Bb_1ejkl.js} +83 -78
  93. package/dist/toolDefinitions-Bb_1ejkl.js.map +1 -0
  94. package/dist/{toolDefinitions-CO65cU86.cjs → toolDefinitions-DIhvw3vk.cjs} +83 -78
  95. package/dist/toolDefinitions-DIhvw3vk.cjs.map +1 -0
  96. package/dist/{toolDefinitions-CCscRQoM.d.ts → toolDefinitions-q_1-70fG.d.ts} +22 -22
  97. package/dist/toolDefinitions-q_1-70fG.d.ts.map +1 -0
  98. package/dist/toolDefinitions.cjs +2 -2
  99. package/dist/toolDefinitions.d.cts +1 -1
  100. package/dist/toolDefinitions.d.ts +1 -1
  101. package/dist/toolDefinitions.js +2 -2
  102. package/dist/toolDefinitions.test.cjs +2 -2
  103. package/dist/toolDefinitions.test.js +2 -2
  104. package/dist/{tools-BYt-G6p2.cjs → tools-BdkmyaZo.cjs} +36 -52
  105. package/dist/tools-BdkmyaZo.cjs.map +1 -0
  106. package/dist/{tools-B8ufMRZx.js → tools-CMFpMPpD.js} +36 -52
  107. package/dist/tools-CMFpMPpD.js.map +1 -0
  108. package/dist/tools.cjs +4 -4
  109. package/dist/tools.d.cts +24 -24
  110. package/dist/tools.d.cts.map +1 -1
  111. package/dist/tools.d.ts +24 -24
  112. package/dist/tools.d.ts.map +1 -1
  113. package/dist/tools.js +4 -4
  114. package/dist/tools.test.cjs +111 -34
  115. package/dist/tools.test.cjs.map +1 -1
  116. package/dist/tools.test.js +111 -34
  117. package/dist/tools.test.js.map +1 -1
  118. package/dist/transports/stdio.cjs +9 -9
  119. package/dist/transports/stdio.d.cts +3 -3
  120. package/dist/transports/stdio.d.ts +3 -3
  121. package/dist/transports/stdio.js +9 -9
  122. package/dist/{types-CPuN4Qmi.d.cts → types-B03G337q.d.cts} +2 -2
  123. package/dist/{types-CPuN4Qmi.d.cts.map → types-B03G337q.d.cts.map} +1 -1
  124. package/dist/{types-Ds7qzCBB.d.ts → types-CN4NEway.d.ts} +2 -2
  125. package/dist/{types-Ds7qzCBB.d.ts.map → types-CN4NEway.d.ts.map} +1 -1
  126. package/dist/{types-TaJcaAVg.d.cts → types-OeoNXRm-.d.cts} +3 -3
  127. package/dist/{types-TaJcaAVg.d.cts.map → types-OeoNXRm-.d.cts.map} +1 -1
  128. package/dist/{types-DyM4kaGZ.d.ts → types-jftb-CP9.d.ts} +3 -3
  129. package/dist/{types-DyM4kaGZ.d.ts.map → types-jftb-CP9.d.ts.map} +1 -1
  130. package/dist/types.d.cts +3 -3
  131. package/dist/types.d.ts +3 -3
  132. package/dist/{version-B0O4KvZ9.cjs → version-CDnh7DyW.cjs} +2 -2
  133. package/dist/{version-B0O4KvZ9.cjs.map → version-CDnh7DyW.cjs.map} +1 -1
  134. package/dist/version-TjO7fHpC.js +6 -0
  135. package/dist/{version-dTEKpaGt.js.map → version-TjO7fHpC.js.map} +1 -1
  136. package/dist/version.cjs +1 -1
  137. package/dist/version.js +1 -1
  138. package/package.json +3 -3
  139. package/dist/client-1dRfG57H.d.ts.map +0 -1
  140. package/dist/client-BsYOQsEI.d.cts.map +0 -1
  141. package/dist/client-CTm4cvI7.js.map +0 -1
  142. package/dist/client-DQ837FXP.cjs.map +0 -1
  143. package/dist/formatting-BQRAzO5v.js.map +0 -1
  144. package/dist/formatting-C-0bHtbh.cjs.map +0 -1
  145. package/dist/promptDefinitions-5jiZMBg5.cjs.map +0 -1
  146. package/dist/promptDefinitions-CPTadtuI.js.map +0 -1
  147. package/dist/promptDefinitions-Dcz3d9wL.d.cts.map +0 -1
  148. package/dist/promptDefinitions-DrGK-v8n.d.ts.map +0 -1
  149. package/dist/schema-BCkBPgjj.cjs +0 -64
  150. package/dist/schema-BCkBPgjj.cjs.map +0 -1
  151. package/dist/schema-CJrk_GUH.js +0 -15
  152. package/dist/schema-CJrk_GUH.js.map +0 -1
  153. package/dist/schema-KEMqYaQn.cjs.map +0 -1
  154. package/dist/schema-nyYqVk4Y.js.map +0 -1
  155. package/dist/toolDefinitions-BF-D81bS.js.map +0 -1
  156. package/dist/toolDefinitions-CCscRQoM.d.ts.map +0 -1
  157. package/dist/toolDefinitions-CO65cU86.cjs.map +0 -1
  158. package/dist/toolDefinitions-K_TVqaLU.d.cts.map +0 -1
  159. package/dist/tools-B8ufMRZx.js.map +0 -1
  160. package/dist/tools-BYt-G6p2.cjs.map +0 -1
  161. package/dist/version-dTEKpaGt.js +0 -6
@@ -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"],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CAAO,OAAO,CAAC,uBAAuB;;;;;;;;;;;;MAYpC;CACH,EAAC;AACH,EAAC;AAEF,sBAAS,6BAA6B,MAAM;AAC1C,iBAAG,cAAc,YAAY;EAC3B,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(\"find_organizations\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.find_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(\"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,sBAAsB,MAAM;AACnC,iBAAG,cAAc,YAAY;EAC3B,MAAM,OAAOA,4BAAc;EAC3B,MAAM,SAAS,MAAM,KAAK;GACxB,aAAa;GACb,QAAQ;GACR,kBAAkB;EACnB,EAAC;AACF,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,sBAAS,eAAe,MAAM;AAC5B,iBAAG,2BAA2B,YAAY;EACxC,MAAM,OAAOA,4BAAc;EAC3B,MAAM,SAAS,MAAM,KACnB;GACE,aAAa;GACb,QAAQ;GACR,kBAAkB;EACnB,GACD;GACE,kBAAkB;GAClB,aAAa;GACb;GACA,QAAQ;GACR;EACD,EACF;AACD,mCAAO,OAAO,CAAC,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;MAwBpC;CACH,EAAC;AAEF,iBAAG,8BAA8B,YAAY;EAC3C,MAAM,OAAOA,4BAAc;EAC3B,MAAM,SAAS,MAAM,KACnB;GACE,aAAa;GACb,QAAQ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,YAAY;EAC3B,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;;;;;;;;;;;;MAYpC;CACH,EAAC;AACH,EAAC;AAEF,sBAAS,6BAA6B,MAAM;AAC1C,iBAAG,cAAc,YAAY;EAC3B,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,18 +1,18 @@
1
- import "./schema-nyYqVk4Y.js";
2
- import "./client-CTm4cvI7.js";
1
+ import "./schema-Dltbjui7.js";
2
+ import "./client-Bz_PNC8o.js";
3
3
  import "./types-H-TSmRpm.js";
4
4
  import "./api-client-9mzrj2HY.js";
5
- import "./formatting-BQRAzO5v.js";
5
+ import "./formatting-ggD6YRYR.js";
6
6
  import "./issue-helpers-CyoHu5j4.js";
7
7
  import "./logging-Cxm8lQvg.js";
8
- import { TOOL_HANDLERS } from "./tools-B8ufMRZx.js";
8
+ import { TOOL_HANDLERS } from "./tools-CMFpMPpD.js";
9
9
  import { describe, it } from "./dist-BKh-M1A1.js";
10
10
  import { globalExpect } from "./vi.ClIskdbk-De9q3829.js";
11
11
 
12
12
  //#region src/tools.test.ts
13
- describe("list_organizations", () => {
13
+ describe("find_organizations", () => {
14
14
  it("serializes", async () => {
15
- const tool = TOOL_HANDLERS.list_organizations;
15
+ const tool = TOOL_HANDLERS.find_organizations;
16
16
  const result = await tool({
17
17
  accessToken: "access-token",
18
18
  userId: "1",
@@ -34,9 +34,9 @@ describe("list_organizations", () => {
34
34
  `);
35
35
  });
36
36
  });
37
- describe("list_teams", () => {
37
+ describe("find_teams", () => {
38
38
  it("serializes", async () => {
39
- const tool = TOOL_HANDLERS.list_teams;
39
+ const tool = TOOL_HANDLERS.find_teams;
40
40
  const result = await tool({
41
41
  accessToken: "access-token",
42
42
  userId: "1",
@@ -53,9 +53,9 @@ describe("list_teams", () => {
53
53
  `);
54
54
  });
55
55
  });
56
- describe("list_projects", () => {
56
+ describe("find_projects", () => {
57
57
  it("serializes", async () => {
58
- const tool = TOOL_HANDLERS.list_projects;
58
+ const tool = TOOL_HANDLERS.find_projects;
59
59
  const result = await tool({
60
60
  accessToken: "access-token",
61
61
  userId: "1",
@@ -72,9 +72,9 @@ describe("list_projects", () => {
72
72
  `);
73
73
  });
74
74
  });
75
- describe("list_issues", () => {
75
+ describe("find_issues", () => {
76
76
  it("serializes with project", async () => {
77
- const tool = TOOL_HANDLERS.list_issues;
77
+ const tool = TOOL_HANDLERS.find_issues;
78
78
  const result = await tool({
79
79
  accessToken: "access-token",
80
80
  userId: "1",
@@ -113,7 +113,7 @@ describe("list_issues", () => {
113
113
  `);
114
114
  });
115
115
  it("serializes without project", async () => {
116
- const tool = TOOL_HANDLERS.list_issues;
116
+ const tool = TOOL_HANDLERS.find_issues;
117
117
  const result = await tool({
118
118
  accessToken: "access-token",
119
119
  userId: "1",
@@ -152,9 +152,9 @@ describe("list_issues", () => {
152
152
  `);
153
153
  });
154
154
  });
155
- describe("list_releases", () => {
155
+ describe("find_releases", () => {
156
156
  it("works without project", async () => {
157
- const tool = TOOL_HANDLERS.list_releases;
157
+ const tool = TOOL_HANDLERS.find_releases;
158
158
  const result = await tool({
159
159
  accessToken: "access-token",
160
160
  userId: "1",
@@ -162,7 +162,8 @@ describe("list_releases", () => {
162
162
  }, {
163
163
  organizationSlug: "sentry-mcp-evals",
164
164
  projectSlug: void 0,
165
- regionUrl: void 0
165
+ regionUrl: void 0,
166
+ query: void 0
166
167
  });
167
168
  globalExpect(result).toMatchInlineSnapshot(`
168
169
  "# Releases in **sentry-mcp-evals**
@@ -178,12 +179,12 @@ describe("list_releases", () => {
178
179
  # Using this information
179
180
 
180
181
  - 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\`.
182
+ - You can search for issues in a specific release using the \`find_errors()\` tool with the query \`release:8ce89484-0fec-4913-a2cd-e8e2d41dee36\`.
182
183
  "
183
184
  `);
184
185
  });
185
186
  it("works with project", async () => {
186
- const tool = TOOL_HANDLERS.list_releases;
187
+ const tool = TOOL_HANDLERS.find_releases;
187
188
  const result = await tool({
188
189
  accessToken: "access-token",
189
190
  userId: "1",
@@ -191,7 +192,8 @@ describe("list_releases", () => {
191
192
  }, {
192
193
  organizationSlug: "sentry-mcp-evals",
193
194
  projectSlug: "cloudflare-mcp",
194
- regionUrl: void 0
195
+ regionUrl: void 0,
196
+ query: void 0
195
197
  });
196
198
  globalExpect(result).toMatchInlineSnapshot(`
197
199
  "# Releases in **sentry-mcp-evals/cloudflare-mcp**
@@ -207,14 +209,14 @@ describe("list_releases", () => {
207
209
  # Using this information
208
210
 
209
211
  - 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\`.
212
+ - You can search for issues in a specific release using the \`find_errors()\` tool with the query \`release:8ce89484-0fec-4913-a2cd-e8e2d41dee36\`.
211
213
  "
212
214
  `);
213
215
  });
214
216
  });
215
- describe("list_tags", () => {
217
+ describe("find_tags", () => {
216
218
  it("works", async () => {
217
- const tool = TOOL_HANDLERS.list_tags;
219
+ const tool = TOOL_HANDLERS.find_tags;
218
220
  const result = await tool({
219
221
  accessToken: "access-token",
220
222
  userId: "1",
@@ -254,9 +256,9 @@ describe("list_tags", () => {
254
256
  `);
255
257
  });
256
258
  });
257
- describe("search_errors", () => {
259
+ describe("find_errors", () => {
258
260
  it("serializes", async () => {
259
- const tool = TOOL_HANDLERS.search_errors;
261
+ const tool = TOOL_HANDLERS.find_errors;
260
262
  const result = await tool({
261
263
  accessToken: "access-token",
262
264
  userId: "1",
@@ -291,9 +293,9 @@ describe("search_errors", () => {
291
293
  `);
292
294
  });
293
295
  });
294
- describe("search_transactions", () => {
296
+ describe("find_transactions", () => {
295
297
  it("serializes", async () => {
296
- const tool = TOOL_HANDLERS.search_transactions;
298
+ const tool = TOOL_HANDLERS.find_transactions;
297
299
  const result = await tool({
298
300
  accessToken: "access-token",
299
301
  userId: "1",
@@ -368,7 +370,9 @@ describe("get_issue_details", () => {
368
370
 
369
371
  **Event ID**: 7ca573c0f4814912aaa9bdc77d1a7d51
370
372
  **Occurred At**: 2025-04-08T21:15:04.000Z
371
- **Error:**
373
+
374
+ ### Error
375
+
372
376
  \`\`\`
373
377
  Error: Tool list_organizations is already registered
374
378
  \`\`\`
@@ -380,8 +384,31 @@ describe("get_issue_details", () => {
380
384
  index.js:19631:28 (Object.fetch)
381
385
  \`\`\`
382
386
 
383
- **HTTP Method:** GET
387
+ ### HTTP Request
388
+
389
+ **Method:** GET
384
390
  **URL:** https://mcp.sentry.dev/sse
391
+
392
+ ### Additional Context
393
+
394
+ These are additional context provided by the user when they're instrumenting their application.
395
+
396
+ **cloud_resource**
397
+ cloud.provider: "cloudflare"
398
+
399
+ **culture**
400
+ timezone: "Europe/London"
401
+
402
+ **runtime**
403
+ name: "cloudflare"
404
+
405
+ **trace**
406
+ trace_id: "3032af8bcdfe4423b937fc5c041d5d82"
407
+ span_id: "953da703d2a6f4c7"
408
+ status: "unknown"
409
+ client_sample_rate: 1
410
+ sampled: true
411
+
385
412
  # Using this information
386
413
 
387
414
  - 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 +447,9 @@ describe("get_issue_details", () => {
420
447
 
421
448
  **Event ID**: 7ca573c0f4814912aaa9bdc77d1a7d51
422
449
  **Occurred At**: 2025-04-08T21:15:04.000Z
423
- **Error:**
450
+
451
+ ### Error
452
+
424
453
  \`\`\`
425
454
  Error: Tool list_organizations is already registered
426
455
  \`\`\`
@@ -432,8 +461,31 @@ describe("get_issue_details", () => {
432
461
  index.js:19631:28 (Object.fetch)
433
462
  \`\`\`
434
463
 
435
- **HTTP Method:** GET
464
+ ### HTTP Request
465
+
466
+ **Method:** GET
436
467
  **URL:** https://mcp.sentry.dev/sse
468
+
469
+ ### Additional Context
470
+
471
+ These are additional context provided by the user when they're instrumenting their application.
472
+
473
+ **cloud_resource**
474
+ cloud.provider: "cloudflare"
475
+
476
+ **culture**
477
+ timezone: "Europe/London"
478
+
479
+ **runtime**
480
+ name: "cloudflare"
481
+
482
+ **trace**
483
+ trace_id: "3032af8bcdfe4423b937fc5c041d5d82"
484
+ span_id: "953da703d2a6f4c7"
485
+ status: "unknown"
486
+ client_sample_rate: 1
487
+ sampled: true
488
+
437
489
  # Using this information
438
490
 
439
491
  - 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 +524,9 @@ describe("get_issue_details", () => {
472
524
 
473
525
  **Event ID**: 7ca573c0f4814912aaa9bdc77d1a7d51
474
526
  **Occurred At**: 2025-04-08T21:15:04.000Z
475
- **Error:**
527
+
528
+ ### Error
529
+
476
530
  \`\`\`
477
531
  Error: Tool list_organizations is already registered
478
532
  \`\`\`
@@ -484,8 +538,31 @@ describe("get_issue_details", () => {
484
538
  index.js:19631:28 (Object.fetch)
485
539
  \`\`\`
486
540
 
487
- **HTTP Method:** GET
541
+ ### HTTP Request
542
+
543
+ **Method:** GET
488
544
  **URL:** https://mcp.sentry.dev/sse
545
+
546
+ ### Additional Context
547
+
548
+ These are additional context provided by the user when they're instrumenting their application.
549
+
550
+ **cloud_resource**
551
+ cloud.provider: "cloudflare"
552
+
553
+ **culture**
554
+ timezone: "Europe/London"
555
+
556
+ **runtime**
557
+ name: "cloudflare"
558
+
559
+ **trace**
560
+ trace_id: "3032af8bcdfe4423b937fc5c041d5d82"
561
+ span_id: "953da703d2a6f4c7"
562
+ status: "unknown"
563
+ client_sample_rate: 1
564
+ sampled: true
565
+
489
566
  # Using this information
490
567
 
491
568
  - 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 +652,9 @@ describe("create_dsn", () => {
575
652
  `);
576
653
  });
577
654
  });
578
- describe("list_dsn", () => {
655
+ describe("find_dsns", () => {
579
656
  it("serializes", async () => {
580
- const tool = TOOL_HANDLERS.list_dsns;
657
+ const tool = TOOL_HANDLERS.find_dsns;
581
658
  const result = await tool({
582
659
  accessToken: "access-token",
583
660
  userId: "1",