scorecard-ai-mcp 2.0.0 → 2.1.1

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 +90 -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
@@ -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,19 +11,28 @@ export const metadata = {
10
11
  };
11
12
  export const tool = {
12
13
  name: 'get_testcases',
13
- description: 'Retrieve a specific Testcase 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 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```",
14
15
  inputSchema: {
15
16
  type: 'object',
16
17
  properties: {
17
18
  testcaseId: {
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: ['testcaseId'],
28
+ },
29
+ annotations: {
30
+ readOnlyHint: true,
21
31
  },
22
32
  };
23
33
  export const handler = async (client, args) => {
24
- const { testcaseId, ...body } = args;
25
- return asTextContentResult(await client.testcases.get(testcaseId));
34
+ const { testcaseId, jq_filter, ...body } = args;
35
+ return asTextContentResult(await maybeFilter(jq_filter, await client.testcases.get(testcaseId)));
26
36
  };
27
37
  export default { metadata, tool, handler };
28
38
  //# sourceMappingURL=get-testcases.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-testcases.mjs","sourceRoot":"","sources":["../../src/tools/testcases/get-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,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,yBAAyB;IACnC,WAAW,EAAE,aAAa;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,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;AAEF,MAAM,CAAC,MAAM,OAAO,GAA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AAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AACnG,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":"list-testcases.d.mts","sourceRoot":"","sources":["../../src/tools/testcases/list-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,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":"list-testcases.d.mts","sourceRoot":"","sources":["../../src/tools/testcases/list-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,IAgClB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAIzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAJoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAM1F,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":"list-testcases.d.ts","sourceRoot":"","sources":["../../src/tools/testcases/list-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,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":"list-testcases.d.ts","sourceRoot":"","sources":["../../src/tools/testcases/list-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,IAgClB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAIzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAJoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAM1F,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: 'list_testcases',
16
- description: 'Retrieve a paginated list of Testcases belonging to a 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\nRetrieve a paginated list of Testcases belonging to a Testset.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/testcase'\n }\n },\n hasMore: {\n type: 'boolean'\n },\n nextCursor: {\n type: 'string'\n },\n total: {\n type: 'integer'\n }\n },\n required: [ 'data',\n 'hasMore',\n 'nextCursor'\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: {
@@ -28,12 +29,22 @@ exports.tool = {
28
29
  type: 'integer',
29
30
  description: 'Maximum number of items to return (1-100). Use with `cursor` for pagination through large sets.',
30
31
  },
32
+ jq_filter: {
33
+ type: 'string',
34
+ title: 'jq Filter',
35
+ 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/).',
36
+ },
31
37
  },
38
+ required: ['testsetId'],
39
+ },
40
+ annotations: {
41
+ readOnlyHint: true,
32
42
  },
33
43
  };
34
44
  const handler = async (client, args) => {
35
- const { testsetId, ...body } = args;
36
- return (0, types_1.asTextContentResult)(await client.testcases.list(testsetId, body));
45
+ const { testsetId, jq_filter, ...body } = args;
46
+ const response = await client.testcases.list(testsetId, body).asResponse();
47
+ return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await response.json()));
37
48
  };
38
49
  exports.handler = handler;
39
50
  exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
@@ -1 +1 @@
1
- {"version":3,"file":"list-testcases.js","sourceRoot":"","sources":["../../src/tools/testcases/list-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,iCAAiC;IAC3C,WAAW,EAAE,eAAe;CAC7B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,gEAAgE;IAC7E,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;aACf;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,0GAA0G;aAC7G;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,SAAS;gBACf,WAAW,EACT,iGAAiG;aACpG;SACF;KACF;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC3C,OAAO,IAAA,2BAAmB,EAAC,MAAM,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;AAC3E,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":"list-testcases.js","sourceRoot":"","sources":["../../src/tools/testcases/list-testcases.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0DAAyD;AACzD,wDAA6E;AAKhE,QAAA,QAAQ,GAAa;I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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: 'list_testcases',
13
- description: 'Retrieve a paginated list of Testcases belonging to a 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\nRetrieve a paginated list of Testcases belonging to a Testset.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/testcase'\n }\n },\n hasMore: {\n type: 'boolean'\n },\n nextCursor: {\n type: 'string'\n },\n total: {\n type: 'integer'\n }\n },\n required: [ 'data',\n 'hasMore',\n 'nextCursor'\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: {
@@ -25,12 +26,22 @@ export const tool = {
25
26
  type: 'integer',
26
27
  description: 'Maximum number of items to return (1-100). Use with `cursor` for pagination through large sets.',
27
28
  },
29
+ jq_filter: {
30
+ type: 'string',
31
+ title: 'jq Filter',
32
+ 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/).',
33
+ },
28
34
  },
