scorecard-ai-mcp 2.0.0-alpha.1 → 2.1.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 (325) hide show
  1. package/README.md +39 -0
  2. package/code-tool-paths.cjs +6 -0
  3. package/code-tool-paths.cjs.map +1 -0
  4. package/code-tool-paths.d.cts +2 -0
  5. package/code-tool-paths.d.cts.map +1 -0
  6. package/code-tool-types.d.mts +14 -0
  7. package/code-tool-types.d.mts.map +1 -0
  8. package/code-tool-types.d.ts +14 -0
  9. package/code-tool-types.d.ts.map +1 -0
  10. package/code-tool-types.js +4 -0
  11. package/code-tool-types.js.map +1 -0
  12. package/code-tool-types.mjs +3 -0
  13. package/code-tool-types.mjs.map +1 -0
  14. package/code-tool-worker.d.mts +5 -0
  15. package/code-tool-worker.d.mts.map +1 -0
  16. package/code-tool-worker.d.ts +5 -0
  17. package/code-tool-worker.d.ts.map +1 -0
  18. package/code-tool-worker.js +45 -0
  19. package/code-tool-worker.js.map +1 -0
  20. package/code-tool-worker.mjs +40 -0
  21. package/code-tool-worker.mjs.map +1 -0
  22. package/code-tool.d.mts +12 -0
  23. package/code-tool.d.mts.map +1 -0
  24. package/code-tool.d.ts +12 -0
  25. package/code-tool.d.ts.map +1 -0
  26. package/code-tool.js +157 -0
  27. package/code-tool.js.map +1 -0
  28. package/code-tool.mjs +121 -0
  29. package/code-tool.mjs.map +1 -0
  30. package/compat.d.mts +4 -2
  31. package/compat.d.mts.map +1 -1
  32. package/compat.d.ts +4 -2
  33. package/compat.d.ts.map +1 -1
  34. package/compat.js +8 -3
  35. package/compat.js.map +1 -1
  36. package/compat.mjs +7 -2
  37. package/compat.mjs.map +1 -1
  38. package/filtering.d.mts +2 -0
  39. package/filtering.d.mts.map +1 -0
  40. package/filtering.d.ts +2 -0
  41. package/filtering.d.ts.map +1 -0
  42. package/filtering.js +20 -0
  43. package/filtering.js.map +1 -0
  44. package/filtering.mjs +13 -0
  45. package/filtering.mjs.map +1 -0
  46. package/headers.d.mts +4 -0
  47. package/headers.d.mts.map +1 -0
  48. package/headers.d.ts +4 -0
  49. package/headers.d.ts.map +1 -0
  50. package/headers.js +22 -0
  51. package/headers.js.map +1 -0
  52. package/headers.mjs +18 -0
  53. package/headers.mjs.map +1 -0
  54. package/http.d.mts +9 -0
  55. package/http.d.mts.map +1 -0
  56. package/http.d.ts +9 -0
  57. package/http.d.ts.map +1 -0
  58. package/http.js +108 -0
  59. package/http.js.map +1 -0
  60. package/http.mjs +100 -0
  61. package/http.mjs.map +1 -0
  62. package/index.js +15 -10
  63. package/index.js.map +1 -1
  64. package/index.mjs +17 -12
  65. package/index.mjs.map +1 -1
  66. package/options.d.mts +11 -6
  67. package/options.d.mts.map +1 -1
  68. package/options.d.ts +11 -6
  69. package/options.d.ts.map +1 -1
  70. package/options.js +136 -15
  71. package/options.js.map +1 -1
  72. package/options.mjs +135 -15
  73. package/options.mjs.map +1 -1
  74. package/package.json +89 -4
  75. package/server.d.mts +4 -16
  76. package/server.d.mts.map +1 -1
  77. package/server.d.ts +4 -16
  78. package/server.d.ts.map +1 -1
  79. package/server.js +86 -33
  80. package/server.js.map +1 -1
  81. package/server.mjs +84 -32
  82. package/server.mjs.map +1 -1
  83. package/src/code-tool-paths.cts +3 -0
  84. package/src/code-tool-types.ts +14 -0
  85. package/src/code-tool-worker.ts +46 -0
  86. package/src/code-tool.ts +146 -0
  87. package/src/compat.ts +9 -4
  88. package/src/filtering.ts +14 -0
  89. package/src/headers.ts +23 -0
  90. package/src/http.ts +127 -0
  91. package/src/index.ts +18 -14
  92. package/src/options.ts +158 -21
  93. package/src/server.ts +103 -48
  94. package/src/stdio.ts +13 -0
  95. package/src/tools/metrics/create-metrics.ts +8 -2
  96. package/src/tools/metrics/update-metrics.ts +8 -2
  97. package/src/tools/projects/create-projects.ts +14 -5
  98. package/src/tools/projects/list-projects.ts +16 -5
  99. package/src/tools/records/create-records.ts +17 -5
  100. package/src/tools/runs/create-runs.ts +14 -5
  101. package/src/tools/scores/upsert-scores.ts +16 -5
  102. package/src/tools/systems/delete-systems.ts +16 -5
  103. package/src/tools/systems/get-systems.ts +16 -5
  104. package/src/tools/systems/list-systems.ts +17 -5
  105. package/src/tools/systems/update-systems.ts +13 -5
  106. package/src/tools/systems/upsert-systems.ts +15 -5
  107. package/src/tools/systems/versions/get-systems-versions.ts +18 -5
  108. package/src/tools/systems/versions/upsert-systems-versions.ts +16 -5
  109. package/src/tools/testcases/create-testcases.ts +15 -5
  110. package/src/tools/testcases/delete-testcases.ts +14 -5
  111. package/src/tools/testcases/get-testcases.ts +16 -5
  112. package/src/tools/testcases/list-testcases.ts +17 -5
  113. package/src/tools/testcases/update-testcases.ts +17 -5
  114. package/src/tools/testsets/create-testsets.ts +14 -5
  115. package/src/tools/testsets/delete-testsets.ts +16 -5
  116. package/src/tools/testsets/get-testsets.ts +16 -5
  117. package/src/tools/testsets/list-testsets.ts +17 -5
  118. package/src/tools/testsets/update-testsets.ts +14 -5
  119. package/src/tools/types.ts +1 -1
  120. package/stdio.d.mts +3 -0
  121. package/stdio.d.mts.map +1 -0
  122. package/stdio.d.ts +3 -0
  123. package/stdio.d.ts.map +1 -0
  124. package/stdio.js +14 -0
  125. package/stdio.js.map +1 -0
  126. package/stdio.mjs +10 -0
  127. package/stdio.mjs.map +1 -0
  128. package/tools/metrics/create-metrics.d.mts +1 -1
  129. package/tools/metrics/create-metrics.d.mts.map +1 -1
  130. package/tools/metrics/create-metrics.d.ts +1 -1
  131. package/tools/metrics/create-metrics.d.ts.map +1 -1
  132. package/tools/metrics/create-metrics.js +7 -0
  133. package/tools/metrics/create-metrics.js.map +1 -1
  134. package/tools/metrics/create-metrics.mjs +7 -0
  135. package/tools/metrics/create-metrics.mjs.map +1 -1
  136. package/tools/metrics/update-metrics.d.mts +1 -1
  137. package/tools/metrics/update-metrics.d.mts.map +1 -1
  138. package/tools/metrics/update-metrics.d.ts +1 -1
  139. package/tools/metrics/update-metrics.d.ts.map +1 -1
  140. package/tools/metrics/update-metrics.js +7 -0
  141. package/tools/metrics/update-metrics.js.map +1 -1
  142. package/tools/metrics/update-metrics.mjs +7 -0
  143. package/tools/metrics/update-metrics.mjs.map +1 -1
  144. package/tools/projects/create-projects.d.mts +1 -1
  145. package/tools/projects/create-projects.d.mts.map +1 -1
  146. package/tools/projects/create-projects.d.ts +1 -1
  147. package/tools/projects/create-projects.d.ts.map +1 -1
  148. package/tools/projects/create-projects.js +11 -3
  149. package/tools/projects/create-projects.js.map +1 -1
  150. package/tools/projects/create-projects.mjs +11 -3
  151. package/tools/projects/create-projects.mjs.map +1 -1
  152. package/tools/projects/list-projects.d.mts +1 -1
  153. package/tools/projects/list-projects.d.mts.map +1 -1
  154. package/tools/projects/list-projects.d.ts +1 -1
  155. package/tools/projects/list-projects.d.ts.map +1 -1
  156. package/tools/projects/list-projects.js +14 -3
  157. package/tools/projects/list-projects.js.map +1 -1
  158. package/tools/projects/list-projects.mjs +14 -3
  159. package/tools/projects/list-projects.mjs.map +1 -1
  160. package/tools/records/create-records.d.mts +1 -1
  161. package/tools/records/create-records.d.mts.map +1 -1
  162. package/tools/records/create-records.d.ts +1 -1
  163. package/tools/records/create-records.d.ts.map +1 -1
  164. package/tools/records/create-records.js +14 -3
  165. package/tools/records/create-records.js.map +1 -1
  166. package/tools/records/create-records.mjs +14 -3
  167. package/tools/records/create-records.mjs.map +1 -1
  168. package/tools/runs/create-runs.d.mts +1 -1
  169. package/tools/runs/create-runs.d.mts.map +1 -1
  170. package/tools/runs/create-runs.d.ts +1 -1
  171. package/tools/runs/create-runs.d.ts.map +1 -1
  172. package/tools/runs/create-runs.js +11 -3
  173. package/tools/runs/create-runs.js.map +1 -1
  174. package/tools/runs/create-runs.mjs +11 -3
  175. package/tools/runs/create-runs.mjs.map +1 -1
  176. package/tools/scores/upsert-scores.d.mts +1 -1
  177. package/tools/scores/upsert-scores.d.mts.map +1 -1
  178. package/tools/scores/upsert-scores.d.ts +1 -1
  179. package/tools/scores/upsert-scores.d.ts.map +1 -1
  180. package/tools/scores/upsert-scores.js +14 -3
  181. package/tools/scores/upsert-scores.js.map +1 -1
  182. package/tools/scores/upsert-scores.mjs +14 -3
  183. package/tools/scores/upsert-scores.mjs.map +1 -1
  184. package/tools/systems/delete-systems.d.mts +1 -1
  185. package/tools/systems/delete-systems.d.mts.map +1 -1
  186. package/tools/systems/delete-systems.d.ts +1 -1
  187. package/tools/systems/delete-systems.d.ts.map +1 -1
  188. package/tools/systems/delete-systems.js +13 -3
  189. package/tools/systems/delete-systems.js.map +1 -1
  190. package/tools/systems/delete-systems.mjs +13 -3
  191. package/tools/systems/delete-systems.mjs.map +1 -1
  192. package/tools/systems/get-systems.d.mts +1 -1
  193. package/tools/systems/get-systems.d.mts.map +1 -1
  194. package/tools/systems/get-systems.d.ts +1 -1
  195. package/tools/systems/get-systems.d.ts.map +1 -1
  196. package/tools/systems/get-systems.js +13 -3
  197. package/tools/systems/get-systems.js.map +1 -1
  198. package/tools/systems/get-systems.mjs +13 -3
  199. package/tools/systems/get-systems.mjs.map +1 -1
  200. package/tools/systems/list-systems.d.mts +1 -1
  201. package/tools/systems/list-systems.d.mts.map +1 -1
  202. package/tools/systems/list-systems.d.ts +1 -1
  203. package/tools/systems/list-systems.d.ts.map +1 -1
  204. package/tools/systems/list-systems.js +14 -3
  205. package/tools/systems/list-systems.js.map +1 -1
  206. package/tools/systems/list-systems.mjs +14 -3
  207. package/tools/systems/list-systems.mjs.map +1 -1
  208. package/tools/systems/update-systems.d.mts +1 -1
  209. package/tools/systems/update-systems.d.mts.map +1 -1
  210. package/tools/systems/update-systems.d.ts +1 -1
  211. package/tools/systems/update-systems.d.ts.map +1 -1
  212. package/tools/systems/update-systems.js +11 -3
  213. package/tools/systems/update-systems.js.map +1 -1
  214. package/tools/systems/update-systems.mjs +11 -3
  215. package/tools/systems/update-systems.mjs.map +1 -1
  216. package/tools/systems/upsert-systems.d.mts +1 -1
  217. package/tools/systems/upsert-systems.d.mts.map +1 -1
  218. package/tools/systems/upsert-systems.d.ts +1 -1
  219. package/tools/systems/upsert-systems.d.ts.map +1 -1
  220. package/tools/systems/upsert-systems.js +12 -3
  221. package/tools/systems/upsert-systems.js.map +1 -1
  222. package/tools/systems/upsert-systems.mjs +12 -3
  223. package/tools/systems/upsert-systems.mjs.map +1 -1
  224. package/tools/systems/versions/get-systems-versions.d.mts +1 -1
  225. package/tools/systems/versions/get-systems-versions.d.mts.map +1 -1
  226. package/tools/systems/versions/get-systems-versions.d.ts +1 -1
  227. package/tools/systems/versions/get-systems-versions.d.ts.map +1 -1
  228. package/tools/systems/versions/get-systems-versions.js +13 -3
  229. package/tools/systems/versions/get-systems-versions.js.map +1 -1
  230. package/tools/systems/versions/get-systems-versions.mjs +13 -3
  231. package/tools/systems/versions/get-systems-versions.mjs.map +1 -1
  232. package/tools/systems/versions/upsert-systems-versions.d.mts +1 -1
  233. package/tools/systems/versions/upsert-systems-versions.d.mts.map +1 -1
  234. package/tools/systems/versions/upsert-systems-versions.d.ts +1 -1
  235. package/tools/systems/versions/upsert-systems-versions.d.ts.map +1 -1
  236. package/tools/systems/versions/upsert-systems-versions.js +12 -3
  237. package/tools/systems/versions/upsert-systems-versions.js.map +1 -1
  238. package/tools/systems/versions/upsert-systems-versions.mjs +12 -3
  239. package/tools/systems/versions/upsert-systems-versions.mjs.map +1 -1
  240. package/tools/testcases/create-testcases.d.mts +1 -1
  241. package/tools/testcases/create-testcases.d.mts.map +1 -1
  242. package/tools/testcases/create-testcases.d.ts +1 -1
  243. package/tools/testcases/create-testcases.d.ts.map +1 -1
  244. package/tools/testcases/create-testcases.js +12 -3
  245. package/tools/testcases/create-testcases.js.map +1 -1
  246. package/tools/testcases/create-testcases.mjs +12 -3
  247. package/tools/testcases/create-testcases.mjs.map +1 -1
  248. package/tools/testcases/delete-testcases.d.mts +1 -1
  249. package/tools/testcases/delete-testcases.d.mts.map +1 -1
  250. package/tools/testcases/delete-testcases.d.ts +1 -1
  251. package/tools/testcases/delete-testcases.d.ts.map +1 -1
  252. package/tools/testcases/delete-testcases.js +11 -3
  253. package/tools/testcases/delete-testcases.js.map +1 -1
  254. package/tools/testcases/delete-testcases.mjs +11 -3
  255. package/tools/testcases/delete-testcases.mjs.map +1 -1
  256. package/tools/testcases/get-testcases.d.mts +1 -1
  257. package/tools/testcases/get-testcases.d.mts.map +1 -1
  258. package/tools/testcases/get-testcases.d.ts +1 -1
  259. package/tools/testcases/get-testcases.d.ts.map +1 -1
  260. package/tools/testcases/get-testcases.js +13 -3
  261. package/tools/testcases/get-testcases.js.map +1 -1
  262. package/tools/testcases/get-testcases.mjs +13 -3
  263. package/tools/testcases/get-testcases.mjs.map +1 -1
  264. package/tools/testcases/list-testcases.d.mts +1 -1
  265. package/tools/testcases/list-testcases.d.mts.map +1 -1
  266. package/tools/testcases/list-testcases.d.ts +1 -1
  267. package/tools/testcases/list-testcases.d.ts.map +1 -1
  268. package/tools/testcases/list-testcases.js +14 -3
  269. package/tools/testcases/list-testcases.js.map +1 -1
  270. package/tools/testcases/list-testcases.mjs +14 -3
  271. package/tools/testcases/list-testcases.mjs.map +1 -1
  272. package/tools/testcases/update-testcases.d.mts +1 -1
  273. package/tools/testcases/update-testcases.d.mts.map +1 -1
  274. package/tools/testcases/update-testcases.d.ts +1 -1
  275. package/tools/testcases/update-testcases.d.ts.map +1 -1
  276. package/tools/testcases/update-testcases.js +14 -3
  277. package/tools/testcases/update-testcases.js.map +1 -1
  278. package/tools/testcases/update-testcases.mjs +14 -3
  279. package/tools/testcases/update-testcases.mjs.map +1 -1
  280. package/tools/testsets/create-testsets.d.mts +1 -1
  281. package/tools/testsets/create-testsets.d.mts.map +1 -1
  282. package/tools/testsets/create-testsets.d.ts +1 -1
  283. package/tools/testsets/create-testsets.d.ts.map +1 -1
  284. package/tools/testsets/create-testsets.js +12 -3
  285. package/tools/testsets/create-testsets.js.map +1 -1
  286. package/tools/testsets/create-testsets.mjs +12 -3
  287. package/tools/testsets/create-testsets.mjs.map +1 -1
  288. package/tools/testsets/delete-testsets.d.mts +1 -1
  289. package/tools/testsets/delete-testsets.d.mts.map +1 -1
  290. package/tools/testsets/delete-testsets.d.ts +1 -1
  291. package/tools/testsets/delete-testsets.d.ts.map +1 -1
  292. package/tools/testsets/delete-testsets.js +13 -3
  293. package/tools/testsets/delete-testsets.js.map +1 -1
  294. package/tools/testsets/delete-testsets.mjs +13 -3
  295. package/tools/testsets/delete-testsets.mjs.map +1 -1
  296. package/tools/testsets/get-testsets.d.mts +1 -1
  297. package/tools/testsets/get-testsets.d.mts.map +1 -1
  298. package/tools/testsets/get-testsets.d.ts +1 -1
  299. package/tools/testsets/get-testsets.d.ts.map +1 -1
  300. package/tools/testsets/get-testsets.js +13 -3
  301. package/tools/testsets/get-testsets.js.map +1 -1
  302. package/tools/testsets/get-testsets.mjs +13 -3
  303. package/tools/testsets/get-testsets.mjs.map +1 -1
  304. package/tools/testsets/list-testsets.d.mts +1 -1
  305. package/tools/testsets/list-testsets.d.mts.map +1 -1
  306. package/tools/testsets/list-testsets.d.ts +1 -1
  307. package/tools/testsets/list-testsets.d.ts.map +1 -1
  308. package/tools/testsets/list-testsets.js +14 -3
  309. package/tools/testsets/list-testsets.js.map +1 -1
  310. package/tools/testsets/list-testsets.mjs +14 -3
  311. package/tools/testsets/list-testsets.mjs.map +1 -1
  312. package/tools/testsets/update-testsets.d.mts +1 -1
  313. package/tools/testsets/update-testsets.d.mts.map +1 -1
  314. package/tools/testsets/update-testsets.d.ts +1 -1
  315. package/tools/testsets/update-testsets.d.ts.map +1 -1
  316. package/tools/testsets/update-testsets.js +12 -3
  317. package/tools/testsets/update-testsets.js.map +1 -1
  318. package/tools/testsets/update-testsets.mjs +12 -3
  319. package/tools/testsets/update-testsets.mjs.map +1 -1
  320. package/tools/types.d.mts +1 -1
  321. package/tools/types.d.mts.map +1 -1
  322. package/tools/types.d.ts +1 -1
  323. package/tools/types.d.ts.map +1 -1
  324. package/tools/types.js.map +1 -1
  325. package/tools/types.mjs.map +1 -1
