@sentry/mcp-server 0.2.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 (201) hide show
  1. package/LICENSE.md +105 -0
  2. package/dist/api-client/client.cjs +5 -0
  3. package/dist/api-client/client.d.cts +5 -0
  4. package/dist/api-client/client.d.ts +5 -0
  5. package/dist/api-client/client.js +4 -0
  6. package/dist/api-client/client.test.cjs +34 -0
  7. package/dist/api-client/client.test.cjs.map +1 -0
  8. package/dist/api-client/client.test.d.cts +1 -0
  9. package/dist/api-client/client.test.d.ts +1 -0
  10. package/dist/api-client/client.test.js +33 -0
  11. package/dist/api-client/client.test.js.map +1 -0
  12. package/dist/api-client/index.cjs +35 -0
  13. package/dist/api-client/index.d.cts +6 -0
  14. package/dist/api-client/index.d.ts +6 -0
  15. package/dist/api-client/index.js +6 -0
  16. package/dist/api-client/schema.cjs +30 -0
  17. package/dist/api-client/schema.d.cts +3 -0
  18. package/dist/api-client/schema.d.ts +3 -0
  19. package/dist/api-client/schema.js +3 -0
  20. package/dist/api-client/types.cjs +1 -0
  21. package/dist/api-client/types.d.cts +4 -0
  22. package/dist/api-client/types.d.ts +4 -0
  23. package/dist/api-client/types.js +1 -0
  24. package/dist/api-client-9mzrj2HY.js +0 -0
  25. package/dist/api-client-CEBuz3Zu.cjs +0 -0
  26. package/dist/chunk-BtT13l48.cjs +40 -0
  27. package/dist/chunk-CsIcISPO.js +30 -0
  28. package/dist/client-BlG0jPGS.cjs +206 -0
  29. package/dist/client-BlG0jPGS.cjs.map +1 -0
  30. package/dist/client-D1XjYhij.js +194 -0
  31. package/dist/client-D1XjYhij.js.map +1 -0
  32. package/dist/client.d-B8RB2Poz.d.ts +108 -0
  33. package/dist/client.d-B8RB2Poz.d.ts.map +1 -0
  34. package/dist/client.d-CXQCEkJz.d.cts +108 -0
  35. package/dist/dist-B914BQU9.cjs +8043 -0
  36. package/dist/dist-B914BQU9.cjs.map +1 -0
  37. package/dist/dist-DJoL0rVQ.js +7899 -0
  38. package/dist/dist-DJoL0rVQ.js.map +1 -0
  39. package/dist/formatting-BTSvl7n7.cjs +41 -0
  40. package/dist/formatting-BTSvl7n7.cjs.map +1 -0
  41. package/dist/formatting-Bacfde0I.js +28 -0
  42. package/dist/formatting-Bacfde0I.js.map +1 -0
  43. package/dist/index.cjs +52 -0
  44. package/dist/index.cjs.map +1 -0
  45. package/dist/index.d-Cb-lHGvn.d.cts +1 -0
  46. package/dist/index.d-Db2MND9s.d.ts +1 -0
  47. package/dist/index.d.cts +1 -0
  48. package/dist/index.d.ts +1 -0
  49. package/dist/index.js +50 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/internal/formatting.cjs +4 -0
  52. package/dist/internal/formatting.d.cts +13 -0
  53. package/dist/internal/formatting.d.ts +13 -0
  54. package/dist/internal/formatting.d.ts.map +1 -0
  55. package/dist/internal/formatting.js +3 -0
  56. package/dist/internal/issue-helpers.cjs +3 -0
  57. package/dist/internal/issue-helpers.d.cts +16 -0
  58. package/dist/internal/issue-helpers.d.ts +16 -0
  59. package/dist/internal/issue-helpers.d.ts.map +1 -0
  60. package/dist/internal/issue-helpers.js +3 -0
  61. package/dist/internal/issue-helpers.test.cjs +74 -0
  62. package/dist/internal/issue-helpers.test.cjs.map +1 -0
  63. package/dist/internal/issue-helpers.test.d.cts +1 -0
  64. package/dist/internal/issue-helpers.test.d.ts +1 -0
  65. package/dist/internal/issue-helpers.test.js +73 -0
  66. package/dist/internal/issue-helpers.test.js.map +1 -0
  67. package/dist/issue-helpers-C0kEdXOE.cjs +39 -0
  68. package/dist/issue-helpers-C0kEdXOE.cjs.map +1 -0
  69. package/dist/issue-helpers-DFde36Zu.js +32 -0
  70. package/dist/issue-helpers-DFde36Zu.js.map +1 -0
  71. package/dist/logging-BEMgC5SA.cjs +32 -0
  72. package/dist/logging-BEMgC5SA.cjs.map +1 -0
  73. package/dist/logging-Cxm8lQvg.js +25 -0
  74. package/dist/logging-Cxm8lQvg.js.map +1 -0
  75. package/dist/logging.cjs +3 -0
  76. package/dist/logging.d.cts +7 -0
  77. package/dist/logging.d.ts +7 -0
  78. package/dist/logging.d.ts.map +1 -0
  79. package/dist/logging.js +3 -0
  80. package/dist/magic-string.es-COkPNEcb.cjs +1017 -0
  81. package/dist/magic-string.es-COkPNEcb.cjs.map +1 -0
  82. package/dist/magic-string.es-qySpjS4V.js +1015 -0
  83. package/dist/magic-string.es-qySpjS4V.js.map +1 -0
  84. package/dist/promptDefinitions-CVB4IyVf.cjs +23 -0
  85. package/dist/promptDefinitions-CVB4IyVf.cjs.map +1 -0
  86. package/dist/promptDefinitions-CaRMCDPI.js +16 -0
  87. package/dist/promptDefinitions-CaRMCDPI.js.map +1 -0
  88. package/dist/promptDefinitions.cjs +4 -0
  89. package/dist/promptDefinitions.d-X_QALSRc.d.cts +15 -0
  90. package/dist/promptDefinitions.d-qzT7TH_Z.d.ts +15 -0
  91. package/dist/promptDefinitions.d-qzT7TH_Z.d.ts.map +1 -0
  92. package/dist/promptDefinitions.d.cts +3 -0
  93. package/dist/promptDefinitions.d.ts +3 -0
  94. package/dist/promptDefinitions.js +4 -0
  95. package/dist/prompts--QCiXmR2.cjs +26 -0
  96. package/dist/prompts--QCiXmR2.cjs.map +1 -0
  97. package/dist/prompts-Tz-qECa0.js +19 -0
  98. package/dist/prompts-Tz-qECa0.js.map +1 -0
  99. package/dist/prompts.cjs +3 -0
  100. package/dist/prompts.d.cts +19 -0
  101. package/dist/prompts.d.ts +19 -0
  102. package/dist/prompts.d.ts.map +1 -0
  103. package/dist/prompts.js +3 -0
  104. package/dist/resources-BAE7VVZZ.cjs +33 -0
  105. package/dist/resources-BAE7VVZZ.cjs.map +1 -0
  106. package/dist/resources-OM3EAnnj.js +26 -0
  107. package/dist/resources-OM3EAnnj.js.map +1 -0
  108. package/dist/resources.cjs +3 -0
  109. package/dist/resources.d.cts +15 -0
  110. package/dist/resources.d.ts +15 -0
  111. package/dist/resources.d.ts.map +1 -0
  112. package/dist/resources.js +3 -0
  113. package/dist/schema-BvloqMHW.cjs +57 -0
  114. package/dist/schema-BvloqMHW.cjs.map +1 -0
  115. package/dist/schema-Bvva80Pn.js +223 -0
  116. package/dist/schema-Bvva80Pn.js.map +1 -0
  117. package/dist/schema-CyHM0GZH.cjs +392 -0
  118. package/dist/schema-CyHM0GZH.cjs.map +1 -0
  119. package/dist/schema-k04PdSCK.js +14 -0
  120. package/dist/schema-k04PdSCK.js.map +1 -0
  121. package/dist/schema.cjs +9 -0
  122. package/dist/schema.d-BDStOeMD.d.cts +4978 -0
  123. package/dist/schema.d-Oa2HQQCX.d.ts +4978 -0
  124. package/dist/schema.d-Oa2HQQCX.d.ts.map +1 -0
  125. package/dist/schema.d.cts +14 -0
  126. package/dist/schema.d.ts +14 -0
  127. package/dist/schema.d.ts.map +1 -0
  128. package/dist/schema.js +3 -0
  129. package/dist/server-DY8wjV9H.cjs +110 -0
  130. package/dist/server-DY8wjV9H.cjs.map +1 -0
  131. package/dist/server-DuRPgdH4.js +103 -0
  132. package/dist/server-DuRPgdH4.js.map +1 -0
  133. package/dist/server.cjs +16 -0
  134. package/dist/server.d.cts +15 -0
  135. package/dist/server.d.ts +15 -0
  136. package/dist/server.d.ts.map +1 -0
  137. package/dist/server.js +16 -0
  138. package/dist/stdio-CSJMThag.cjs +23 -0
  139. package/dist/stdio-CSJMThag.cjs.map +1 -0
  140. package/dist/stdio-Ce5DHKZ4.js +16 -0
  141. package/dist/stdio-Ce5DHKZ4.js.map +1 -0
  142. package/dist/test-setup.cjs +18648 -0
  143. package/dist/test-setup.cjs.map +1 -0
  144. package/dist/test-setup.d.cts +1 -0
  145. package/dist/test-setup.d.ts +1 -0
  146. package/dist/test-setup.js +18647 -0
  147. package/dist/test-setup.js.map +1 -0
  148. package/dist/toolDefinitions-CMNKyt4H.js +400 -0
  149. package/dist/toolDefinitions-CMNKyt4H.js.map +1 -0
  150. package/dist/toolDefinitions-DS7wXdsP.cjs +407 -0
  151. package/dist/toolDefinitions-DS7wXdsP.cjs.map +1 -0
  152. package/dist/toolDefinitions.cjs +4 -0
  153. package/dist/toolDefinitions.d-CIXKiX81.d.cts +252 -0
  154. package/dist/toolDefinitions.d-DkYVHG7Y.d.ts +252 -0
  155. package/dist/toolDefinitions.d-DkYVHG7Y.d.ts.map +1 -0
  156. package/dist/toolDefinitions.d.cts +3 -0
  157. package/dist/toolDefinitions.d.ts +3 -0
  158. package/dist/toolDefinitions.js +4 -0
  159. package/dist/toolDefinitions.test.cjs +16 -0
  160. package/dist/toolDefinitions.test.cjs.map +1 -0
  161. package/dist/toolDefinitions.test.d.cts +1 -0
  162. package/dist/toolDefinitions.test.d.ts +1 -0
  163. package/dist/toolDefinitions.test.js +15 -0
  164. package/dist/toolDefinitions.test.js.map +1 -0
  165. package/dist/tools-BfTTqLNG.cjs +461 -0
  166. package/dist/tools-BfTTqLNG.cjs.map +1 -0
  167. package/dist/tools-qkapmf3p.js +455 -0
  168. package/dist/tools-qkapmf3p.js.map +1 -0
  169. package/dist/tools.cjs +10 -0
  170. package/dist/tools.d.cts +207 -0
  171. package/dist/tools.d.ts +207 -0
  172. package/dist/tools.d.ts.map +1 -0
  173. package/dist/tools.js +10 -0
  174. package/dist/tools.test.cjs +845 -0
  175. package/dist/tools.test.cjs.map +1 -0
  176. package/dist/tools.test.d.cts +1 -0
  177. package/dist/tools.test.d.ts +1 -0
  178. package/dist/tools.test.js +844 -0
  179. package/dist/tools.test.js.map +1 -0
  180. package/dist/transports/stdio.cjs +17 -0
  181. package/dist/transports/stdio.d.cts +11 -0
  182. package/dist/transports/stdio.d.ts +11 -0
  183. package/dist/transports/stdio.d.ts.map +1 -0
  184. package/dist/transports/stdio.js +17 -0
  185. package/dist/types-H-TSmRpm.js +0 -0
  186. package/dist/types-o3zWarRp.cjs +0 -0
  187. package/dist/types.cjs +0 -0
  188. package/dist/types.d-B8gSnrcY.d.cts +43 -0
  189. package/dist/types.d-BDS-6_Sj.d.cts +25 -0
  190. package/dist/types.d-Bfi1CpIf.d.ts +25 -0
  191. package/dist/types.d-Bfi1CpIf.d.ts.map +1 -0
  192. package/dist/types.d-Bj1fPi3b.d.ts +43 -0
  193. package/dist/types.d-Bj1fPi3b.d.ts.map +1 -0
  194. package/dist/types.d.cts +5 -0
  195. package/dist/types.d.ts +5 -0
  196. package/dist/types.js +0 -0
  197. package/dist/vi.ClIskdbk-BhK8y4UO.cjs +6294 -0
  198. package/dist/vi.ClIskdbk-BhK8y4UO.cjs.map +1 -0
  199. package/dist/vi.ClIskdbk-CiLaali_.js +6279 -0
  200. package/dist/vi.ClIskdbk-CiLaali_.js.map +1 -0
  201. package/package.json +77 -0