35
+ required: ['testsetId'],
36
+ },
37
+ annotations: {
38
+ readOnlyHint: true,
29
39
  },
30
40
  };
31
41
  export const handler = async (client, args) => {
32
- const { testsetId, ...body } = args;
33
- return asTextContentResult(await client.testcases.list(testsetId, body));
42
+ const { testsetId, jq_filter, ...body } = args;
43
+ const response = await client.testcases.list(testsetId, body).asResponse();
44
+ return asTextContentResult(await maybeFilter(jq_filter, await response.json()));
34
45
  };
35
46
  export default { metadata, tool, handler };
36
47
  //# sourceMappingURL=list-testcases.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-testcases.mjs","sourceRoot":"","sources":["../../src/tools/testcases/list-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,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,iCAAiC;IAC3C,WAAW,EAAE,eAAe;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U,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;aACf;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,0GAA0G;aAC7G;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,SAAS;gBACf,WAAW,EACT,iGAAiG;aACpG;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;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,SAAS,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACtD,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;IAC3E,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AAClF,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":"update-testcases.d.mts","sourceRoot":"","sources":["../../src/tools/testcases/update-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":"update-testcases.d.mts","sourceRoot":"","sources":["../../src/tools/testcases/update-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,IA2BlB,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":"update-testcases.d.ts","sourceRoot":"","sources":["../../src/tools/testcases/update-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":"update-testcases.d.ts","sourceRoot":"","sources":["../../src/tools/testcases/update-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,IA2BlB,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: 'update_testcases',
16
- description: 'Replace the data of an existing Testcase while keeping its 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\nReplace the data of an existing Testcase while keeping its 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: {
@@ -23,13 +24,23 @@ exports.tool = {
23
24
  jsonData: {
24
25
  type: 'object',
25
26
  description: "The JSON data of the Testcase, which is validated against the Testset's schema.",
27
+ additionalProperties: true,
28
+ },
29
+ jq_filter: {
30
+ type: 'string',
31
+ title: 'jq Filter',
32
+ 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/).',
26
33
  },
27
34
  },
35
+ required: ['testcaseId', 'jsonData'],
36
+ },
37
+ annotations: {
38
+ idempotentHint: true,
28
39
  },
29
40
  };
30
41
  const handler = async (client, args) => {
31
- const { testcaseId, ...body } = args;
32
- return (0, types_1.asTextContentResult)(await client.testcases.update(testcaseId, body));
42
+ const { testcaseId, jq_filter, ...body } = args;
43
+ return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.testcases.update(testcaseId, body)));
33
44
  };
34
45
  exports.handler = handler;
35
46
  exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