@@ -2,6 +2,7 @@
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.handler = exports.tool = exports.metadata = void 0;
5
+ const filtering_1 = require("scorecard-ai-mcp/filtering");
5
6
  const types_1 = require("scorecard-ai-mcp/tools/types");
6
7
  exports.metadata = {
7
8
  resource: 'systems.versions',
@@ -13,19 +14,28 @@ exports.metadata = {
13
14
  };
14
15
  exports.tool = {
15
16
  name: 'get_systems_versions',
16
- description: 'Retrieve a specific system version by ID.',
17
+ description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve a specific system version by ID.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/system_version',\n $defs: {\n system_version: {\n type: 'object',\n description: 'A SystemVersion defines the specific settings for a System Under Test.\\n\\nSystem versions contain parameter values that determine system behavior during evaluation.\\nThey are immutable snapshots - once created, they never change.\\n\\nWhen running evaluations, you reference a specific systemVersionId to establish which system version to test.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the system version.'\n },\n config: {\n type: 'object',\n description: 'The configuration of the system version.',\n additionalProperties: true\n },\n name: {\n type: 'string',\n description: 'The name of the system version.'\n },\n systemId: {\n type: 'string',\n description: 'The ID of the system the system version belongs to.'\n }\n },\n required: [ 'id',\n 'config',\n 'name',\n 'systemId'\n ]\n }\n }\n}\n```",
17
18
  inputSchema: {
18
19
  type: 'object',
19
20
  properties: {
20
21
  systemVersionId: {
21
22
  type: 'string',
22
23
  },
24
+ jq_filter: {
25
+ type: 'string',
26
+ title: 'jq Filter',
27
+ description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
28
+ },
23
29
  },
30
+ required: ['systemVersionId'],
31
+ },
32
+ annotations: {
33
+ readOnlyHint: true,
24
34
  },
25
35
  };
26
36
  const handler = async (client, args) => {
27
- const { systemVersionId, ...body } = args;
28
- return (0, types_1.asTextContentResult)(await client.systems.versions.get(systemVersionId));
37
+ const { systemVersionId, jq_filter, ...body } = args;
38
+ return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.systems.versions.get(systemVersionId)));
29
39
  };