@@ -0,0 +1,845 @@
1
+ "use strict";
2
+ require('./schema-CyHM0GZH.cjs');
3
+ require('./client-BlG0jPGS.cjs');
4
+ require('./types-o3zWarRp.cjs');
5
+ require('./api-client-CEBuz3Zu.cjs');
6
+ require('./formatting-BTSvl7n7.cjs');
7
+ require('./issue-helpers-C0kEdXOE.cjs');
8
+ require('./logging-BEMgC5SA.cjs');
9
+ const require_tools = require('./tools-BfTTqLNG.cjs');
10
+ const require_dist = require('./dist-B914BQU9.cjs');
11
+ const require_vi_ClIskdbk = require('./vi.ClIskdbk-BhK8y4UO.cjs');
12
+
13
+ //#region src/tools.test.ts
14
+ require_dist.describe("list_organizations", () => {
15
+ require_dist.it("serializes", async () => {
16
+ const tool = require_tools.TOOL_HANDLERS.list_organizations;
17
+ const result = await tool({
18
+ accessToken: "access-token",
19
+ userId: "1",
20
+ organizationSlug: null
21
+ });
22
+ require_vi_ClIskdbk.globalExpect(result).toMatchInlineSnapshot(`
23
+ "# Organizations
24
+
25
+ - sentry-mcp-evals
26
+ "
27
+ `);
28
+ });
29
+ });
30
+ require_dist.describe("list_teams", () => {
31
+ require_dist.it("serializes", async () => {
32
+ const tool = require_tools.TOOL_HANDLERS.list_teams;
33
+ const result = await tool({
34
+ accessToken: "access-token",
35
+ userId: "1",
36
+ organizationSlug: null
37
+ }, { organizationSlug: "sentry-mcp-evals" });
38
+ require_vi_ClIskdbk.globalExpect(result).toMatchInlineSnapshot(`
39
+ "# Teams in **sentry-mcp-evals**
40
+
41
+ - the-goats
42
+ "
43
+ `);
44
+ });
45
+ });
46
+ require_dist.describe("list_projects", () => {
47
+ require_dist.it("serializes", async () => {
48
+ const tool = require_tools.TOOL_HANDLERS.list_projects;
49
+ const result = await tool({
50
+ accessToken: "access-token",
51
+ userId: "1",
52
+ organizationSlug: null
53
+ }, { organizationSlug: "sentry-mcp-evals" });
54
+ require_vi_ClIskdbk.globalExpect(result).toMatchInlineSnapshot(`
55
+ "# Projects in **sentry-mcp-evals**
56
+
57
+ - cloudflare-mcp
58
+ "
59
+ `);
60
+ });
61
+ });
62
+ require_dist.describe("list_issues", () => {
63
+ require_dist.it("serializes", async () => {
64
+ const tool = require_tools.TOOL_HANDLERS.list_issues;
65
+ const result = await tool({
66
+ accessToken: "access-token",
67
+ userId: "1",
68
+ organizationSlug: null
69
+ }, {
70
+ organizationSlug: "sentry-mcp-evals",
71
+ projectSlug: "cloudflare-mcp",
72
+ query: void 0,
73
+ sortBy: "last_seen"
74
+ });
75
+ require_vi_ClIskdbk.globalExpect(result).toMatchInlineSnapshot(`
76
+ "# Issues in **sentry-mcp-evals/cloudflare-mcp**
77
+
78
+ ## CLOUDFLARE-MCP-41
79
+
80
+ **Description**: Error: Tool list_organizations is already registered
81
+ **Culprit**: Object.fetch(index)
82
+ **First Seen**: 2025-04-03T22:51:19.403Z
83
+ **Last Seen**: 2025-04-12T11:34:11.000Z
84
+ **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41
85
+
86
+ ## CLOUDFLARE-MCP-42
87
+
88
+ **Description**: Error: Tool list_issues is already registered
89
+ **Culprit**: Object.fetch(index)
90
+ **First Seen**: 2025-04-11T22:51:19.403Z
91
+ **Last Seen**: 2025-04-12T11:34:11.000Z
92
+ **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-42
93
+
94
+ # Using this information
95
+
96
+ - You can reference the Issue ID in commit messages (e.g. \`Fixes <issueID>\`) to automatically close the issue when the commit is merged.
97
+ - You can get more details about a specific issue by using the tool: \`get_issue_details(organizationSlug="sentry-mcp-evals", issueId=<issueID>)\`
98
+ "
99
+ `);
100
+ });
101
+ });
102
+ require_dist.describe("list_releases", () => {
103
+ require_dist.it("works without project", async () => {
104
+ const tool = require_tools.TOOL_HANDLERS.list_releases;
105
+ const result = await tool({
106
+ accessToken: "access-token",
107
+ userId: "1",
108
+ organizationSlug: null
109
+ }, {
110
+ organizationSlug: "sentry-mcp-evals",
111
+ projectSlug: void 0
112
+ });
113
+ require_vi_ClIskdbk.globalExpect(result).toMatchInlineSnapshot(`
114
+ "# Releases in **sentry-mcp-evals**
115
+
116
+ ## 8ce89484-0fec-4913-a2cd-e8e2d41dee36
117
+
118
+ **Created**: 2025-04-13T19:54:21.764Z
119
+ **First Event**: 2025-04-13T19:54:21.000Z
120
+ **Last Event**: 2025-04-13T20:28:23.000Z
121
+ **New Issues**: 0
122
+ **Projects**: cloudflare-mcp
123
+
124
+ # Using this information
125
+
126
+ - You can reference the Release version in commit messages or documentation.
127
+ - You can search for issues in a specific release using the \`search_errors()\` tool with the query \`release:8ce89484-0fec-4913-a2cd-e8e2d41dee36\`.
128
+ "
129
+ `);
130
+ });
131
+ require_dist.it("works with project", async () => {
132
+ const tool = require_tools.TOOL_HANDLERS.list_releases;
133
+ const result = await tool({
134
+ accessToken: "access-token",
135
+ userId: "1",
136
+ organizationSlug: null
137
+ }, {
138
+ organizationSlug: "sentry-mcp-evals",
139
+ projectSlug: "cloudflare-mcp"
140
+ });
141
+ require_vi_ClIskdbk.globalExpect(result).toMatchInlineSnapshot(`
142
+ "# Releases in **sentry-mcp-evals/cloudflare-mcp**
143
+
144
+ ## 8ce89484-0fec-4913-a2cd-e8e2d41dee36
145
+
146
+ **Created**: 2025-04-13T19:54:21.764Z
147
+ **First Event**: 2025-04-13T19:54:21.000Z
148
+ **Last Event**: 2025-04-13T20:28:23.000Z
149
+ **New Issues**: 0
150
+ **Projects**: cloudflare-mcp
151
+
152
+ # Using this information
153
+
154
+ - You can reference the Release version in commit messages or documentation.
155
+ - You can search for issues in a specific release using the \`search_errors()\` tool with the query \`release:8ce89484-0fec-4913-a2cd-e8e2d41dee36\`.
156
+ "
157
+ `);
158
+ });
159
+ });
160
+ require_dist.describe("list_tags", () => {
161
+ require_dist.it("works", async () => {
162
+ const tool = require_tools.TOOL_HANDLERS.list_tags;
163
+ const result = await tool({
164
+ accessToken: "access-token",
165
+ userId: "1",
166
+ organizationSlug: null
167
+ }, {
168
+ organizationSlug: "sentry-mcp-evals",
169
+ projectSlug: void 0
170
+ });
171
+ require_vi_ClIskdbk.globalExpect(result).toMatchInlineSnapshot(`
172
+ "# Tags in **sentry-mcp-evals**
173
+
174
+ - transaction
175
+ - runtime.name
176
+ - level
177
+ - device
178
+ - os
179
+ - user
180
+ - runtime
181
+ - release
182
+ - url
183
+ - uptime_rule
184
+ - server_name
185
+ - browser
186
+ - os.name
187
+ - device.family
188
+ - replayId
189
+ - client_os.name
190
+ - environment
191
+ - service
192
+ - browser.name
193
+
194
+ # Using this information
195
+
196
+ - You can reference tags in the \`query\` parameter of various tools: \`tagName:tagValue\`.
197
+ "
198
+ `);
199
+ });
200
+ });
201
+ require_dist.describe("search_errors", () => {
202
+ require_dist.it("serializes", async () => {
203
+ const tool = require_tools.TOOL_HANDLERS.search_errors;
204
+ const result = await tool({
205
+ accessToken: "access-token",
206
+ userId: "1",
207
+ organizationSlug: null
208
+ }, {
209
+ organizationSlug: "sentry-mcp-evals",
210
+ projectSlug: void 0,
211
+ filename: void 0,
212
+ transaction: void 0,
213
+ query: void 0,
214
+ sortBy: "count"
215
+ });
216
+ require_vi_ClIskdbk.globalExpect(result).toMatchInlineSnapshot(`
217
+ "# Errors in **sentry-mcp-evals**
218
+
219
+
220
+ ## CLOUDFLARE-MCP-41
221
+
222
+ **Description**: Error: Tool list_organizations is already registered
223
+ **Issue ID**: CLOUDFLARE-MCP-41
224
+ **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41
225
+ **Project**: test-suite
226
+ **Last Seen**: 2025-04-07T12:23:39+00:00
227
+ **Occurrences**: 2
228
+
229
+ # Using this information
230
+
231
+ - You can reference the Issue ID in commit messages (e.g. \`Fixes <issueID>\`) to automatically close the issue when the commit is merged.
232
+ - You can get more details about an error by using the tool: \`get_issue_details(organizationSlug="sentry-mcp-evals", issueId=<issueID>)\`
233
+ "
234
+ `);
235
+ });
236
+ });
237
+ require_dist.describe("search_transactions", () => {
238
+ require_dist.it("serializes", async () => {
239
+ const tool = require_tools.TOOL_HANDLERS.search_transactions;
240
+ const result = await tool({
241
+ accessToken: "access-token",
242
+ userId: "1",
243
+ organizationSlug: null
244
+ }, {
245
+ organizationSlug: "sentry-mcp-evals",
246
+ projectSlug: void 0,
247
+ transaction: void 0,
248
+ query: void 0,
249
+ sortBy: "duration"
250
+ });
251
+ require_vi_ClIskdbk.globalExpect(result).toMatchInlineSnapshot(`
252
+ "# Transactions in **sentry-mcp-evals**
253
+
254
+
255
+ ## GET /trpc/bottleList
256
+
257
+ **Span ID**: 07752c6aeb027c8f
258
+ **Trace ID**: 6a477f5b0f31ef7b6b9b5e1dea66c91d
259
+ **Span Operation**: http.server
260
+ **Span Description**: GET /trpc/bottleList
261
+ **Duration**: 12
262
+ **Timestamp**: 2025-04-13T14:19:18+00:00
263
+ **Project**: peated
264
+ **URL**: https://sentry-mcp-evals.sentry.io/explore/traces/trace/6a477f5b0f31ef7b6b9b5e1dea66c91d
265
+
266
+ ## GET /trpc/bottleList
267
+
268
+ **Span ID**: 7ab5edf5b3ba42c9
269
+ **Trace ID**: 54177131c7b192a446124daba3136045
270
+ **Span Operation**: http.server
271
+ **Span Description**: GET /trpc/bottleList
272
+ **Duration**: 18
273
+ **Timestamp**: 2025-04-13T14:19:17+00:00
274
+ **Project**: peated
275
+ **URL**: https://sentry-mcp-evals.sentry.io/explore/traces/trace/54177131c7b192a446124daba3136045
276
+
277
+ "
278
+ `);
279
+ });
280
+ });
281
+ require_dist.describe("get_issue_summary", () => {
282
+ require_dist.it("serializes with issueId", async () => {
283
+ const tool = require_tools.TOOL_HANDLERS.get_issue_summary;
284
+ const result = await tool({
285
+ accessToken: "access-token",
286
+ userId: "1",
287
+ organizationSlug: null
288
+ }, {
289
+ organizationSlug: "sentry-mcp-evals",
290
+ issueId: "CLOUDFLARE-MCP-41",
291
+ issueUrl: void 0
292
+ });
293
+ require_vi_ClIskdbk.globalExpect(result).toMatchInlineSnapshot(`
294
+ "# Issue CLOUDFLARE-MCP-41 in **sentry-mcp-evals**
295
+
296
+ **Description**: Error: Tool list_organizations is already registered
297
+ **Culprit**: Object.fetch(index)
298
+ **First Seen**: 2025-04-03T22:51:19.403Z
299
+ **Last Seen**: 2025-04-12T11:34:11.000Z
300
+ **Occurrences**: 25
301
+ **Users Impacted**: 1
302
+ **Status**: unresolved
303
+ **Platform**: javascript
304
+ **Project**: CLOUDFLARE-MCP
305
+ **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41
306
+ "
307
+ `);
308
+ });
309
+ require_dist.it("serializes with issueUrl", async () => {
310
+ const tool = require_tools.TOOL_HANDLERS.get_issue_summary;
311
+ const result = await tool({
312
+ accessToken: "access-token",
313
+ userId: "1",
314
+ organizationSlug: null
315
+ }, {
316
+ organizationSlug: void 0,
317
+ issueId: void 0,
318
+ issueUrl: "https://sentry-mcp-evals.sentry.io/issues/6507376925"
319
+ });
320
+ require_vi_ClIskdbk.globalExpect(result).toMatchInlineSnapshot(`
321
+ "# Issue CLOUDFLARE-MCP-41 in **sentry-mcp-evals**
322
+
323
+ **Description**: Error: Tool list_organizations is already registered
324
+ **Culprit**: Object.fetch(index)
325
+ **First Seen**: 2025-04-03T22:51:19.403Z
326
+ **Last Seen**: 2025-04-12T11:34:11.000Z
327
+ **Occurrences**: 25
328
+ **Users Impacted**: 1
329
+ **Status**: unresolved
330
+ **Platform**: javascript
331
+ **Project**: CLOUDFLARE-MCP
332
+ **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41
333
+ "
334
+ `);
335
+ });
336
+ });
337
+ require_dist.describe("get_issue_details", () => {
338
+ require_dist.it("serializes with issueId", async () => {
339
+ const tool = require_tools.TOOL_HANDLERS.get_issue_details;
340
+ const result = await tool({
341
+ accessToken: "access-token",
342
+ userId: "1",
343
+ organizationSlug: null
344
+ }, {
345
+ organizationSlug: "sentry-mcp-evals",
346
+ issueId: "CLOUDFLARE-MCP-41",
347
+ issueUrl: void 0
348
+ });
349
+ require_vi_ClIskdbk.globalExpect(result).toMatchInlineSnapshot(`
350
+ "# Issue CLOUDFLARE-MCP-41 in **sentry-mcp-evals**
351
+
352
+ **Description**: Error: Tool list_organizations is already registered
353
+ **Culprit**: Object.fetch(index)
354
+ **First Seen**: 2025-04-03T22:51:19.403Z
355
+ **Last Seen**: 2025-04-12T11:34:11.000Z
356
+ **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41
357
+
358
+ ## Event Specifics
359
+
360
+ **Occurred At**: 2025-04-08T21:15:04.000Z
361
+ **Error:**
362
+ \`\`\`
363
+ Error: Tool list_organizations is already registered
364
+ \`\`\`
365
+
366
+ **Stacktrace:**
367
+ \`\`\`
368
+ index.js:7809:27
369
+ index.js:8029:24 (OAuthProviderImpl.fetch)
370
+ index.js:19631:28 (Object.fetch)
371
+ \`\`\`
372
+
373
+ # Using this information
374
+
375
+ - You can reference the IssueID in commit messages (e.g. \`Fixes CLOUDFLARE-MCP-41\`) to automatically close the issue when the commit is merged.
376
+ - The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.
377
+ "
378
+ `);
379
+ });
380
+ require_dist.it("serializes with issueUrl", async () => {
381
+ const tool = require_tools.TOOL_HANDLERS.get_issue_details;
382
+ const result = await tool({
383
+ accessToken: "access-token",
384
+ userId: "1",
385
+ organizationSlug: null
386
+ }, {
387
+ organizationSlug: void 0,
388
+ issueId: void 0,
389
+ issueUrl: "https://sentry-mcp-evals.sentry.io/issues/6507376925"
390
+ });
391
+ require_vi_ClIskdbk.globalExpect(result).toMatchInlineSnapshot(`
392
+ "# Issue CLOUDFLARE-MCP-41 in **sentry-mcp-evals**
393
+
394
+ **Description**: Error: Tool list_organizations is already registered
395
+ **Culprit**: Object.fetch(index)
396
+ **First Seen**: 2025-04-03T22:51:19.403Z
397
+ **Last Seen**: 2025-04-12T11:34:11.000Z
398
+ **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41
399
+
400
+ ## Event Specifics
401
+
402
+ **Occurred At**: 2025-04-08T21:15:04.000Z
403
+ **Error:**
404
+ \`\`\`
405
+ Error: Tool list_organizations is already registered
406
+ \`\`\`
407
+
408
+ **Stacktrace:**
409
+ \`\`\`
410
+ index.js:7809:27
411
+ index.js:8029:24 (OAuthProviderImpl.fetch)
412
+ index.js:19631:28 (Object.fetch)
413
+ \`\`\`
414
+
415
+ # Using this information
416
+
417
+ - You can reference the IssueID in commit messages (e.g. \`Fixes 6507376925\`) to automatically close the issue when the commit is merged.
418
+ - The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.
419
+ "
420
+ `);
421
+ });
422
+ });
423
+ require_dist.describe("create_team", () => {
424
+ require_dist.it("serializes", async () => {
425
+ const tool = require_tools.TOOL_HANDLERS.create_team;
426
+ const result = await tool({
427
+ accessToken: "access-token",
428
+ userId: "1",
429
+ organizationSlug: null
430
+ }, {
431
+ organizationSlug: "sentry-mcp-evals",
432
+ name: "the-goats"
433
+ });
434
+ require_vi_ClIskdbk.globalExpect(result).toMatchInlineSnapshot(`
435
+ "# New Team in **sentry-mcp-evals**
436
+
437
+ **ID**: 4509109078196224
438
+ **Slug**: the-goats
439
+ **Name**: the-goats
440
+ # Using this information
441
+
442
+ - You should always inform the user of the Team Slug value.
443
+ "
444
+ `);
445
+ });
446
+ });
447
+ require_dist.describe("create_project", () => {
448
+ require_dist.it("serializes", async () => {
449
+ const tool = require_tools.TOOL_HANDLERS.create_project;
450
+ const result = await tool({
451
+ accessToken: "access-token",
452
+ userId: "1",
453
+ organizationSlug: null
454
+ }, {
455
+ organizationSlug: "sentry-mcp-evals",
456
+ teamSlug: "the-goats",
457
+ name: "cloudflare-mcp",
458
+ platform: "javascript"
459
+ });
460
+ require_vi_ClIskdbk.globalExpect(result).toMatchInlineSnapshot(`
461
+ "# New Project in **sentry-mcp-evals**
462
+
463
+ **ID**: 4509109104082945
464
+ **Slug**: cloudflare-mcp
465
+ **Name**: cloudflare-mcp
466
+ **SENTRY_DSN**: https://d20df0a1ab5031c7f3c7edca9c02814d@o4509106732793856.ingest.us.sentry.io/4509109104082945
467
+
468
+ # Using this information
469
+
470
+ - You can reference the **SENTRY_DSN** value to initialize Sentry's SDKs.
471
+ - You should always inform the user of the **SENTRY_DSN** and Project Slug values.
472
+ "
473
+ `);
474
+ });
475
+ });
476
+ require_dist.describe("create_dsn", () => {
477
+ require_dist.it("serializes", async () => {
478
+ const tool = require_tools.TOOL_HANDLERS.create_dsn;
479
+ const result = await tool({
480
+ accessToken: "access-token",
481
+ userId: "1",
482
+ organizationSlug: null
483
+ }, {
484
+ organizationSlug: "sentry-mcp-evals",
485
+ projectSlug: "cloudflare-mcp",
486
+ name: "Default"
487
+ });
488
+ require_vi_ClIskdbk.globalExpect(result).toMatchInlineSnapshot(`
489
+ "# New DSN in **sentry-mcp-evals/cloudflare-mcp**
490
+
491
+ **DSN**: https://d20df0a1ab5031c7f3c7edca9c02814d@o4509106732793856.ingest.us.sentry.io/4509109104082945
492
+ **Name**: Default
493
+
494
+ # Using this information
495
+
496
+ - The \`SENTRY_DSN\` value is a URL that you can use to initialize Sentry's SDKs.
497
+ "
498
+ `);
499
+ });
500
+ });
501
+ require_dist.describe("list_dsn", () => {
502
+ require_dist.it("serializes", async () => {
503
+ const tool = require_tools.TOOL_HANDLERS.list_dsns;
504
+ const result = await tool({
505
+ accessToken: "access-token",
506
+ userId: "1",
507
+ organizationSlug: null
508
+ }, {
509
+ organizationSlug: "sentry-mcp-evals",
510
+ projectSlug: "cloudflare-mcp"
511
+ });
512
+ require_vi_ClIskdbk.globalExpect(result).toMatchInlineSnapshot(`
513
+ "# DSNs in **sentry-mcp-evals/cloudflare-mcp**
514
+
515
+ ## Default
516
+ **ID**: d20df0a1ab5031c7f3c7edca9c02814d
517
+ **DSN**: https://d20df0a1ab5031c7f3c7edca9c02814d@o4509106732793856.ingest.us.sentry.io/4509109104082945
518
+
519
+ # Using this information
520
+
521
+ - The \`SENTRY_DSN\` value is a URL that you can use to initialize Sentry's SDKs.
522
+ "
523
+ `);
524
+ });
525
+ });
526
+ require_dist.describe("begin_autofix", () => {
527
+ require_dist.it("serializes", async () => {
528
+ const tool = require_tools.TOOL_HANDLERS.begin_autofix;
529
+ const result = await tool({
530
+ accessToken: "access-token",
531
+ userId: "1",
532
+ organizationSlug: null
533
+ }, {
534
+ organizationSlug: "sentry-mcp-evals",
535
+ issueId: "PEATED-A8",
536
+ issueUrl: void 0
537
+ });
538
+ require_vi_ClIskdbk.globalExpect(result).toMatchInlineSnapshot(`
539
+ "# Autofix Started for Issue PEATED-A8
540
+
541
+ **Run ID:**: 123
542
+
543
+ This operation may take some time, so you should call \`get_autofix_status()\` to check the status of the analysis, and repeat the process until its finished.
544
+
545
+ 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..
546
+
547
+ \`\`\`
548
+ get_autofix_status(organizationSlug="sentry-mcp-evals", issueId="PEATED-A8")
549
+ \`\`\`"
550
+ `);
551
+ });
552
+ });
553
+ require_dist.describe("get_autofix_status", () => {
554
+ require_dist.it("serializes", async () => {
555
+ const tool = require_tools.TOOL_HANDLERS.get_autofix_status;
556
+ const result = await tool({
557
+ accessToken: "access-token",
558
+ userId: "1",
559
+ organizationSlug: null
560
+ }, {
561
+ organizationSlug: "sentry-mcp-evals",
562
+ issueId: "PEATED-A8",
563
+ issueUrl: void 0
564
+ });
565
+ require_vi_ClIskdbk.globalExpect(result).toMatchInlineSnapshot(`
566
+ "# Autofix Status for Issue PEATED-A8
567
+
568
+ ## Analyzing the Issue
569
+
570
+ **The \`bottleById\` query fails because the input ID (3216) doesn't exist in the database.
571
+ **
572
+ 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.
573
+
574
+ \`\`\`
575
+ Variable values at the time of the exception::
576
+ {
577
+ "input": 3216
578
+ }
579
+ \`\`\`
580
+
581
+
582
+ **However, the request also includes a different ID (16720) for \`bottlePriceList\`.
583
+ **
584
+ 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.
585
+
586
+ \`\`\`
587
+ GET http://api.peated.com/trpc/bottlePriceList,bottleById
588
+ \`\`\`
589
+
590
+ \`\`\`json
591
+ {
592
+ "input": 3216
593
+ }
594
+ \`\`\`
595
+
596
+ \`\`\`
597
+ TRPCError: Bottle not found. (occurred in: GET /trpc/bottlePriceList,bottleById)
598
+ \`\`\`
599
+
600
+
601
+ **This suggests a data consistency issue or incorrect client-side request.
602
+ **
603
+ 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.
604
+
605
+ \`\`\`
606
+ <anonymous> in file /app/apps/server/src/trpc/routes/bottleById.ts [Line 33, column 13] (In app)
607
+ .select({
608
+ ...getTableColumns(bottles),
609
+ })
610
+ .from(bottleTombstones)
611
+ .innerJoin(bottles, eq(bottleTombstones.newBottleId, bottles.id))
612
+ .where(eq(bottleTombstones.bottleId, input));
613
+ if (!bottle) {
614
+ throw new TRPCError({ <-- SUSPECT LINE
615
+ message: "Bottle not found.",
616
+ code: "NOT_FOUND",
617
+ });
618
+ }
619
+ }
620
+
621
+ const createdBy = await db.query.users.findFirst({
622
+ ---
623
+ Variable values at the time of the exception::
624
+ {
625
+ "input": 3216
626
+ }
627
+ \`\`\`
628
+
629
+
630
+
631
+ ## Root Cause Analysis
632
+
633
+ **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.**
634
+
635
+ 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.
636
+
637
+ **The TRPC server receives the batched request and begins processing the \`bottlePriceList\` procedure, intending to fetch the price list for bottle ID 16720.**
638
+
639
+ \`\`\`typescript
640
+ // apps/server/src/trpc/routes/bottlePriceList.ts
641
+ .input(z.object({ bottle: z.number(), onlyValid: z.boolean().optional() }))
642
+ .query(async function ({ input, ctx }) {
643
+ const [bottle] = await db.select().from(bottles).where(eq(bottles.id, input.bottle));
644
+ if (!bottle) { ... }
645
+ \`\`\`
646
+ This procedure expects a 'bottle' parameter in the input, which is used to query the database.
647
+
648
+ **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.**
649
+
650
+ \`\`\`typescript
651
+ // apps/server/src/trpc/routes/bottleById.ts
652
+ export default publicProcedure.input(z.number()).query(async function ({ input, ctx }) {
653
+ let [bottle] = await db.select().from(bottles).where(eq(bottles.id, input));
654
+ if (!bottle) { ... }
655
+ \`\`\`
656
+ This procedure expects a numerical ID as input to find the bottle.
657
+
658
+ **The \`bottleById\` procedure queries the \`bottles\` table for a bottle with ID 3216, but no such bottle exists.**
659
+
660
+ The database query returns no results because bottle ID 3216 is not present in the \`bottles\` table.
661
+
662
+ **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.**
663
+
664
+ The query to \`bottleTombstones\` also returns no results, indicating that bottle ID 3216 has not been redirected.
665
+
666
+ **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."**
667
+
668
+ \`\`\`typescript
669
+ // apps/server/src/trpc/routes/bottleById.ts
670
+ if (!bottle) {
671
+ throw new TRPCError({ message: "Bottle not found.", code: "NOT_FOUND" });
672
+ }
673
+ \`\`\`
674
+ This is where the error is thrown, indicating that the bottle could not be found.
675
+
676
+
677
+ ## Planning Solution
678
+
679
+ **The discrepancy between inputs suggests a potential issue with batch request handling.
680
+ **
681
+ 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.
682
+
683
+ \`\`\`
684
+ Variable values at the time of the exception::
685
+ {
686
+ "input": 3216
687
+ }
688
+ \`\`\`
689
+
690
+ \`\`\`
691
+ GET http://api.peated.com/trpc/bottlePriceList,bottleById
692
+ \`\`\`
693
+
694
+
695
+ **The client-side batch request construction is the most likely source of error.
696
+ **
697
+ 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.
698
+
699
+ To fix this, I propose the following steps:
700
+
701
+ 1. **Inspect the Client-Side Code:** Identify the code responsible for constructing the TRPC batch request to \`/trpc/bottlePriceList,bottleById\`.
702
+
703
+ 2. **Verify Parameter Mapping:** Ensure that both \`bottlePriceList\` and \`bottleById\` are receiving the correct bottle ID (which should be 16720 in this case).
704
+
705
+ 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.
706
+
707
+ 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.
708
+
709
+ \`\`\`typescript
710
+ // Example logging (add to the client-side code where the batch request is created)
711
+ console.log("bottlePriceList input:", { bottle: 16720 }); // Replace 16720 with the actual ID
712
+ console.log("bottleById input:", { bottle: 16720 }); // Replace 16720 with the actual ID
713
+ \`\`\`
714
+
715
+ 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.
716
+
717
+ 6. **Remove Logging:** Once the fix is verified, remove the temporary logging.
718
+
719
+ This approach directly addresses the most likely cause of the issue and provides a clear path to resolution.
720
+
721
+
722
+ **Ensuring consistent bottle IDs will likely resolve this inconsistency.
723
+ **
724
+ 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.
725
+
726
+ To fix this, I recommend the following steps:
727
+
728
+ 1. **Client-Side Investigation**:
729
+
730
+ * Examine the client-side code where the TRPC batch request is constructed.
731
+ * Verify that the same \`bottleId\` parameter is being passed to both \`bottlePriceList\` and \`bottleById\` procedures.
732
+ * If the IDs are being passed correctly, inspect the network request payload to confirm the correct structure of the batched request.
733
+
734
+ \`\`\`typescript
735
+ // Example (Hypothetical) Client-Side Code
736
+ const bottleId = 16720; // Example bottle ID
737
+
738
+ // Ensure both procedures receive the same bottleId
739
+ const [priceList, bottleDetails] = await trpc.batch(() => [
740
+ trpc.bottlePriceList.fetch({ bottle: bottleId }),
741
+ trpc.bottleById.fetch(bottleId),
742
+ ]);
743
+ \`\`\`
744
+
745
+ 2. **Server-Side Logging (Temporary)**:
746
+
747
+ * Add temporary logging to both \`bottlePriceList\` and \`bottleById\` procedures to log the received \`input\` value.
748
+ * This will help confirm whether the server is receiving the correct IDs from the client.
749
+ * **Important**: Remove these logs after debugging to avoid unnecessary overhead.
750
+
751
+ \`\`\`typescript
752
+ // apps/server/src/trpc/routes/bottlePriceList.ts
753
+ export default publicProcedure
754
+ .input(
755
+ z.object({
756
+ bottle: z.number(),
757
+ onlyValid: z.boolean().optional(),
758
+ }),
759
+ )
760
+ .query(async function ({ input, ctx }) {
761
+ console.log("bottlePriceList input:", input); // Add this line
762
+ // ... rest of the code
763
+ });
764
+
765
+ // apps/server/src/trpc/routes/bottleById.ts
766
+ export default publicProcedure.input(z.number()).query(async function ({
767
+ input,
768
+ ctx,
769
+ }) {
770
+ console.log("bottleById input:", input); // Add this line
771
+ // ... rest of the code
772
+ });
773
+ \`\`\`
774
+
775
+ 3. **TRPC Batch Request Configuration**:
776
+
777
+ * Review the TRPC batch link configuration on the client-side.
778
+ * Ensure that the batching logic is correctly mapping parameters to the corresponding procedures.
779
+ * If using a custom batching implementation, verify its correctness.
780
+
781
+ 4. **Data Integrity Check**:
782
+
783
+ * If the client-side code appears correct, investigate whether bottle ID 3216 should exist in the database.
784
+ * Check the \`bottles\` table and \`bottleTombstones\` table for any entries related to bottle ID 3216.
785
+ * If the bottle should exist but is missing, investigate potential data deletion or migration issues.
786
+
787
+ 5. **Tombstone Logic**:
788
+
789
+ * Double-check the logic for creating and using tombstones.
790
+ * Ensure that when a bottle is deleted, a tombstone entry is created correctly, pointing to the new bottle (if any).
791
+
792
+ 6. **Error Handling**:
793
+
794
+ * While this isn't the primary fix, consider improving the error message in \`bottleById.ts\` to include more context.
795
+ * Include the original requested bottle ID (if available) in the error message to aid debugging.
796
+
797
+ 7. **Client-Side Retries**:
798
+
799
+ * Implement a retry mechanism on the client-side for TRPC requests.
800
+ * If a "Bottle not found" error occurs, retry the request a few times before giving up. This can help mitigate transient issues.
801
+
802
+ 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.
803
+
804
+
805
+
806
+ ## Solution
807
+
808
+ Consolidate bottle and price data fetching into a single batched TRPC request using \`Promise.all\` to ensure ID consistency.
809
+
810
+ **Create a shared utility function to fetch bottle details and price data together.**
811
+ \`\`\`typescript
812
+ // In a shared utility function or component
813
+ export async function getBottleWithPrices(bottleId: number) {
814
+ const trpcClient = await getTrpcClient();
815
+
816
+ // Use Promise.all to ensure both requests are part of the same batch
817
+ // and receive the same parameters
818
+ const [bottle, priceList] = await Promise.all([
819
+ trpcClient.bottleById.fetch(bottleId),
820
+ trpcClient.bottlePriceList.fetch({ bottle: bottleId }),
821
+ ]);
822
+
823
+ return { bottle, priceList };
824
+ }
825
+ \`\`\`
826
+ 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\`.
827
+
828
+ **Modify the page components to use the shared utility function.**
829
+ \`\`\`typescript
830
+ // Then in the page components:
831
+ const { bottle, priceList } = await getBottleWithPrices(Number(bottleId));
832
+ \`\`\`
833
+ 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.
834
+
835
+ **Add a unit test that reproduces the issue.**
836
+ null
837
+
838
+
839
+ "
840
+ `);
841
+ });
842
+ });
843
+
844
+ //#endregion
845
+ //# sourceMappingURL=tools.test.cjs.map