@@ -1 +1 @@
1
- {"version":3,"file":"update-testcases.js","sourceRoot":"","sources":["../../src/tools/testcases/update-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,KAAK;IACjB,QAAQ,EAAE,yBAAyB;IACnC,WAAW,EAAE,gBAAgB;CAC9B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,gEAAgE;IAC7E,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;aACf;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iFAAiF;aAC/F;SACF;KACF;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI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I,EAAE,GAAG,IAAW,CAAC;IACvD,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAC5G,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: 'update_testcases',
13
- description: 'Replace the data of an existing Testcase while keeping its 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\nReplace the data of an existing Testcase while keeping its 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```",
14
15
  inputSchema: {
15
16
  type: 'object',
16
17
  properties: {
@@ -20,13 +21,23 @@ export const tool = {
20
21
  jsonData: {
21
22
  type: 'object',
22
23
  description: "The JSON data of the Testcase, which is validated against the Testset's schema.",
24
+ additionalProperties: true,
25
+ },
26
+ jq_filter: {
27
+ type: 'string',
28
+ title: 'jq Filter',
29
+ 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/).',
23
30
  },
24
31
  },
32
+ required: ['testcaseId', 'jsonData'],
33
+ },
34
+ annotations: {
35
+ idempotentHint: true,
25
36
  },
26
37
  };
27
38
  export const handler = async (client, args) => {
28
- const { testcaseId, ...body } = args;
29
- return asTextContentResult(await client.testcases.update(testcaseId, body));
39
+ const { testcaseId, jq_filter, ...body } = args;
40
+ return asTextContentResult(await maybeFilter(jq_filter, await client.testcases.update(testcaseId, body)));
30
41
  };
31
42
  export default { metadata, tool, handler };
32
43
  //# sourceMappingURL=update-testcases.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"update-testcases.mjs","sourceRoot":"","sources":["../../src/tools/testcases/update-testcases.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,mBAAmB,EAAE,MAAM,8BAA8B;AAM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,IAAI,GAAS;IACxB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EACT,0lFAA0lF;IAC5lF,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;aACf;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iFAAiF;gBAC9F,oBAAoB,EAAE,IAAI;aAC3B;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;KACrC;IACD,WAAW,EAAE;QACX,cAAc,EAAE,IAAI;KACrB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACvD,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAC5G,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-testsets.d.mts","sourceRoot":"","sources":["../../src/tools/testsets/create-testsets.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,IAqDlB,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-testsets.d.mts","sourceRoot":"","sources":["../../src/tools/testsets/create-testsets.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,IA8DlB,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-testsets.d.ts","sourceRoot":"","sources":["../../src/tools/testsets/create-testsets.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,IAqDlB,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-testsets.d.ts","sourceRoot":"","sources":["../../src/tools/testsets/create-testsets.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,IA8DlB,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: 'testsets',
@@ -13,7 +14,7 @@ exports.metadata = {
13
14
  };
14
15
  exports.tool = {
15
16
  name: 'create_testsets',
16
- description: 'Create a new Testset for a Project. The Testset will be created in the Project specified in the path.',
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 Testset for a Project. The Testset will be created in the Project specified in the path.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/testset',\n $defs: {\n testset: {\n type: 'object',\n description: 'A collection of Testcases that share the same schema.\\nEach Testset defines the structure of its Testcases through a JSON schema.\\nThe `fieldMapping` object maps top-level keys of the Testcase schema to their roles (input/expected output).\\nFields not mentioned in the `fieldMapping` during creation or update are treated as metadata.\\n\\n## JSON Schema validation constraints supported:\\n\\n- **Required fields** - Fields listed in the schema\\'s `required` array must be present in Testcases.\\n- **Type validation** - Values must match the specified type (string, number, boolean, null, integer, object, array).\\n- **Enum validation** - Values must be one of the options specified in the `enum` array.\\n- **Object property validation** - Properties of objects must conform to their defined schemas.\\n- **Array item validation** - Items in arrays must conform to the `items` schema.\\n- **Logical composition** - Values must conform to at least one schema in the `anyOf` array.\\n\\nTestcases that fail validation will still be stored, but will include `validationErrors` detailing the issues.\\nExtra fields in the Testcase data that are not in the schema will be stored but are ignored during validation.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the Testset.'\n },\n description: {\n type: 'string',\n description: 'The description of the Testset.'\n },\n fieldMapping: {\n type: 'object',\n description: 'Maps top-level keys of the Testcase schema to their roles (input/expected output). Unmapped fields are treated as metadata.',\n properties: {\n expected: {\n type: 'array',\n description: 'Fields that represent expected outputs.',\n items: {\n type: 'string'\n }\n },\n inputs: {\n type: 'array',\n description: 'Fields that represent inputs to the AI system.',\n items: {\n type: 'string'\n }\n },\n metadata: {\n type: 'array',\n description: 'Fields that are not inputs or expected outputs.',\n items: {\n type: 'string'\n }\n }\n },\n required: [ 'expected',\n 'inputs',\n 'metadata'\n ]\n },\n jsonSchema: {\n type: 'object',\n description: 'The JSON schema for each Testcase in the Testset.',\n additionalProperties: true\n },\n name: {\n type: 'string',\n description: 'The name of the Testset.'\n }\n },\n required: [ 'id',\n 'description',\n 'fieldMapping',\n 'jsonSchema',\n 'name'\n ]\n }\n }\n}\n```",
17
18
  inputSchema: {
18
19
  type: 'object',
19
20
  properties: {
@@ -55,17 +56,25 @@ exports.tool = {
55
56
  jsonSchema: {
56
57
  type: 'object',
57
58
  description: 'The JSON schema for each Testcase in the Testset.',
59
+ additionalProperties: true,
58
60
  },
59
61
  name: {
60
62
  type: 'string',
61
63
  description: 'The name of the Testset.',
62
64
  },
65
+ jq_filter: {
66
+ type: 'string',
67
+ title: 'jq Filter',
68
+ 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/).',
69
+ },
63
70
  },
71
+ required: ['projectId', 'description', 'fieldMapping', 'jsonSchema', 'name'],
64
72
  },
73
+ annotations: {},
65
74
  };
66
75
  const handler = async (client, args) => {
67
- const { projectId, ...body } = args;
68
- return (0, types_1.asTextContentResult)(await client.testsets.create(projectId, body));
76
+ const { projectId, jq_filter, ...body } = args;
77
+ return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.testsets.create(projectId, body)));
69
78
  };