30
40
  exports.handler = handler;
31
41
  exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
@@ -1 +1 @@
1
- {"version":3,"file":"get-systems-versions.js","sourceRoot":"","sources":["../../../src/tools/systems/versions/get-systems-versions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAmE;AAMtD,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,kBAAkB;IAC5B,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,qCAAqC;IAC/C,WAAW,EAAE,kBAAkB;CAChC,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,2CAA2C;IACxD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,eAAe,EAAE;gBACf,IAAI,EAAE,QAAQ;aACf;SACF;KACF;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACjD,OAAO,IAAA,2BAAmB,EAAC,MAAM,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;AACjF,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"get-systems-versions.js","sourceRoot":"","sources":["../../../src/tools/systems/versions/get-systems-versions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0DAAyD;AACzD,wDAA6E;AAKhE,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,kBAAkB;IAC5B,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,qCAAqC;IAC/C,WAAW,EAAE,kBAAkB;CAChC,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EACT,q2CAAq2C;IACv2C,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,eAAe,EAAE;gBACf,IAAI,EAAE,QAAQ;aACf;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,iBAAiB,CAAC;KAC9B;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC5D,OAAO,IAAA,2BAAmB,EACxB,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CACjF,CAAC;AACJ,CAAC,CAAC;AALW,QAAA,OAAO,WAKlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
@@ -1,4 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { maybeFilter } from 'scorecard-ai-mcp/filtering';
2
3
  import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
3
4
  export const metadata = {
4
5
  resource: 'systems.versions',
@@ -10,19 +11,28 @@ export const metadata = {
10
11
  };
11
12
  export const tool = {
12
13
  name: 'get_systems_versions',
13
- description: 'Retrieve a specific system version by ID.',
14
+ description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve a specific system version by ID.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/system_version',\n $defs: {\n system_version: {\n type: 'object',\n description: 'A SystemVersion defines the specific settings for a System Under Test.\\n\\nSystem versions contain parameter values that determine system behavior during evaluation.\\nThey are immutable snapshots - once created, they never change.\\n\\nWhen running evaluations, you reference a specific systemVersionId to establish which system version to test.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the system version.'\n },\n config: {\n type: 'object',\n description: 'The configuration of the system version.',\n additionalProperties: true\n },\n name: {\n type: 'string',\n description: 'The name of the system version.'\n },\n systemId: {\n type: 'string',\n description: 'The ID of the system the system version belongs to.'\n }\n },\n required: [ 'id',\n 'config',\n 'name',\n 'systemId'\n ]\n }\n }\n}\n```",
14
15
  inputSchema: {
15
16
  type: 'object',
16
17
  properties: {
17
18
  systemVersionId: {
18
19
  type: 'string',
19
20
  },
21
+ jq_filter: {
22
+ type: 'string',
23
+ title: 'jq Filter',
24
+ description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
25
+ },
20
26
  },
27
+ required: ['systemVersionId'],
28
+ },
29
+ annotations: {
30
+ readOnlyHint: true,
21
31
  },
22
32
  };
23
33
  export const handler = async (client, args) => {
24
- const { systemVersionId, ...body } = args;
25
- return asTextContentResult(await client.systems.versions.get(systemVersionId));
34
+ const { systemVersionId, jq_filter, ...body } = args;
35
+ return asTextContentResult(await maybeFilter(jq_filter, await client.systems.versions.get(systemVersionId)));
26
36
  };
27
37
  export default { metadata, tool, handler };
28
38
  //# sourceMappingURL=get-systems-versions.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-systems-versions.mjs","sourceRoot":"","sources":["../../../src/tools/systems/versions/get-systems-versions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,mBAAmB,EAAE,MAAM,8BAA8B;AAMlE,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,kBAAkB;IAC5B,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,qCAAqC;IAC/C,WAAW,EAAE,kBAAkB;CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,2CAA2C;IACxD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,eAAe,EAAE;gBACf,IAAI,EAAE,QAAQ;aACf;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACjD,OAAO,mBAAmB,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;AACjF,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"get-systems-versions.mjs","sourceRoot":"","sources":["../../../src/tools/systems/versions/get-systems-versions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,4BAA4B;OACjD,EAAY,mBAAmB,EAAE,MAAM,8BAA8B;AAK5E,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,kBAAkB;IAC5B,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,qCAAqC;IAC/C,WAAW,EAAE,kBAAkB;CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EACT,q2CAAq2C;IACv2C,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,eAAe,EAAE;gBACf,IAAI,EAAE,QAAQ;aACf;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,iBAAiB,CAAC;KAC9B;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC5D,OAAO,mBAAmB,CACxB,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CACjF,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
+ import { Metadata } from 'scorecard-ai-mcp/tools/types';
1
2
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
- import type { Metadata } from "../..//index.mjs";
3
3
  import Scorecard from 'scorecard-ai';
4
4
  export declare const metadata: Metadata;
5
5
  export declare const tool: Tool;
@@ -1 +1 @@
1
- {"version":3,"file":"upsert-systems-versions.d.mts","sourceRoot":"","sources":["../../../src/tools/systems/versions/upsert-systems-versions.ts"],"names":[],"mappings":"OAIO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,KAAK,EAAE,QAAQ,EAAE;OACjB,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAqBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
1
+ {"version":3,"file":"upsert-systems-versions.d.mts","sourceRoot":"","sources":["../../../src/tools/systems/versions/upsert-systems-versions.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,8BAA8B;OAErE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA8BlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAKzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBALoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAO1F,wBAA2C"}
@@ -1,5 +1,5 @@
1
+ import { Metadata } from 'scorecard-ai-mcp/tools/types';
1
2
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
- import type { Metadata } from "../..//index.js";
3
3
  import Scorecard from 'scorecard-ai';
4
4
  export declare const metadata: Metadata;
5
5
  export declare const tool: Tool;
@@ -1 +1 @@
1
- {"version":3,"file":"upsert-systems-versions.d.ts","sourceRoot":"","sources":["../../../src/tools/systems/versions/upsert-systems-versions.ts"],"names":[],"mappings":"OAIO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,KAAK,EAAE,QAAQ,EAAE;OACjB,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAqBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
1
+ {"version":3,"file":"upsert-systems-versions.d.ts","sourceRoot":"","sources":["../../../src/tools/systems/versions/upsert-systems-versions.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,8BAA8B;OAErE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA8BlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAKzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBALoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAO1F,wBAA2C"}
@@ -2,6 +2,7 @@
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.handler = exports.tool = exports.metadata = void 0;
5
+ const filtering_1 = require("scorecard-ai-mcp/filtering");
5
6
  const types_1 = require("scorecard-ai-mcp/tools/types");
6
7
  exports.metadata = {
7
8
  resource: 'systems.versions',
@@ -13,7 +14,7 @@ exports.metadata = {
13
14
  };
14
15
  exports.tool = {
15
16
  name: 'upsert_systems_versions',
16
- description: "Create a new system version if it does not already exist. Does **not** set the created version to be the system's production version.\n\nIf there is already a system version with the same config, its name will be updated.",
17
+ description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate a new system version if it does not already exist. Does **not** set the created version to be the system's production version.\n\nIf there is already a system version with the same config, its name will be updated.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/system_version',\n $defs: {\n system_version: {\n type: 'object',\n description: 'A SystemVersion defines the specific settings for a System Under Test.\\n\\nSystem versions contain parameter values that determine system behavior during evaluation.\\nThey are immutable snapshots - once created, they never change.\\n\\nWhen running evaluations, you reference a specific systemVersionId to establish which system version to test.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the system version.'\n },\n config: {\n type: 'object',\n description: 'The configuration of the system version.',\n additionalProperties: true\n },\n name: {\n type: 'string',\n description: 'The name of the system version.'\n },\n systemId: {\n type: 'string',\n description: 'The ID of the system the system version belongs to.'\n }\n },\n required: [ 'id',\n 'config',\n 'name',\n 'systemId'\n ]\n }\n }\n}\n```",
17
18
  inputSchema: {
18
19
  type: 'object',
19
20
  properties: {
@@ -23,17 +24,25 @@ exports.tool = {
23
24
  config: {
24
25
  type: 'object',
25
26
  description: 'The configuration of the system version.',
27
+ additionalProperties: true,
26
28
  },
27
29
  name: {
28
30
  type: 'string',
29
31
  description: "The name of the system version. If creating a new system version and the name isn't provided, it will be autogenerated.",
30
32
  },
33
+ jq_filter: {
34
+ type: 'string',
35
+ title: 'jq Filter',
36
+ description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
37
+ },
31
38
  },
39
+ required: ['systemId', 'config'],
32
40
  },
41
+ annotations: {},
33
42
  };
34
43
  const handler = async (client, args) => {
35
- const { systemId, ...body } = args;
36
- return (0, types_1.asTextContentResult)(await client.systems.versions.upsert(systemId, body));
44
+ const { systemId, jq_filter, ...body } = args;
45
+ return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.systems.versions.upsert(systemId, body)));
37
46
  };
38
47
  exports.handler = handler;
39
48
  exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
@@ -1 +1 @@
1
- {"version":3,"file":"upsert-systems-versions.js","sourceRoot":"","sources":["../../../src/tools/systems/versions/upsert-systems-versions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAmE;AAMtD,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,kBAAkB;IAC5B,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,8BAA8B;IACxC,WAAW,EAAE,qBAAqB;CACnC,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EACT,+NAA+N;IACjO,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;aACf;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0CAA0C;aACxD;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,yHAAyH;aAC5H;SACF;KACF;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC1C,OAAO,IAAA,2BAAmB,EAAC,MAAM,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;AACnF,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"upsert-systems-versions.js","sourceRoot":"","sources":["../../../src/tools/systems/versions/upsert-systems-versions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0DAAyD;AACzD,wDAA6E;AAKhE,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,kBAAkB;IAC5B,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,8BAA8B;IACxC,WAAW,EAAE,qBAAqB;CACnC,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EACT,yhDAAyhD;IAC3hD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;aACf;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0CAA0C;gBACvD,oBAAoB,EAAE,IAAI;aAC3B;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,yHAAyH;aAC5H;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;KACjC;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACrD,OAAO,IAAA,2BAAmB,EACxB,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CACnF,CAAC;AACJ,CAAC,CAAC;AALW,QAAA,OAAO,WAKlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
@@ -1,4 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { maybeFilter } from 'scorecard-ai-mcp/filtering';
2
3
  import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
3
4
  export const metadata = {
4
5
  resource: 'systems.versions',
@@ -10,7 +11,7 @@ export const metadata = {
10
11
  };
11
12
  export const tool = {
12
13
  name: 'upsert_systems_versions',
13
- description: "Create a new system version if it does not already exist. Does **not** set the created version to be the system's production version.\n\nIf there is already a system version with the same config, its name will be updated.",
14
+ description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate a new system version if it does not already exist. Does **not** set the created version to be the system's production version.\n\nIf there is already a system version with the same config, its name will be updated.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/system_version',\n $defs: {\n system_version: {\n type: 'object',\n description: 'A SystemVersion defines the specific settings for a System Under Test.\\n\\nSystem versions contain parameter values that determine system behavior during evaluation.\\nThey are immutable snapshots - once created, they never change.\\n\\nWhen running evaluations, you reference a specific systemVersionId to establish which system version to test.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the system version.'\n },\n config: {\n type: 'object',\n description: 'The configuration of the system version.',\n additionalProperties: true\n },\n name: {\n type: 'string',\n description: 'The name of the system version.'\n },\n systemId: {\n type: 'string',\n description: 'The ID of the system the system version belongs to.'\n }\n },\n required: [ 'id',\n 'config',\n 'name',\n 'systemId'\n ]\n }\n }\n}\n```",
14
15
  inputSchema: {
15
16
  type: 'object',
16
17
  properties: {
@@ -20,17 +21,25 @@ export const tool = {
20
21
  config: {
21
22
  type: 'object',
22
23
  description: 'The configuration of the system version.',
24
+ additionalProperties: true,
23
25
  },
24
26
  name: {
25
27
  type: 'string',
26
28
  description: "The name of the system version. If creating a new system version and the name isn't provided, it will be autogenerated.",
27
29
  },
30
+ jq_filter: {
31
+ type: 'string',
32
+ title: 'jq Filter',
33
+ description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
34
+ },
28
35
  },
36
+ required: ['systemId', 'config'],
29
37
  },
38
+ annotations: {},
30
39
  };
31
40
  export const handler = async (client, args) => {
32
- const { systemId, ...body } = args;
33
- return asTextContentResult(await client.systems.versions.upsert(systemId, body));
41
+ const { systemId, jq_filter, ...body } = args;
42
+ return asTextContentResult(await maybeFilter(jq_filter, await client.systems.versions.upsert(systemId, body)));
34
43
  };
35
44
  export default { metadata, tool, handler };
36
45
  //# sourceMappingURL=upsert-systems-versions.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"upsert-systems-versions.mjs","sourceRoot":"","sources":["../../../src/tools/systems/versions/upsert-systems-versions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,mBAAmB,EAAE,MAAM,8BAA8B;AAMlE,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,kBAAkB;IAC5B,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,8BAA8B;IACxC,WAAW,EAAE,qBAAqB;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EACT,+NAA+N;IACjO,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;aACf;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0CAA0C;aACxD;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,yHAAyH;aAC5H;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC1C,OAAO,mBAAmB,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;AACnF,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"upsert-systems-versions.mjs","sourceRoot":"","sources":["../../../src/tools/systems/versions/upsert-systems-versions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,4BAA4B;OACjD,EAAY,mBAAmB,EAAE,MAAM,8BAA8B;AAK5E,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,kBAAkB;IAC5B,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,8BAA8B;IACxC,WAAW,EAAE,qBAAqB;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EACT,yhDAAyhD;IAC3hD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;aACf;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0CAA0C;gBACvD,oBAAoB,EAAE,IAAI;aAC3B;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,yHAAyH;aAC5H;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;KACjC;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACrD,OAAO,mBAAmB,CACxB,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CACnF,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
+ import { Metadata } from 'scorecard-ai-mcp/tools/types';
1
2
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
- import type { Metadata } from "..//index.mjs";
3
3
  import Scorecard from 'scorecard-ai';
4
4
  export declare const metadata: Metadata;
5
5
  export declare const tool: Tool;
@@ -1 +1 @@
1
- {"version":3,"file":"create-testcases.d.mts","sourceRoot":"","sources":["../../src/tools/testcases/create-testcases.ts"],"names":[],"mappings":"OAIO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,KAAK,EAAE,QAAQ,EAAE;OACjB,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAyBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
1
+ {"version":3,"file":"create-testcases.d.mts","sourceRoot":"","sources":["../../src/tools/testcases/create-testcases.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,8BAA8B;OAErE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAmClB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
@@ -1,5 +1,5 @@
1
+ import { Metadata } from 'scorecard-ai-mcp/tools/types';
1
2
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
- import type { Metadata } from "..//index.js";
3
3
  import Scorecard from 'scorecard-ai';
4
4
  export declare const metadata: Metadata;
5
5
  export declare const tool: Tool;
@@ -1 +1 @@
1
- {"version":3,"file":"create-testcases.d.ts","sourceRoot":"","sources":["../../src/tools/testcases/create-testcases.ts"],"names":[],"mappings":"OAIO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,KAAK,EAAE,QAAQ,EAAE;OACjB,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAyBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
1
+ {"version":3,"file":"create-testcases.d.ts","sourceRoot":"","sources":["../../src/tools/testcases/create-testcases.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,8BAA8B;OAErE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAmClB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
@@ -2,6 +2,7 @@
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.handler = exports.tool = exports.metadata = void 0;
5
+ const filtering_1 = require("scorecard-ai-mcp/filtering");
5
6
  const types_1 = require("scorecard-ai-mcp/tools/types");
6
7
  exports.metadata = {
7
8
  resource: 'testcases',
@@ -13,7 +14,7 @@ exports.metadata = {
13
14
  };
14
15
  exports.tool = {
15
16
  name: 'create_testcases',
16
- description: 'Create multiple Testcases in the specified Testset.',
17
+ description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate multiple Testcases in the specified Testset.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n items: {\n type: 'array',\n items: {\n $ref: '#/$defs/testcase'\n }\n }\n },\n required: [ 'items'\n ],\n $defs: {\n testcase: {\n type: 'object',\n description: 'A test case in the Scorecard system. Contains JSON data that is validated against the schema defined by its Testset.\\nThe `inputs` and `expected` fields are derived from the `data` field based on the Testset\\'s `fieldMapping`, and include all mapped fields, including those with validation errors.\\nTestcases are stored regardless of validation results, with any validation errors included in the `validationErrors` field.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the Testcase.'\n },\n expected: {\n type: 'object',\n description: 'Derived from data based on the Testset\\'s fieldMapping. Contains all fields marked as expected outputs, including those with validation errors.',\n additionalProperties: true\n },\n inputs: {\n type: 'object',\n description: 'Derived from data based on the Testset\\'s fieldMapping. Contains all fields marked as inputs, including those with validation errors.',\n additionalProperties: true\n },\n jsonData: {\n type: 'object',\n description: 'The JSON data of the Testcase, which is validated against the Testset\\'s schema.',\n additionalProperties: true\n },\n testsetId: {\n type: 'string',\n description: 'The ID of the Testset this Testcase belongs to.'\n },\n validationErrors: {\n type: 'array',\n description: 'Validation errors found in the Testcase data. If present, the Testcase doesn\\'t fully conform to its Testset\\'s schema.',\n items: {\n type: 'object',\n properties: {\n message: {\n type: 'string',\n description: 'Human-readable error description.'\n },\n path: {\n type: 'string',\n description: 'JSON Pointer to the field with the validation error.'\n }\n },\n required: [ 'message',\n 'path'\n ]\n }\n }\n },\n required: [ 'id',\n 'expected',\n 'inputs',\n 'jsonData',\n 'testsetId'\n ]\n }\n }\n}\n```",
17
18
  inputSchema: {
18
19
  type: 'object',
19
20
  properties: {
@@ -29,17 +30,25 @@ exports.tool = {
29
30
  jsonData: {
30
31
  type: 'object',
31
32
  description: "The JSON data of the Testcase, which is validated against the Testset's schema.",
33
+ additionalProperties: true,
32
34
  },
33
35
  },
34
36
  required: ['jsonData'],
35
37
  },
36
38
  },
39
+ jq_filter: {
40
+ type: 'string',
41
+ title: 'jq Filter',
42
+ description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
43
+ },
37
44
  },
45
+ required: ['testsetId', 'items'],
38
46
  },
47
+ annotations: {},
39
48
  };
40
49
  const handler = async (client, args) => {
41
- const { testsetId, ...body } = args;
42
- return (0, types_1.asTextContentResult)(await client.testcases.create(testsetId, body));
50
+ const { testsetId, jq_filter, ...body } = args;
51
+ return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.testcases.create(testsetId, body)));
43
52
  };
44
53
  exports.handler = handler;
45
54
  exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
@@ -1 +1 @@
1
- {"version":3,"file":"create-testcases.js","sourceRoot":"","sources":["../../src/tools/testcases/create-testcases.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAmE;AAMtD,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,WAAW;IACrB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,iCAAiC;IAC3C,WAAW,EAAE,iBAAiB;CAC/B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,qDAAqD;IAClE,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;aACf;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,gCAAgC;gBAC7C,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,QAAQ,EAAE;4BACR,IAAI,EAAE,QAAQ;4BACd,WAAW,EAAE,iFAAiF;yBAC/F;qBACF;oBACD,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AC,UAAU,CAAC;iBACvB;aACF;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC;KACjC;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACtD,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAC3G,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
@@ -1,4 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { maybeFilter } from 'scorecard-ai-mcp/filtering';
2
3
  import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
3
4
  export const metadata = {
4
5
  resource: 'testcases',
@@ -10,7 +11,7 @@ export const metadata = {
10
11
  };
11
12
  export const tool = {
12
13
  name: 'create_testcases',
13
- description: 'Create multiple Testcases in the specified Testset.',
14
+ description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate multiple Testcases in the specified Testset.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n items: {\n type: 'array',\n items: {\n $ref: '#/$defs/testcase'\n }\n }\n },\n required: [ 'items'\n ],\n $defs: {\n testcase: {\n type: 'object',\n description: 'A test case in the Scorecard system. Contains JSON data that is validated against the schema defined by its Testset.\\nThe `inputs` and `expected` fields are derived from the `data` field based on the Testset\\'s `fieldMapping`, and include all mapped fields, including those with validation errors.\\nTestcases are stored regardless of validation results, with any validation errors included in the `validationErrors` field.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the Testcase.'\n },\n expected: {\n type: 'object',\n description: 'Derived from data based on the Testset\\'s fieldMapping. Contains all fields marked as expected outputs, including those with validation errors.',\n additionalProperties: true\n },\n inputs: {\n type: 'object',\n description: 'Derived from data based on the Testset\\'s fieldMapping. Contains all fields marked as inputs, including those with validation errors.',\n additionalProperties: true\n },\n jsonData: {\n type: 'object',\n description: 'The JSON data of the Testcase, which is validated against the Testset\\'s schema.',\n additionalProperties: true\n },\n testsetId: {\n type: 'string',\n description: 'The ID of the Testset this Testcase belongs to.'\n },\n validationErrors: {\n type: 'array',\n description: 'Validation errors found in the Testcase data. If present, the Testcase doesn\\'t fully conform to its Testset\\'s schema.',\n items: {\n type: 'object',\n properties: {\n message: {\n type: 'string',\n description: 'Human-readable error description.'\n },\n path: {\n type: 'string',\n description: 'JSON Pointer to the field with the validation error.'\n }\n },\n required: [ 'message',\n 'path'\n ]\n }\n }\n },\n required: [ 'id',\n 'expected',\n 'inputs',\n 'jsonData',\n 'testsetId'\n ]\n }\n }\n}\n```",
14
15
  inputSchema: {
15
16
  type: 'object',
16
17
  properties: {
@@ -26,17 +27,25 @@ export const tool = {
26
27
  jsonData: {
27
28
  type: 'object',
28
29
  description: "The JSON data of the Testcase, which is validated against the Testset's schema.",
30
+ additionalProperties: true,
29
31
  },
30
32
  },
31
33
  required: ['jsonData'],
32
34
  },
33
35
  },
36
+ jq_filter: {
37
+ type: 'string',
38
+ title: 'jq Filter',
39
+ description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
40
+ },
34
41
  },
42
+ required: ['testsetId', 'items'],
35
43
  },
44
+ annotations: {},
36
45
  };
37
46
  export const handler = async (client, args) => {
38
- const { testsetId, ...body } = args;
39
- return asTextContentResult(await client.testcases.create(testsetId, body));
47
+ const { testsetId, jq_filter, ...body } = args;
48
+ return asTextContentResult(await maybeFilter(jq_filter, await client.testcases.create(testsetId, body)));
40
49
  };
41
50
  export default { metadata, tool, handler };
42
51
  //# sourceMappingURL=create-testcases.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-testcases.mjs","sourceRoot":"","sources":["../../src/tools/testcases/create-testcases.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,mBAAmB,EAAE,MAAM,8BAA8B;AAMlE,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,WAAW;IACrB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,iCAAiC;IAC3C,WAAW,EAAE,iBAAiB;CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,qDAAqD;IAClE,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;aACf;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,gCAAgC;gBAC7C,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,QAAQ,EAAE;4BACR,IAAI,EAAE,QAAQ;4BACd,WAAW,EAAE,iFAAiF;yBAC/F;qBACF;oBACD,QAAQ,EAAE,CAAC,UAAU,CAAC;iBACvB;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAA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,WAAW,EAAE,EAAE;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACtD,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAC3G,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
+ import { Metadata } from 'scorecard-ai-mcp/tools/types';
1
2
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
- import type { Metadata } from "..//index.mjs";
3
3
  import Scorecard from 'scorecard-ai';
4
4
  export declare const metadata: Metadata;
5
5
  export declare const tool: Tool;
@@ -1 +1 @@
1
- {"version":3,"file":"delete-testcases.d.mts","sourceRoot":"","sources":["../../src/tools/testcases/delete-testcases.ts"],"names":[],"mappings":"OAIO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,KAAK,EAAE,QAAQ,EAAE;OACjB,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAelB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
1
+ {"version":3,"file":"delete-testcases.d.mts","sourceRoot":"","sources":["../../src/tools/testcases/delete-testcases.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,8BAA8B;OAErE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAwBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
@@ -1,5 +1,5 @@
1
+ import { Metadata } from 'scorecard-ai-mcp/tools/types';
1
2
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
- import type { Metadata } from "..//index.js";
3
3
  import Scorecard from 'scorecard-ai';
4
4
  export declare const metadata: Metadata;
5
5
  export declare const tool: Tool;
@@ -1 +1 @@
1
- {"version":3,"file":"delete-testcases.d.ts","sourceRoot":"","sources":["../../src/tools/testcases/delete-testcases.ts"],"names":[],"mappings":"OAIO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,KAAK,EAAE,QAAQ,EAAE;OACjB,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAelB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
1
+ {"version":3,"file":"delete-testcases.d.ts","sourceRoot":"","sources":["../../src/tools/testcases/delete-testcases.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,8BAA8B;OAErE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAwBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
@@ -2,6 +2,7 @@
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.handler = exports.tool = exports.metadata = void 0;
5
+ const filtering_1 = require("scorecard-ai-mcp/filtering");
5
6
  const types_1 = require("scorecard-ai-mcp/tools/types");
6
7
  exports.metadata = {
7
8
  resource: 'testcases',
@@ -13,7 +14,7 @@ exports.metadata = {
13
14
  };
14
15
  exports.tool = {
15
16
  name: 'delete_testcases',
16
- description: 'Delete multiple Testcases by their IDs.',
17
+ description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nDelete multiple Testcases by their IDs.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n success: {\n type: 'boolean',\n description: 'Whether the deletion was successful.'\n }\n },\n required: [ 'success'\n ]\n}\n```",
17
18
  inputSchema: {
18
19
  type: 'object',
19
20
  properties: {
@@ -24,12 +25,19 @@ exports.tool = {
24
25
  type: 'string',
25
26
  },
26
27
  },
28
+ jq_filter: {
29
+ type: 'string',
30
+ title: 'jq Filter',
31
+ description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
32
+ },
27
33
  },
34
+ required: ['ids'],
28
35
  },
36
+ annotations: {},
29
37
  };
30
38
  const handler = async (client, args) => {
31
- const body = args;
32
- return (0, types_1.asTextContentResult)(await client.testcases.delete(body));
39
+ const { jq_filter, ...body } = args;
40
+ return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.testcases.delete(body)));
33
41
  };
34
42
  exports.handler = handler;
35
43
  exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
@@ -1 +1 @@
1
- {"version":3,"file":"delete-testcases.js","sourceRoot":"","sources":["../../src/tools/testcases/delete-testcases.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAmE;AAMtD,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,WAAW;IACrB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,wBAAwB;IAClC,WAAW,EAAE,iBAAiB;CAC/B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,yCAAyC;IACtD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,GAAG,EAAE;gBACH,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,6BAA6B;gBAC1C,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;iBACf;aACF;SACF;KACF;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,IAAI,GAAG,IAAW,CAAC;IACzB,OAAO,IAAA,2BAAmB,EAAC,MAAM,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAClE,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kB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AAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
@@ -1,4 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { maybeFilter } from 'scorecard-ai-mcp/filtering';
2
3
  import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
3
4
  export const metadata = {
4
5
  resource: 'testcases',
@@ -10,7 +11,7 @@ export const metadata = {
10
11
  };
11
12
  export const tool = {
12
13
  name: 'delete_testcases',
13
- description: 'Delete multiple Testcases by their IDs.',
14
+ description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nDelete multiple Testcases by their IDs.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n success: {\n type: 'boolean',\n description: 'Whether the deletion was successful.'\n }\n },\n required: [ 'success'\n ]\n}\n```",
14
15
  inputSchema: {
15
16
  type: 'object',
16
17
  properties: {
@@ -21,12 +22,19 @@ export const tool = {
21
22
  type: 'string',
22
23
  },
23
24
  },
25
+ jq_filter: {
26
+ type: 'string',
27
+ title: 'jq Filter',
28
+ description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
29
+ },
24
30
  },
31
+ required: ['ids'],
25
32
  },
33
+ annotations: {},
26
34
  };
27
35
  export const handler = async (client, args) => {
28
- const body = args;
29
- return asTextContentResult(await client.testcases.delete(body));
36
+ const { jq_filter, ...body } = args;
37
+ return asTextContentResult(await maybeFilter(jq_filter, await client.testcases.delete(body)));
30
38
  };
31
39
  export default { metadata, tool, handler };
32
40
  //# sourceMappingURL=delete-testcases.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"delete-testcases.mjs","sourceRoot":"","sources":["../../src/tools/testcases/delete-testcases.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,mBAAmB,EA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AI,EAAE,kBAAkB;IACxB,WAAW,EACT,+aAA+a;IACjb,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,GAAG,EAAE;gBACH,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,6BAA6B;gBAC1C,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,KAAK,CAAC;KAClB;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC3C,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAChG,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
+ import { Metadata } from 'scorecard-ai-mcp/tools/types';
1
2
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
- import type { Metadata } from "..//index.mjs";
3
3
  import Scorecard from 'scorecard-ai';
4
4
  export declare const metadata: Metadata;
5
5
  export declare const tool: Tool;
@@ -1 +1 @@
1
- {"version":3,"file":"get-testcases.d.mts","sourceRoot":"","sources":["../../src/tools/testcases/get-testcases.ts"],"names":[],"mappings":"OAIO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,KAAK,EAAE,QAAQ,EAAE;OACjB,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAWlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
1
+ {"version":3,"file":"get-testcases.d.mts","sourceRoot":"","sources":["../../src/tools/testcases/get-testcases.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,8BAA8B;OAErE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAsBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
@@ -1,5 +1,5 @@
1
+ import { Metadata } from 'scorecard-ai-mcp/tools/types';
1
2
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
- import type { Metadata } from "..//index.js";
3
3
  import Scorecard from 'scorecard-ai';
4
4
  export declare const metadata: Metadata;
5
5
  export declare const tool: Tool;
@@ -1 +1 @@
1
- {"version":3,"file":"get-testcases.d.ts","sourceRoot":"","sources":["../../src/tools/testcases/get-testcases.ts"],"names":[],"mappings":"OAIO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,KAAK,EAAE,QAAQ,EAAE;OACjB,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAWlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
1
+ {"version":3,"file":"get-testcases.d.ts","sourceRoot":"","sources":["../../src/tools/testcases/get-testcases.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,8BAA8B;OAErE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAsBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
@@ -2,6 +2,7 @@
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.handler = exports.tool = exports.metadata = void 0;
5
+ const filtering_1 = require("scorecard-ai-mcp/filtering");
5
6
  const types_1 = require("scorecard-ai-mcp/tools/types");
6
7
  exports.metadata = {
7
8
  resource: 'testcases',
@@ -13,19 +14,28 @@ exports.metadata = {
13
14
  };
14
15
  exports.tool = {
15
16
  name: 'get_testcases',
16
- description: 'Retrieve a specific Testcase by ID.',
17
+ description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve a specific Testcase by ID.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/testcase',\n $defs: {\n testcase: {\n type: 'object',\n description: 'A test case in the Scorecard system. Contains JSON data that is validated against the schema defined by its Testset.\\nThe `inputs` and `expected` fields are derived from the `data` field based on the Testset\\'s `fieldMapping`, and include all mapped fields, including those with validation errors.\\nTestcases are stored regardless of validation results, with any validation errors included in the `validationErrors` field.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the Testcase.'\n },\n expected: {\n type: 'object',\n description: 'Derived from data based on the Testset\\'s fieldMapping. Contains all fields marked as expected outputs, including those with validation errors.',\n additionalProperties: true\n },\n inputs: {\n type: 'object',\n description: 'Derived from data based on the Testset\\'s fieldMapping. Contains all fields marked as inputs, including those with validation errors.',\n additionalProperties: true\n },\n jsonData: {\n type: 'object',\n description: 'The JSON data of the Testcase, which is validated against the Testset\\'s schema.',\n additionalProperties: true\n },\n testsetId: {\n type: 'string',\n description: 'The ID of the Testset this Testcase belongs to.'\n },\n validationErrors: {\n type: 'array',\n description: 'Validation errors found in the Testcase data. If present, the Testcase doesn\\'t fully conform to its Testset\\'s schema.',\n items: {\n type: 'object',\n properties: {\n message: {\n type: 'string',\n description: 'Human-readable error description.'\n },\n path: {\n type: 'string',\n description: 'JSON Pointer to the field with the validation error.'\n }\n },\n required: [ 'message',\n 'path'\n ]\n }\n }\n },\n required: [ 'id',\n 'expected',\n 'inputs',\n 'jsonData',\n 'testsetId'\n ]\n }\n }\n}\n```",
17
18
  inputSchema: {
18
19
  type: 'object',
19
20
  properties: {
20
21
  testcaseId: {
21
22
  type: 'string',
22
23
  },
24
+ jq_filter: {
25
+ type: 'string',
26
+ title: 'jq Filter',
27
+ description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
28
+ },
23
29
  },
30
+ required: ['testcaseId'],
31
+ },
32
+ annotations: {
33
+ readOnlyHint: true,
24
34
  },
25
35
  };
26
36
  const handler = async (client, args) => {
27
- const { testcaseId, ...body } = args;
28
- return (0, types_1.asTextContentResult)(await client.testcases.get(testcaseId));
37
+ const { testcaseId, jq_filter, ...body } = args;
38
+ return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.testcases.get(testcaseId)));
29
39
  };
30
40
  exports.handler = handler;
31
41
  exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
@@ -1 +1 @@
1
- {"version":3,"file":"get-testcases.js","sourceRoot":"","sources":["../../src/tools/testcases/get-testcases.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAmE;AAMtD,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,WAAW;IACrB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,yBAAyB;IACnC,WAAW,EAAE,aAAa;CAC3B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,qCAAqC;IAClD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;aACf;SACF;KACF;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC5C,OAAO,IAAA,2BAAmB,EAAC,MAAM,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;AACrE,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"get-test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