70
79
  exports.handler = handler;
71
80
  exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
@@ -1 +1 @@
1
- {"version":3,"file":"create-testsets.js","sourceRoot":"","sources":["../../src/tools/testsets/create-testsets.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAmE;AAMtD,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,gCAAgC;IAC1C,WAAW,EAAE,eAAe;CAC7B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,iBAAiB;IACvB,WAAW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EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"create-testsets.js","sourceRoot":"","sources":["../../src/tools/testsets/create-testsets.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0DAAyD;AACzD,wDAA6E;AAKhE,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,gCAAgC;IAC1C,WAAW,EAAE,eAAe;CAC7B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EACT,+vGAA+vG;IACjwG,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;aACf;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iCAAiC;aAC/C;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,6HAA6H;gBAC/H,UAAU,EAAE;oBACV,QAAQ,EAAE;wBACR,IAAI,EAAE,OAAO;wBACb,WAAW,EAAE,yCAAyC;wBACtD,KAAK,EAAE;4BACL,IAAI,EAAE,QAAQ;yBACf;qBACF;oBACD,MAAM,EAAE;wBACN,IAAI,EAAE,OAAO;wBACb,WAAW,EAAE,gDAAgD;wBAC7D,KAAK,EAAE;4BACL,IAAI,EAAE,QAAQ;yBACf;qBACF;oBACD,QAAQ,EAAE;wBACR,IAAI,EAAE,OAAO;wBACb,WAAW,EAAE,iDAAiD;wBAC9D,KAAK,EAAE;4BACL,IAAI,EAAE,QAAQ;yBACf;qBACF;iBACF;gBACD,QAAQ,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC;aAC7C;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,mDAAmD;gBAChE,oBAAoB,EAAE,IAAI;aAC3B;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0BAA0B;aACxC;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,CAAC;KAC7E;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,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAC1G,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: 'testsets',
@@ -10,7 +11,7 @@ export const metadata = {
10
11
  };
11
12
  export const tool = {
12
13
  name: 'create_testsets',
13
- description: 'Create a new Testset for a Project. The Testset will be created in the Project specified in the path.',
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 Testset for a Project. The Testset will be created in the Project specified in the path.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/testset',\n $defs: {\n testset: {\n type: 'object',\n description: 'A collection of Testcases that share the same schema.\\nEach Testset defines the structure of its Testcases through a JSON schema.\\nThe `fieldMapping` object maps top-level keys of the Testcase schema to their roles (input/expected output).\\nFields not mentioned in the `fieldMapping` during creation or update are treated as metadata.\\n\\n## JSON Schema validation constraints supported:\\n\\n- **Required fields** - Fields listed in the schema\\'s `required` array must be present in Testcases.\\n- **Type validation** - Values must match the specified type (string, number, boolean, null, integer, object, array).\\n- **Enum validation** - Values must be one of the options specified in the `enum` array.\\n- **Object property validation** - Properties of objects must conform to their defined schemas.\\n- **Array item validation** - Items in arrays must conform to the `items` schema.\\n- **Logical composition** - Values must conform to at least one schema in the `anyOf` array.\\n\\nTestcases that fail validation will still be stored, but will include `validationErrors` detailing the issues.\\nExtra fields in the Testcase data that are not in the schema will be stored but are ignored during validation.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the Testset.'\n },\n description: {\n type: 'string',\n description: 'The description of the Testset.'\n },\n fieldMapping: {\n type: 'object',\n description: 'Maps top-level keys of the Testcase schema to their roles (input/expected output). Unmapped fields are treated as metadata.',\n properties: {\n expected: {\n type: 'array',\n description: 'Fields that represent expected outputs.',\n items: {\n type: 'string'\n }\n },\n inputs: {\n type: 'array',\n description: 'Fields that represent inputs to the AI system.',\n items: {\n type: 'string'\n }\n },\n metadata: {\n type: 'array',\n description: 'Fields that are not inputs or expected outputs.',\n items: {\n type: 'string'\n }\n }\n },\n required: [ 'expected',\n 'inputs',\n 'metadata'\n ]\n },\n jsonSchema: {\n type: 'object',\n description: 'The JSON schema for each Testcase in the Testset.',\n additionalProperties: true\n },\n name: {\n type: 'string',\n description: 'The name of the Testset.'\n }\n },\n required: [ 'id',\n 'description',\n 'fieldMapping',\n 'jsonSchema',\n 'name'\n ]\n }\n }\n}\n```",
14
15
  inputSchema: {
15
16
  type: 'object',
16
17
  properties: {
@@ -52,17 +53,25 @@ export const tool = {
52
53
  jsonSchema: {
53
54
  type: 'object',
54
55
  description: 'The JSON schema for each Testcase in the Testset.',
56
+ additionalProperties: true,
55
57
  },
56
58
  name: {
57
59
  type: 'string',
58
60
  description: 'The name of the Testset.',
59
61
  },
62
+ jq_filter: {
63
+ type: 'string',
64
+ title: 'jq Filter',
65
+ 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/).',
66
+ },
60
67
  },
68
+ required: ['projectId', 'description', 'fieldMapping', 'jsonSchema', 'name'],
61
69
  },
70
+ annotations: {},
62
71
  };
63
72
  export const handler = async (client, args) => {
64
- const { projectId, ...body } = args;
65
- return asTextContentResult(await client.testsets.create(projectId, body));
73
+ const { projectId, jq_filter, ...body } = args;
74
+ return asTextContentResult(await maybeFilter(jq_filter, await client.testsets.create(projectId, body)));
66
75
  };
67
76
  export default { metadata, tool, handler };
68
77
  //# sourceMappingURL=create-testsets.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-testsets.mjs","sourceRoot":"","sources":["../../src/tools/testsets/create-testsets.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,mBAAmB,EAAE,MAAM,8BAA8B;AAMlE,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,gCAAgC;IAC1C,WAAW,EAAE,eAAe;CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EACT,uGAAuG;IACzG,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;aACf;YACD,WAAW,EAAE;gBACX,I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AE,0BAA0B;aACxC;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,CAAC;KAC7E;IACD,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,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAC1G,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-testsets.d.mts","sourceRoot":"","sources":["../../src/tools/testsets/delete-testsets.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":"delete-testsets.d.mts","sourceRoot":"","sources":["../../src/tools/testsets/delete-testsets.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":"delete-testsets.d.ts","sourceRoot":"","sources":["../../src/tools/testsets/delete-testsets.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":"delete-testsets.d.ts","sourceRoot":"","sources":["../../src/tools/testsets/delete-testsets.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: 'testsets',
@@ -13,19 +14,28 @@ exports.metadata = {
13
14
  };
14
15
  exports.tool = {
15
16
  name: 'delete_testsets',
16
- description: 'Delete 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\nDelete Testset\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: {
20
21
  testsetId: {
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: ['testsetId'],
31
+ },
32
+ annotations: {
33
+ idempotentHint: true,
24
34
  },
25
35
  };
26
36
  const handler = async (client, args) => {
27
- const { testsetId, ...body } = args;
28
- return (0, types_1.asTextContentResult)(await client.testsets.delete(testsetId));
37
+ const { testsetId, jq_filter, ...body } = args;
38
+ return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.testsets.delete(testsetId)));
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":"delete-testsets.js","sourceRoot":"","sources":["../../src/tools/testsets/delete-testsets.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAmE;AAMtD,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,QAAQ;IACpB,QAAQ,EAAE,uBAAuB;IACjC,WAAW,EAAE,eAAe;CAC7B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;aACf;SACF;KACF;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI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