scorecard-ai-mcp 2.6.0 → 3.0.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 (402) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +76 -194
  3. package/code-tool-types.d.mts +7 -9
  4. package/code-tool-types.d.mts.map +1 -1
  5. package/code-tool-types.d.ts +7 -9
  6. package/code-tool-types.d.ts.map +1 -1
  7. package/code-tool.d.mts +2 -44
  8. package/code-tool.d.mts.map +1 -1
  9. package/code-tool.d.ts +2 -44
  10. package/code-tool.d.ts.map +1 -1
  11. package/code-tool.js +60 -8
  12. package/code-tool.js.map +1 -1
  13. package/code-tool.mjs +61 -9
  14. package/code-tool.mjs.map +1 -1
  15. package/docs-search-tool.d.mts +4 -3
  16. package/docs-search-tool.d.mts.map +1 -1
  17. package/docs-search-tool.d.ts +4 -3
  18. package/docs-search-tool.d.ts.map +1 -1
  19. package/docs-search-tool.js +2 -1
  20. package/docs-search-tool.js.map +1 -1
  21. package/docs-search-tool.mjs +2 -1
  22. package/docs-search-tool.mjs.map +1 -1
  23. package/http.d.mts.map +1 -1
  24. package/http.d.ts.map +1 -1
  25. package/http.js +2 -22
  26. package/http.js.map +1 -1
  27. package/http.mjs +2 -22
  28. package/http.mjs.map +1 -1
  29. package/index.js +4 -40
  30. package/index.js.map +1 -1
  31. package/index.mjs +4 -40
  32. package/index.mjs.map +1 -1
  33. package/options.d.mts +0 -9
  34. package/options.d.mts.map +1 -1
  35. package/options.d.ts +0 -9
  36. package/options.d.ts.map +1 -1
  37. package/options.js +6 -361
  38. package/options.js.map +1 -1
  39. package/options.mjs +6 -361
  40. package/options.mjs.map +1 -1
  41. package/package.json +11 -51
  42. package/server.d.mts +3 -8
  43. package/server.d.mts.map +1 -1
  44. package/server.d.ts +3 -8
  45. package/server.d.ts.map +1 -1
  46. package/server.js +12 -65
  47. package/server.js.map +1 -1
  48. package/server.mjs +11 -62
  49. package/server.mjs.map +1 -1
  50. package/src/code-tool-types.ts +7 -9
  51. package/src/code-tool.ts +66 -12
  52. package/src/docs-search-tool.ts +2 -1
  53. package/src/http.ts +3 -24
  54. package/src/index.ts +5 -52
  55. package/src/options.ts +7 -388
  56. package/src/server.ts +12 -72
  57. package/src/stdio.ts +2 -3
  58. package/src/{tools/types.ts → types.ts} +1 -1
  59. package/stdio.d.mts +1 -2
  60. package/stdio.d.mts.map +1 -1
  61. package/stdio.d.ts +1 -2
  62. package/stdio.d.ts.map +1 -1
  63. package/stdio.js +2 -2
  64. package/stdio.js.map +1 -1
  65. package/stdio.mjs +2 -2
  66. package/stdio.mjs.map +1 -1
  67. package/{tools/types.d.mts → types.d.mts} +1 -1
  68. package/types.d.mts.map +1 -0
  69. package/{tools/types.d.ts → types.d.ts} +1 -1
  70. package/types.d.ts.map +1 -0
  71. package/types.js.map +1 -0
  72. package/types.mjs.map +1 -0
  73. package/compat.d.mts +0 -58
  74. package/compat.d.mts.map +0 -1
  75. package/compat.d.ts +0 -58
  76. package/compat.d.ts.map +0 -1
  77. package/compat.js +0 -387
  78. package/compat.js.map +0 -1
  79. package/compat.mjs +0 -378
  80. package/compat.mjs.map +0 -1
  81. package/dynamic-tools.d.mts +0 -12
  82. package/dynamic-tools.d.mts.map +0 -1
  83. package/dynamic-tools.d.ts +0 -12
  84. package/dynamic-tools.d.ts.map +0 -1
  85. package/dynamic-tools.js +0 -135
  86. package/dynamic-tools.js.map +0 -1
  87. package/dynamic-tools.mjs +0 -132
  88. package/dynamic-tools.mjs.map +0 -1
  89. package/filtering.d.mts +0 -3
  90. package/filtering.d.mts.map +0 -1
  91. package/filtering.d.ts +0 -3
  92. package/filtering.d.ts.map +0 -1
  93. package/filtering.js +0 -24
  94. package/filtering.js.map +0 -1
  95. package/filtering.mjs +0 -16
  96. package/filtering.mjs.map +0 -1
  97. package/src/compat.ts +0 -483
  98. package/src/dynamic-tools.ts +0 -159
  99. package/src/filtering.ts +0 -18
  100. package/src/tools/index.ts +0 -131
  101. package/src/tools/metrics/create-metrics.ts +0 -383
  102. package/src/tools/metrics/delete-metrics.ts +0 -54
  103. package/src/tools/metrics/get-metrics.ts +0 -46
  104. package/src/tools/metrics/list-metrics.ts +0 -58
  105. package/src/tools/metrics/update-metrics.ts +0 -383
  106. package/src/tools/projects/create-projects.ts +0 -57
  107. package/src/tools/projects/list-projects.ts +0 -62
  108. package/src/tools/records/create-records.ts +0 -71
  109. package/src/tools/records/delete-records.ts +0 -54
  110. package/src/tools/records/list-records.ts +0 -65
  111. package/src/tools/runs/create-runs.ts +0 -67
  112. package/src/tools/runs/get-runs.ts +0 -54
  113. package/src/tools/runs/list-runs.ts +0 -65
  114. package/src/tools/scores/upsert-scores.ts +0 -65
  115. package/src/tools/systems/delete-systems.ts +0 -54
  116. package/src/tools/systems/get-systems.ts +0 -54
  117. package/src/tools/systems/list-systems.ts +0 -65
  118. package/src/tools/systems/update-systems.ts +0 -64
  119. package/src/tools/systems/upsert-systems.ts +0 -66
  120. package/src/tools/systems/versions/get-systems-versions.ts +0 -56
  121. package/src/tools/systems/versions/upsert-systems-versions.ts +0 -64
  122. package/src/tools/testcases/create-testcases.ts +0 -67
  123. package/src/tools/testcases/delete-testcases.ts +0 -56
  124. package/src/tools/testcases/get-testcases.ts +0 -54
  125. package/src/tools/testcases/list-testcases.ts +0 -65
  126. package/src/tools/testcases/update-testcases.ts +0 -59
  127. package/src/tools/testsets/create-testsets.ts +0 -94
  128. package/src/tools/testsets/delete-testsets.ts +0 -54
  129. package/src/tools/testsets/get-testsets.ts +0 -54
  130. package/src/tools/testsets/list-testsets.ts +0 -65
  131. package/src/tools/testsets/update-testsets.ts +0 -94
  132. package/src/tools.ts +0 -1
  133. package/tools/index.d.mts +0 -10
  134. package/tools/index.d.mts.map +0 -1
  135. package/tools/index.d.ts +0 -10
  136. package/tools/index.d.ts.map +0 -1
  137. package/tools/index.js +0 -115
  138. package/tools/index.js.map +0 -1
  139. package/tools/index.mjs +0 -108
  140. package/tools/index.mjs.map +0 -1
  141. package/tools/metrics/create-metrics.d.mts +0 -51
  142. package/tools/metrics/create-metrics.d.mts.map +0 -1
  143. package/tools/metrics/create-metrics.d.ts +0 -51
  144. package/tools/metrics/create-metrics.d.ts.map +0 -1
  145. package/tools/metrics/create-metrics.js +0 -381
  146. package/tools/metrics/create-metrics.js.map +0 -1
  147. package/tools/metrics/create-metrics.mjs +0 -374
  148. package/tools/metrics/create-metrics.mjs.map +0 -1
  149. package/tools/metrics/delete-metrics.d.mts +0 -51
  150. package/tools/metrics/delete-metrics.d.mts.map +0 -1
  151. package/tools/metrics/delete-metrics.d.ts +0 -51
  152. package/tools/metrics/delete-metrics.d.ts.map +0 -1
  153. package/tools/metrics/delete-metrics.js +0 -54
  154. package/tools/metrics/delete-metrics.js.map +0 -1
  155. package/tools/metrics/delete-metrics.mjs +0 -47
  156. package/tools/metrics/delete-metrics.mjs.map +0 -1
  157. package/tools/metrics/get-metrics.d.mts +0 -51
  158. package/tools/metrics/get-metrics.d.mts.map +0 -1
  159. package/tools/metrics/get-metrics.d.ts +0 -51
  160. package/tools/metrics/get-metrics.d.ts.map +0 -1
  161. package/tools/metrics/get-metrics.js +0 -48
  162. package/tools/metrics/get-metrics.js.map +0 -1
  163. package/tools/metrics/get-metrics.mjs +0 -41
  164. package/tools/metrics/get-metrics.mjs.map +0 -1
  165. package/tools/metrics/list-metrics.d.mts +0 -51
  166. package/tools/metrics/list-metrics.d.mts.map +0 -1
  167. package/tools/metrics/list-metrics.d.ts +0 -51
  168. package/tools/metrics/list-metrics.d.ts.map +0 -1
  169. package/tools/metrics/list-metrics.js +0 -57
  170. package/tools/metrics/list-metrics.js.map +0 -1
  171. package/tools/metrics/list-metrics.mjs +0 -50
  172. package/tools/metrics/list-metrics.mjs.map +0 -1
  173. package/tools/metrics/update-metrics.d.mts +0 -51
  174. package/tools/metrics/update-metrics.d.mts.map +0 -1
  175. package/tools/metrics/update-metrics.d.ts +0 -51
  176. package/tools/metrics/update-metrics.d.ts.map +0 -1
  177. package/tools/metrics/update-metrics.js +0 -381
  178. package/tools/metrics/update-metrics.js.map +0 -1
  179. package/tools/metrics/update-metrics.mjs +0 -374
  180. package/tools/metrics/update-metrics.mjs.map +0 -1
  181. package/tools/projects/create-projects.d.mts +0 -51
  182. package/tools/projects/create-projects.d.mts.map +0 -1
  183. package/tools/projects/create-projects.d.ts +0 -51
  184. package/tools/projects/create-projects.d.ts.map +0 -1
  185. package/tools/projects/create-projects.js +0 -57
  186. package/tools/projects/create-projects.js.map +0 -1
  187. package/tools/projects/create-projects.mjs +0 -50
  188. package/tools/projects/create-projects.mjs.map +0 -1
  189. package/tools/projects/list-projects.d.mts +0 -51
  190. package/tools/projects/list-projects.d.mts.map +0 -1
  191. package/tools/projects/list-projects.d.ts +0 -51
  192. package/tools/projects/list-projects.d.ts.map +0 -1
  193. package/tools/projects/list-projects.js +0 -60
  194. package/tools/projects/list-projects.js.map +0 -1
  195. package/tools/projects/list-projects.mjs +0 -53
  196. package/tools/projects/list-projects.mjs.map +0 -1
  197. package/tools/records/create-records.d.mts +0 -51
  198. package/tools/records/create-records.d.mts.map +0 -1
  199. package/tools/records/create-records.d.ts +0 -51
  200. package/tools/records/create-records.d.ts.map +0 -1
  201. package/tools/records/create-records.js +0 -71
  202. package/tools/records/create-records.js.map +0 -1
  203. package/tools/records/create-records.mjs +0 -64
  204. package/tools/records/create-records.mjs.map +0 -1
  205. package/tools/records/delete-records.d.mts +0 -51
  206. package/tools/records/delete-records.d.mts.map +0 -1
  207. package/tools/records/delete-records.d.ts +0 -51
  208. package/tools/records/delete-records.d.ts.map +0 -1
  209. package/tools/records/delete-records.js +0 -54
  210. package/tools/records/delete-records.js.map +0 -1
  211. package/tools/records/delete-records.mjs +0 -47
  212. package/tools/records/delete-records.mjs.map +0 -1
  213. package/tools/records/list-records.d.mts +0 -51
  214. package/tools/records/list-records.d.mts.map +0 -1
  215. package/tools/records/list-records.d.ts +0 -51
  216. package/tools/records/list-records.d.ts.map +0 -1
  217. package/tools/records/list-records.js +0 -63
  218. package/tools/records/list-records.js.map +0 -1
  219. package/tools/records/list-records.mjs +0 -56
  220. package/tools/records/list-records.mjs.map +0 -1
  221. package/tools/runs/create-runs.d.mts +0 -51
  222. package/tools/runs/create-runs.d.mts.map +0 -1
  223. package/tools/runs/create-runs.d.ts +0 -51
  224. package/tools/runs/create-runs.d.ts.map +0 -1
  225. package/tools/runs/create-runs.js +0 -67
  226. package/tools/runs/create-runs.js.map +0 -1
  227. package/tools/runs/create-runs.mjs +0 -60
  228. package/tools/runs/create-runs.mjs.map +0 -1
  229. package/tools/runs/get-runs.d.mts +0 -51
  230. package/tools/runs/get-runs.d.mts.map +0 -1
  231. package/tools/runs/get-runs.d.ts +0 -51
  232. package/tools/runs/get-runs.d.ts.map +0 -1
  233. package/tools/runs/get-runs.js +0 -54
  234. package/tools/runs/get-runs.js.map +0 -1
  235. package/tools/runs/get-runs.mjs +0 -47
  236. package/tools/runs/get-runs.mjs.map +0 -1
  237. package/tools/runs/list-runs.d.mts +0 -51
  238. package/tools/runs/list-runs.d.mts.map +0 -1
  239. package/tools/runs/list-runs.d.ts +0 -51
  240. package/tools/runs/list-runs.d.ts.map +0 -1
  241. package/tools/runs/list-runs.js +0 -63
  242. package/tools/runs/list-runs.js.map +0 -1
  243. package/tools/runs/list-runs.mjs +0 -56
  244. package/tools/runs/list-runs.mjs.map +0 -1
  245. package/tools/scores/upsert-scores.d.mts +0 -51
  246. package/tools/scores/upsert-scores.d.mts.map +0 -1
  247. package/tools/scores/upsert-scores.d.ts +0 -51
  248. package/tools/scores/upsert-scores.d.ts.map +0 -1
  249. package/tools/scores/upsert-scores.js +0 -62
  250. package/tools/scores/upsert-scores.js.map +0 -1
  251. package/tools/scores/upsert-scores.mjs +0 -55
  252. package/tools/scores/upsert-scores.mjs.map +0 -1
  253. package/tools/systems/delete-systems.d.mts +0 -51
  254. package/tools/systems/delete-systems.d.mts.map +0 -1
  255. package/tools/systems/delete-systems.d.ts +0 -51
  256. package/tools/systems/delete-systems.d.ts.map +0 -1
  257. package/tools/systems/delete-systems.js +0 -54
  258. package/tools/systems/delete-systems.js.map +0 -1
  259. package/tools/systems/delete-systems.mjs +0 -47
  260. package/tools/systems/delete-systems.mjs.map +0 -1
  261. package/tools/systems/get-systems.d.mts +0 -51
  262. package/tools/systems/get-systems.d.mts.map +0 -1
  263. package/tools/systems/get-systems.d.ts +0 -51
  264. package/tools/systems/get-systems.d.ts.map +0 -1
  265. package/tools/systems/get-systems.js +0 -54
  266. package/tools/systems/get-systems.js.map +0 -1
  267. package/tools/systems/get-systems.mjs +0 -47
  268. package/tools/systems/get-systems.mjs.map +0 -1
  269. package/tools/systems/list-systems.d.mts +0 -51
  270. package/tools/systems/list-systems.d.mts.map +0 -1
  271. package/tools/systems/list-systems.d.ts +0 -51
  272. package/tools/systems/list-systems.d.ts.map +0 -1
  273. package/tools/systems/list-systems.js +0 -63
  274. package/tools/systems/list-systems.js.map +0 -1
  275. package/tools/systems/list-systems.mjs +0 -56
  276. package/tools/systems/list-systems.mjs.map +0 -1
  277. package/tools/systems/update-systems.d.mts +0 -51
  278. package/tools/systems/update-systems.d.mts.map +0 -1
  279. package/tools/systems/update-systems.d.ts +0 -51
  280. package/tools/systems/update-systems.d.ts.map +0 -1
  281. package/tools/systems/update-systems.js +0 -64
  282. package/tools/systems/update-systems.js.map +0 -1
  283. package/tools/systems/update-systems.mjs +0 -57
  284. package/tools/systems/update-systems.mjs.map +0 -1
  285. package/tools/systems/upsert-systems.d.mts +0 -51
  286. package/tools/systems/upsert-systems.d.mts.map +0 -1
  287. package/tools/systems/upsert-systems.d.ts +0 -51
  288. package/tools/systems/upsert-systems.d.ts.map +0 -1
  289. package/tools/systems/upsert-systems.js +0 -65
  290. package/tools/systems/upsert-systems.js.map +0 -1
  291. package/tools/systems/upsert-systems.mjs +0 -58
  292. package/tools/systems/upsert-systems.mjs.map +0 -1
  293. package/tools/systems/versions/get-systems-versions.d.mts +0 -51
  294. package/tools/systems/versions/get-systems-versions.d.mts.map +0 -1
  295. package/tools/systems/versions/get-systems-versions.d.ts +0 -51
  296. package/tools/systems/versions/get-systems-versions.d.ts.map +0 -1
  297. package/tools/systems/versions/get-systems-versions.js +0 -54
  298. package/tools/systems/versions/get-systems-versions.js.map +0 -1
  299. package/tools/systems/versions/get-systems-versions.mjs +0 -47
  300. package/tools/systems/versions/get-systems-versions.mjs.map +0 -1
  301. package/tools/systems/versions/upsert-systems-versions.d.mts +0 -51
  302. package/tools/systems/versions/upsert-systems-versions.d.mts.map +0 -1
  303. package/tools/systems/versions/upsert-systems-versions.d.ts +0 -51
  304. package/tools/systems/versions/upsert-systems-versions.d.ts.map +0 -1
  305. package/tools/systems/versions/upsert-systems-versions.js +0 -61
  306. package/tools/systems/versions/upsert-systems-versions.js.map +0 -1
  307. package/tools/systems/versions/upsert-systems-versions.mjs +0 -54
  308. package/tools/systems/versions/upsert-systems-versions.mjs.map +0 -1
  309. package/tools/testcases/create-testcases.d.mts +0 -51
  310. package/tools/testcases/create-testcases.d.mts.map +0 -1
  311. package/tools/testcases/create-testcases.d.ts +0 -51
  312. package/tools/testcases/create-testcases.d.ts.map +0 -1
  313. package/tools/testcases/create-testcases.js +0 -67
  314. package/tools/testcases/create-testcases.js.map +0 -1
  315. package/tools/testcases/create-testcases.mjs +0 -60
  316. package/tools/testcases/create-testcases.mjs.map +0 -1
  317. package/tools/testcases/delete-testcases.d.mts +0 -51
  318. package/tools/testcases/delete-testcases.d.mts.map +0 -1
  319. package/tools/testcases/delete-testcases.d.ts +0 -51
  320. package/tools/testcases/delete-testcases.d.ts.map +0 -1
  321. package/tools/testcases/delete-testcases.js +0 -56
  322. package/tools/testcases/delete-testcases.js.map +0 -1
  323. package/tools/testcases/delete-testcases.mjs +0 -49
  324. package/tools/testcases/delete-testcases.mjs.map +0 -1
  325. package/tools/testcases/get-testcases.d.mts +0 -51
  326. package/tools/testcases/get-testcases.d.mts.map +0 -1
  327. package/tools/testcases/get-testcases.d.ts +0 -51
  328. package/tools/testcases/get-testcases.d.ts.map +0 -1
  329. package/tools/testcases/get-testcases.js +0 -54
  330. package/tools/testcases/get-testcases.js.map +0 -1
  331. package/tools/testcases/get-testcases.mjs +0 -47
  332. package/tools/testcases/get-testcases.mjs.map +0 -1
  333. package/tools/testcases/list-testcases.d.mts +0 -51
  334. package/tools/testcases/list-testcases.d.mts.map +0 -1
  335. package/tools/testcases/list-testcases.d.ts +0 -51
  336. package/tools/testcases/list-testcases.d.ts.map +0 -1
  337. package/tools/testcases/list-testcases.js +0 -63
  338. package/tools/testcases/list-testcases.js.map +0 -1
  339. package/tools/testcases/list-testcases.mjs +0 -56
  340. package/tools/testcases/list-testcases.mjs.map +0 -1
  341. package/tools/testcases/update-testcases.d.mts +0 -51
  342. package/tools/testcases/update-testcases.d.mts.map +0 -1
  343. package/tools/testcases/update-testcases.d.ts +0 -51
  344. package/tools/testcases/update-testcases.d.ts.map +0 -1
  345. package/tools/testcases/update-testcases.js +0 -59
  346. package/tools/testcases/update-testcases.js.map +0 -1
  347. package/tools/testcases/update-testcases.mjs +0 -52
  348. package/tools/testcases/update-testcases.mjs.map +0 -1
  349. package/tools/testsets/create-testsets.d.mts +0 -51
  350. package/tools/testsets/create-testsets.d.mts.map +0 -1
  351. package/tools/testsets/create-testsets.d.ts +0 -51
  352. package/tools/testsets/create-testsets.d.ts.map +0 -1
  353. package/tools/testsets/create-testsets.js +0 -93
  354. package/tools/testsets/create-testsets.js.map +0 -1
  355. package/tools/testsets/create-testsets.mjs +0 -86
  356. package/tools/testsets/create-testsets.mjs.map +0 -1
  357. package/tools/testsets/delete-testsets.d.mts +0 -51
  358. package/tools/testsets/delete-testsets.d.mts.map +0 -1
  359. package/tools/testsets/delete-testsets.d.ts +0 -51
  360. package/tools/testsets/delete-testsets.d.ts.map +0 -1
  361. package/tools/testsets/delete-testsets.js +0 -54
  362. package/tools/testsets/delete-testsets.js.map +0 -1
  363. package/tools/testsets/delete-testsets.mjs +0 -47
  364. package/tools/testsets/delete-testsets.mjs.map +0 -1
  365. package/tools/testsets/get-testsets.d.mts +0 -51
  366. package/tools/testsets/get-testsets.d.mts.map +0 -1
  367. package/tools/testsets/get-testsets.d.ts +0 -51
  368. package/tools/testsets/get-testsets.d.ts.map +0 -1
  369. package/tools/testsets/get-testsets.js +0 -54
  370. package/tools/testsets/get-testsets.js.map +0 -1
  371. package/tools/testsets/get-testsets.mjs +0 -47
  372. package/tools/testsets/get-testsets.mjs.map +0 -1
  373. package/tools/testsets/list-testsets.d.mts +0 -51
  374. package/tools/testsets/list-testsets.d.mts.map +0 -1
  375. package/tools/testsets/list-testsets.d.ts +0 -51
  376. package/tools/testsets/list-testsets.d.ts.map +0 -1
  377. package/tools/testsets/list-testsets.js +0 -63
  378. package/tools/testsets/list-testsets.js.map +0 -1
  379. package/tools/testsets/list-testsets.mjs +0 -56
  380. package/tools/testsets/list-testsets.mjs.map +0 -1
  381. package/tools/testsets/update-testsets.d.mts +0 -51
  382. package/tools/testsets/update-testsets.d.mts.map +0 -1
  383. package/tools/testsets/update-testsets.d.ts +0 -51
  384. package/tools/testsets/update-testsets.d.ts.map +0 -1
  385. package/tools/testsets/update-testsets.js +0 -93
  386. package/tools/testsets/update-testsets.js.map +0 -1
  387. package/tools/testsets/update-testsets.mjs +0 -86
  388. package/tools/testsets/update-testsets.mjs.map +0 -1
  389. package/tools/types.d.mts.map +0 -1
  390. package/tools/types.d.ts.map +0 -1
  391. package/tools/types.js.map +0 -1
  392. package/tools/types.mjs.map +0 -1
  393. package/tools.d.mts +0 -2
  394. package/tools.d.mts.map +0 -1
  395. package/tools.d.ts +0 -2
  396. package/tools.d.ts.map +0 -1
  397. package/tools.js +0 -18
  398. package/tools.js.map +0 -1
  399. package/tools.mjs +0 -2
  400. package/tools.mjs.map +0 -1
  401. /package/{tools/types.js → types.js} +0 -0
  402. /package/{tools/types.mjs → types.mjs} +0 -0
@@ -1,71 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { isJqError, maybeFilter } from 'scorecard-ai-mcp/filtering';
4
- import { Metadata, asErrorResult, asTextContentResult } from 'scorecard-ai-mcp/tools/types';
5
-
6
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
- import Scorecard from 'scorecard-ai';
8
-
9
- export const metadata: Metadata = {
10
- resource: 'records',
11
- operation: 'write',
12
- tags: [],
13
- httpMethod: 'post',
14
- httpPath: '/runs/{runId}/records',
15
- operationId: 'createRecord',
16
- };
17
-
18
- export const tool: Tool = {
19
- name: 'create_records',
20
- description:
21
- "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 Record in a Run.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/record',\n $defs: {\n record: {\n type: 'object',\n description: 'A record of a system execution in the Scorecard system.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the Record.'\n },\n expected: {\n type: 'object',\n description: 'The expected outputs for the Testcase.',\n additionalProperties: true\n },\n inputs: {\n type: 'object',\n description: 'The actual inputs sent to the system, which should match the system\\'s input schema.',\n additionalProperties: true\n },\n outputs: {\n type: 'object',\n description: 'The actual outputs from the system.',\n additionalProperties: true\n },\n runId: {\n type: 'string',\n description: 'The ID of the Run containing this Record.'\n },\n testcaseId: {\n type: 'string',\n description: 'The ID of the Testcase.'\n }\n },\n required: [ 'id',\n 'expected',\n 'inputs',\n 'outputs',\n 'runId'\n ]\n }\n }\n}\n```",
22
- inputSchema: {
23
- type: 'object',
24
- properties: {
25
- runId: {
26
- type: 'string',
27
- },
28
- expected: {
29
- type: 'object',
30
- description: 'The expected outputs for the Testcase.',
31
- additionalProperties: true,
32
- },
33
- inputs: {
34
- type: 'object',
35
- description: "The actual inputs sent to the system, which should match the system's input schema.",
36
- additionalProperties: true,
37
- },
38
- outputs: {
39
- type: 'object',
40
- description: 'The actual outputs from the system.',
41
- additionalProperties: true,
42
- },
43
- testcaseId: {
44
- type: 'string',
45
- description: 'The ID of the Testcase.',
46
- },
47
- jq_filter: {
48
- type: 'string',
49
- title: 'jq Filter',
50
- description:
51
- '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/).',
52
- },
53
- },
54
- required: ['runId', 'expected', 'inputs', 'outputs'],
55
- },
56
- annotations: {},
57
- };
58
-
59
- export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
60
- const { runId, jq_filter, ...body } = args as any;
61
- try {
62
- return asTextContentResult(await maybeFilter(jq_filter, await client.records.create(runId, body)));
63
- } catch (error) {
64
- if (error instanceof Scorecard.APIError || isJqError(error)) {
65
- return asErrorResult(error.message);
66
- }
67
- throw error;
68
- }
69
- };
70
-
71
- export default { metadata, tool, handler };
@@ -1,54 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { isJqError, maybeFilter } from 'scorecard-ai-mcp/filtering';
4
- import { Metadata, asErrorResult, asTextContentResult } from 'scorecard-ai-mcp/tools/types';
5
-
6
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
- import Scorecard from 'scorecard-ai';
8
-
9
- export const metadata: Metadata = {
10
- resource: 'records',
11
- operation: 'write',
12
- tags: [],
13
- httpMethod: 'delete',
14
- httpPath: '/records/{recordId}',
15
- operationId: 'deleteRecord',
16
- };
17
-
18
- export const tool: Tool = {
19
- name: 'delete_records',
20
- description:
21
- "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 a specific Record by ID.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/record_delete_response',\n $defs: {\n record_delete_response: {\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 }\n}\n```",
22
- inputSchema: {
23
- type: 'object',
24
- properties: {
25
- recordId: {
26
- type: 'string',
27
- },
28
- jq_filter: {
29
- type: 'string',
30
- title: 'jq Filter',
31
- description:
32
- '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
- },
34
- },
35
- required: ['recordId'],
36
- },
37
- annotations: {
38
- idempotentHint: true,
39
- },
40
- };
41
-
42
- export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
43
- const { recordId, jq_filter, ...body } = args as any;
44
- try {
45
- return asTextContentResult(await maybeFilter(jq_filter, await client.records.delete(recordId)));
46
- } catch (error) {
47
- if (error instanceof Scorecard.APIError || isJqError(error)) {
48
- return asErrorResult(error.message);
49
- }
50
- throw error;
51
- }
52
- };
53
-
54
- export default { metadata, tool, handler };
@@ -1,65 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { isJqError, maybeFilter } from 'scorecard-ai-mcp/filtering';
4
- import { Metadata, asErrorResult, asTextContentResult } from 'scorecard-ai-mcp/tools/types';
5
-
6
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
- import Scorecard from 'scorecard-ai';
8
-
9
- export const metadata: Metadata = {
10
- resource: 'records',
11
- operation: 'read',
12
- tags: [],
13
- httpMethod: 'get',
14
- httpPath: '/runs/{runId}/records',
15
- operationId: 'listRecords',
16
- };
17
-
18
- export const tool: Tool = {
19
- name: 'list_records',
20
- description:
21
- "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 Records for a Run, including all scores for each record.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/record_list_response'\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 record_list_response: {\n allOf: [ {\n $ref: '#/$defs/record'\n }\n ],\n description: 'A record with all its associated scores.'\n },\n record: {\n type: 'object',\n description: 'A record of a system execution in the Scorecard system.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the Record.'\n },\n expected: {\n type: 'object',\n description: 'The expected outputs for the Testcase.',\n additionalProperties: true\n },\n inputs: {\n type: 'object',\n description: 'The actual inputs sent to the system, which should match the system\\'s input schema.',\n additionalProperties: true\n },\n outputs: {\n type: 'object',\n description: 'The actual outputs from the system.',\n additionalProperties: true\n },\n runId: {\n type: 'string',\n description: 'The ID of the Run containing this Record.'\n },\n testcaseId: {\n type: 'string',\n description: 'The ID of the Testcase.'\n }\n },\n required: [ 'id',\n 'expected',\n 'inputs',\n 'outputs',\n 'runId'\n ]\n }\n }\n}\n```",
22
- inputSchema: {
23
- type: 'object',
24
- properties: {
25
- runId: {
26
- type: 'string',
27
- },
28
- cursor: {
29
- type: 'string',
30
- description:
31
- 'Cursor for pagination. Pass the `nextCursor` from the previous response to get the next page of results.',
32
- },
33
- limit: {
34
- type: 'integer',
35
- description:
36
- 'Maximum number of items to return (1-100). Use with `cursor` for pagination through large sets.',
37
- },
38
- jq_filter: {
39
- type: 'string',
40
- title: 'jq Filter',
41
- description:
42
- '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
- },
44
- },
45
- required: ['runId'],
46
- },
47
- annotations: {
48
- readOnlyHint: true,
49
- },
50
- };
51
-
52
- export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
53
- const { runId, jq_filter, ...body } = args as any;
54
- const response = await client.records.list(runId, body).asResponse();
55
- try {
56
- return asTextContentResult(await maybeFilter(jq_filter, await response.json()));
57
- } catch (error) {
58
- if (error instanceof Scorecard.APIError || isJqError(error)) {
59
- return asErrorResult(error.message);
60
- }
61
- throw error;
62
- }
63
- };
64
-
65
- export default { metadata, tool, handler };
@@ -1,67 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { isJqError, maybeFilter } from 'scorecard-ai-mcp/filtering';
4
- import { Metadata, asErrorResult, asTextContentResult } from 'scorecard-ai-mcp/tools/types';
5
-
6
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
- import Scorecard from 'scorecard-ai';
8
-
9
- export const metadata: Metadata = {
10
- resource: 'runs',
11
- operation: 'write',
12
- tags: [],
13
- httpMethod: 'post',
14
- httpPath: '/projects/{projectId}/runs',
15
- operationId: 'createRun',
16
- };
17
-
18
- export const tool: Tool = {
19
- name: 'create_runs',
20
- description:
21
- "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 Run.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/run',\n $defs: {\n run: {\n type: 'object',\n description: 'A Run in the Scorecard system.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the Run.'\n },\n metricIds: {\n type: 'array',\n description: 'The IDs of the metrics this Run is using.',\n items: {\n type: 'string'\n }\n },\n metricVersionIds: {\n type: 'array',\n description: 'The IDs of the metric versions this Run is using.',\n items: {\n type: 'string'\n }\n },\n numExpectedRecords: {\n type: 'number',\n description: 'The number of expected records in the Run. Determined by the number of testcases in the Run\\'s Testset at the time of Run creation.'\n },\n numRecords: {\n type: 'number',\n description: 'The number of records in the Run.'\n },\n numScores: {\n type: 'number',\n description: 'The number of completed scores in the Run so far.'\n },\n status: {\n type: 'string',\n description: 'The status of the Run.',\n enum: [ 'pending',\n 'awaiting_execution',\n 'running_execution',\n 'awaiting_scoring',\n 'running_scoring',\n 'awaiting_human_scoring',\n 'completed'\n ]\n },\n systemId: {\n type: 'string',\n description: 'The ID of the system this Run is using.'\n },\n systemVersionId: {\n type: 'string',\n description: 'The ID of the system version this Run is using.'\n },\n testsetId: {\n type: 'string',\n description: 'The ID of the Testset this Run is testing.'\n }\n },\n required: [ 'id',\n 'metricIds',\n 'metricVersionIds',\n 'numExpectedRecords',\n 'numRecords',\n 'numScores',\n 'status',\n 'systemId',\n 'systemVersionId',\n 'testsetId'\n ]\n }\n }\n}\n```",
22
- inputSchema: {
23
- type: 'object',
24
- properties: {
25
- projectId: {
26
- type: 'string',
27
- },
28
- metricIds: {
29
- type: 'array',
30
- description: 'The IDs of the metrics this Run is using.',
31
- items: {
32
- type: 'string',
33
- },
34
- },
35
- systemVersionId: {
36
- type: 'string',
37
- description: 'The ID of the system version this Run is using.',
38
- },
39
- testsetId: {
40
- type: 'string',
41
- description: 'The ID of the Testset this Run is testing.',
42
- },
43
- jq_filter: {
44
- type: 'string',
45
- title: 'jq Filter',
46
- description:
47
- '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/).',
48
- },
49
- },
50
- required: ['projectId', 'metricIds'],
51
- },
52
- annotations: {},
53
- };
54
-
55
- export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
56
- const { projectId, jq_filter, ...body } = args as any;
57
- try {
58
- return asTextContentResult(await maybeFilter(jq_filter, await client.runs.create(projectId, body)));
59
- } catch (error) {
60
- if (error instanceof Scorecard.APIError || isJqError(error)) {
61
- return asErrorResult(error.message);
62
- }
63
- throw error;
64
- }
65
- };
66
-
67
- export default { metadata, tool, handler };
@@ -1,54 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { isJqError, maybeFilter } from 'scorecard-ai-mcp/filtering';
4
- import { Metadata, asErrorResult, asTextContentResult } from 'scorecard-ai-mcp/tools/types';
5
-
6
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
- import Scorecard from 'scorecard-ai';
8
-
9
- export const metadata: Metadata = {
10
- resource: 'runs',
11
- operation: 'read',
12
- tags: [],
13
- httpMethod: 'get',
14
- httpPath: '/runs/{runId}',
15
- operationId: 'getRun',
16
- };
17
-
18
- export const tool: Tool = {
19
- name: 'get_runs',
20
- description:
21
- "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 Run by ID.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/run',\n $defs: {\n run: {\n type: 'object',\n description: 'A Run in the Scorecard system.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the Run.'\n },\n metricIds: {\n type: 'array',\n description: 'The IDs of the metrics this Run is using.',\n items: {\n type: 'string'\n }\n },\n metricVersionIds: {\n type: 'array',\n description: 'The IDs of the metric versions this Run is using.',\n items: {\n type: 'string'\n }\n },\n numExpectedRecords: {\n type: 'number',\n description: 'The number of expected records in the Run. Determined by the number of testcases in the Run\\'s Testset at the time of Run creation.'\n },\n numRecords: {\n type: 'number',\n description: 'The number of records in the Run.'\n },\n numScores: {\n type: 'number',\n description: 'The number of completed scores in the Run so far.'\n },\n status: {\n type: 'string',\n description: 'The status of the Run.',\n enum: [ 'pending',\n 'awaiting_execution',\n 'running_execution',\n 'awaiting_scoring',\n 'running_scoring',\n 'awaiting_human_scoring',\n 'completed'\n ]\n },\n systemId: {\n type: 'string',\n description: 'The ID of the system this Run is using.'\n },\n systemVersionId: {\n type: 'string',\n description: 'The ID of the system version this Run is using.'\n },\n testsetId: {\n type: 'string',\n description: 'The ID of the Testset this Run is testing.'\n }\n },\n required: [ 'id',\n 'metricIds',\n 'metricVersionIds',\n 'numExpectedRecords',\n 'numRecords',\n 'numScores',\n 'status',\n 'systemId',\n 'systemVersionId',\n 'testsetId'\n ]\n }\n }\n}\n```",
22
- inputSchema: {
23
- type: 'object',
24
- properties: {
25
- runId: {
26
- type: 'string',
27
- },
28
- jq_filter: {
29
- type: 'string',
30
- title: 'jq Filter',
31
- description:
32
- '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
- },
34
- },
35
- required: ['runId'],
36
- },
37
- annotations: {
38
- readOnlyHint: true,
39
- },
40
- };
41
-
42
- export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
43
- const { runId, jq_filter, ...body } = args as any;
44
- try {
45
- return asTextContentResult(await maybeFilter(jq_filter, await client.runs.get(runId)));
46
- } catch (error) {
47
- if (error instanceof Scorecard.APIError || isJqError(error)) {
48
- return asErrorResult(error.message);
49
- }
50
- throw error;
51
- }
52
- };
53
-
54
- export default { metadata, tool, handler };
@@ -1,65 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { isJqError, maybeFilter } from 'scorecard-ai-mcp/filtering';
4
- import { Metadata, asErrorResult, asTextContentResult } from 'scorecard-ai-mcp/tools/types';
5
-
6
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
- import Scorecard from 'scorecard-ai';
8
-
9
- export const metadata: Metadata = {
10
- resource: 'runs',
11
- operation: 'read',
12
- tags: [],
13
- httpMethod: 'get',
14
- httpPath: '/projects/{projectId}/runs',
15
- operationId: 'listRuns',
16
- };
17
-
18
- export const tool: Tool = {
19
- name: 'list_runs',
20
- description:
21
- "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 all Runs for a Project. Runs are ordered by creation date, most recent first.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/run'\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 run: {\n type: 'object',\n description: 'A Run in the Scorecard system.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the Run.'\n },\n metricIds: {\n type: 'array',\n description: 'The IDs of the metrics this Run is using.',\n items: {\n type: 'string'\n }\n },\n metricVersionIds: {\n type: 'array',\n description: 'The IDs of the metric versions this Run is using.',\n items: {\n type: 'string'\n }\n },\n numExpectedRecords: {\n type: 'number',\n description: 'The number of expected records in the Run. Determined by the number of testcases in the Run\\'s Testset at the time of Run creation.'\n },\n numRecords: {\n type: 'number',\n description: 'The number of records in the Run.'\n },\n numScores: {\n type: 'number',\n description: 'The number of completed scores in the Run so far.'\n },\n status: {\n type: 'string',\n description: 'The status of the Run.',\n enum: [ 'pending',\n 'awaiting_execution',\n 'running_execution',\n 'awaiting_scoring',\n 'running_scoring',\n 'awaiting_human_scoring',\n 'completed'\n ]\n },\n systemId: {\n type: 'string',\n description: 'The ID of the system this Run is using.'\n },\n systemVersionId: {\n type: 'string',\n description: 'The ID of the system version this Run is using.'\n },\n testsetId: {\n type: 'string',\n description: 'The ID of the Testset this Run is testing.'\n }\n },\n required: [ 'id',\n 'metricIds',\n 'metricVersionIds',\n 'numExpectedRecords',\n 'numRecords',\n 'numScores',\n 'status',\n 'systemId',\n 'systemVersionId',\n 'testsetId'\n ]\n }\n }\n}\n```",
22
- inputSchema: {
23
- type: 'object',
24
- properties: {
25
- projectId: {
26
- type: 'string',
27
- },
28
- cursor: {
29
- type: 'string',
30
- description:
31
- 'Cursor for pagination. Pass the `nextCursor` from the previous response to get the next page of results.',
32
- },
33
- limit: {
34
- type: 'integer',
35
- description:
36
- 'Maximum number of items to return (1-100). Use with `cursor` for pagination through large sets.',
37
- },
38
- jq_filter: {
39
- type: 'string',
40
- title: 'jq Filter',
41
- description:
42
- '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
- },
44
- },
45
- required: ['projectId'],
46
- },
47
- annotations: {
48
- readOnlyHint: true,
49
- },
50
- };
51
-
52
- export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
53
- const { projectId, jq_filter, ...body } = args as any;
54
- const response = await client.runs.list(projectId, body).asResponse();
55
- try {
56
- return asTextContentResult(await maybeFilter(jq_filter, await response.json()));
57
- } catch (error) {
58
- if (error instanceof Scorecard.APIError || isJqError(error)) {
59
- return asErrorResult(error.message);
60
- }
61
- throw error;
62
- }
63
- };
64
-
65
- export default { metadata, tool, handler };
@@ -1,65 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { isJqError, maybeFilter } from 'scorecard-ai-mcp/filtering';
4
- import { Metadata, asErrorResult, asTextContentResult } from 'scorecard-ai-mcp/tools/types';
5
-
6
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
- import Scorecard from 'scorecard-ai';
8
-
9
- export const metadata: Metadata = {
10
- resource: 'scores',
11
- operation: 'write',
12
- tags: [],
13
- httpMethod: 'put',
14
- httpPath: '/records/{recordId}/scores/{metricConfigId}',
15
- operationId: 'upsertScore',
16
- };
17
-
18
- export const tool: Tool = {
19
- name: 'upsert_scores',
20
- description:
21
- "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 or update a Score for a given Record and MetricConfig. If a Score with the specified Record ID and MetricConfig ID already exists, it will be updated. Otherwise, a new Score will be created. The score provided should conform to the schema defined by the MetricConfig; otherwise, validation errors will be reported.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/score',\n $defs: {\n score: {\n type: 'object',\n description: 'A Score represents the evaluation of a Record against a specific MetricConfig. The actual `score` is stored as flexible JSON. While any JSON is accepted, it is expected to conform to the output schema defined by the MetricConfig. Any discrepancies will be noted in the `validationErrors` field, but the Score will still be stored.',\n properties: {\n metricConfigId: {\n type: 'string',\n description: 'The ID of the MetricConfig this Score is for.'\n },\n recordId: {\n type: 'string',\n description: 'The ID of the Record this Score is for.'\n },\n score: {\n type: 'object',\n description: 'The score of the Record, as arbitrary JSON. This data should ideally conform to the output schema defined by the associated MetricConfig. If it doesn\\'t, validation errors will be captured in the `validationErrors` field.',\n additionalProperties: true\n },\n validationErrors: {\n type: 'array',\n description: 'Validation errors found in the Score data. If present, the Score doesn\\'t fully conform to its MetricConfig\\'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: [ 'metricConfigId',\n 'recordId',\n 'score'\n ]\n }\n }\n}\n```",
22
- inputSchema: {
23
- type: 'object',
24
- properties: {
25
- recordId: {
26
- type: 'string',
27
- },
28
- metricConfigId: {
29
- type: 'string',
30
- },
31
- score: {
32
- type: 'object',
33
- description:
34
- "The score of the Record, as arbitrary JSON. This data should ideally conform to the output schema defined by the associated MetricConfig. If it doesn't, validation errors will be captured in the `validationErrors` field.",
35
- additionalProperties: true,
36
- },
37
- jq_filter: {
38
- type: 'string',
39
- title: 'jq Filter',
40
- description:
41
- '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/).',
42
- },
43
- },
44
- required: ['recordId', 'metricConfigId', 'score'],
45
- },
46
- annotations: {
47
- idempotentHint: true,
48
- },
49
- };
50
-
51
- export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
52
- const { metricConfigId, jq_filter, ...body } = args as any;
53
- try {
54
- return asTextContentResult(
55
- await maybeFilter(jq_filter, await client.scores.upsert(metricConfigId, body)),
56
- );
57
- } catch (error) {
58
- if (error instanceof Scorecard.APIError || isJqError(error)) {
59
- return asErrorResult(error.message);
60
- }
61
- throw error;
62
- }
63
- };
64
-
65
- export default { metadata, tool, handler };
@@ -1,54 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { isJqError, maybeFilter } from 'scorecard-ai-mcp/filtering';
4
- import { Metadata, asErrorResult, asTextContentResult } from 'scorecard-ai-mcp/tools/types';
5
-
6
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
- import Scorecard from 'scorecard-ai';
8
-
9
- export const metadata: Metadata = {
10
- resource: 'systems',
11
- operation: 'write',
12
- tags: [],
13
- httpMethod: 'delete',
14
- httpPath: '/systems/{systemId}',
15
- operationId: 'deleteSystem',
16
- };
17
-
18
- export const tool: Tool = {
19
- name: 'delete_systems',
20
- description:
21
- "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 a system definition by ID. This will not delete associated system versions.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/system_delete_response',\n $defs: {\n system_delete_response: {\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 }\n}\n```",
22
- inputSchema: {
23
- type: 'object',
24
- properties: {
25
- systemId: {
26
- type: 'string',
27
- },
28
- jq_filter: {
29
- type: 'string',
30
- title: 'jq Filter',
31
- description:
32
- '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
- },
34
- },
35
- required: ['systemId'],
36
- },
37
- annotations: {
38
- idempotentHint: true,
39
- },
40
- };
41
-
42
- export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
43
- const { systemId, jq_filter, ...body } = args as any;
44
- try {
45
- return asTextContentResult(await maybeFilter(jq_filter, await client.systems.delete(systemId)));
46
- } catch (error) {
47
- if (error instanceof Scorecard.APIError || isJqError(error)) {
48
- return asErrorResult(error.message);
49
- }
50
- throw error;
51
- }
52
- };
53
-
54
- export default { metadata, tool, handler };
@@ -1,54 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { isJqError, maybeFilter } from 'scorecard-ai-mcp/filtering';
4
- import { Metadata, asErrorResult, asTextContentResult } from 'scorecard-ai-mcp/tools/types';
5
-
6
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
- import Scorecard from 'scorecard-ai';
8
-
9
- export const metadata: Metadata = {
10
- resource: 'systems',
11
- operation: 'read',
12
- tags: [],
13
- httpMethod: 'get',
14
- httpPath: '/systems/{systemId}',
15
- operationId: 'getSystem',
16
- };
17
-
18
- export const tool: Tool = {
19
- name: 'get_systems',
20
- description:
21
- "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 by ID.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/system',\n $defs: {\n system: {\n type: 'object',\n description: 'A System Under Test (SUT).\\n\\nSystems are templates - to run evaluations, pair them with a SystemVersion that provides specific\\nparameter values.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the system.'\n },\n description: {\n type: 'string',\n description: 'The description of the system.'\n },\n name: {\n type: 'string',\n description: 'The name of the system. Unique within the project.'\n },\n productionVersion: {\n $ref: '#/$defs/system_version'\n },\n versions: {\n type: 'array',\n description: 'The versions of the system.',\n items: {\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 name: {\n type: 'string',\n description: 'The name of the system version.'\n }\n },\n required: [ 'id',\n 'name'\n ]\n }\n }\n },\n required: [ 'id',\n 'description',\n 'name',\n 'productionVersion',\n 'versions'\n ]\n },\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```",
22
- inputSchema: {
23
- type: 'object',
24
- properties: {
25
- systemId: {
26
- type: 'string',
27
- },
28
- jq_filter: {
29
- type: 'string',
30
- title: 'jq Filter',
31
- description:
32
- '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
- },
34
- },
35
- required: ['systemId'],
36
- },
37
- annotations: {
38
- readOnlyHint: true,
39
- },
40
- };
41
-
42
- export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
43
- const { systemId, jq_filter, ...body } = args as any;
44
- try {
45
- return asTextContentResult(await maybeFilter(jq_filter, await client.systems.get(systemId)));
46
- } catch (error) {
47
- if (error instanceof Scorecard.APIError || isJqError(error)) {
48
- return asErrorResult(error.message);
49
- }
50
- throw error;
51
- }
52
- };
53
-
54
- export default { metadata, tool, handler };
@@ -1,65 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { isJqError, maybeFilter } from 'scorecard-ai-mcp/filtering';
4
- import { Metadata, asErrorResult, asTextContentResult } from 'scorecard-ai-mcp/tools/types';
5
-
6
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
- import Scorecard from 'scorecard-ai';
8
-
9
- export const metadata: Metadata = {
10
- resource: 'systems',
11
- operation: 'read',
12
- tags: [],
13
- httpMethod: 'get',
14
- httpPath: '/projects/{projectId}/systems',
15
- operationId: 'listSystems',
16
- };
17
-
18
- export const tool: Tool = {
19
- name: 'list_systems',
20
- description:
21
- "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 all systems. Systems are ordered by creation date.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/system'\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 system: {\n type: 'object',\n description: 'A System Under Test (SUT).\\n\\nSystems are templates - to run evaluations, pair them with a SystemVersion that provides specific\\nparameter values.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the system.'\n },\n description: {\n type: 'string',\n description: 'The description of the system.'\n },\n name: {\n type: 'string',\n description: 'The name of the system. Unique within the project.'\n },\n productionVersion: {\n $ref: '#/$defs/system_version'\n },\n versions: {\n type: 'array',\n description: 'The versions of the system.',\n items: {\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 name: {\n type: 'string',\n description: 'The name of the system version.'\n }\n },\n required: [ 'id',\n 'name'\n ]\n }\n }\n },\n required: [ 'id',\n 'description',\n 'name',\n 'productionVersion',\n 'versions'\n ]\n },\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```",
22
- inputSchema: {
23
- type: 'object',
24
- properties: {
25
- projectId: {
26
- type: 'string',
27
- },
28
- cursor: {
29
- type: 'string',
30
- description:
31
- 'Cursor for pagination. Pass the `nextCursor` from the previous response to get the next page of results.',
32
- },
33
- limit: {
34
- type: 'integer',
35
- description:
36
- 'Maximum number of items to return (1-100). Use with `cursor` for pagination through large sets.',
37
- },
38
- jq_filter: {
39
- type: 'string',
40
- title: 'jq Filter',
41
- description:
42
- '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
- },
44
- },
45
- required: ['projectId'],
46
- },
47
- annotations: {
48
- readOnlyHint: true,
49
- },
50
- };
51
-
52
- export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
53
- const { projectId, jq_filter, ...body } = args as any;
54
- const response = await client.systems.list(projectId, body).asResponse();
55
- try {
56
- return asTextContentResult(await maybeFilter(jq_filter, await response.json()));
57
- } catch (error) {
58
- if (error instanceof Scorecard.APIError || isJqError(error)) {
59
- return asErrorResult(error.message);
60
- }
61
- throw error;
62
- }
63
- };
64
-
65
- export default { metadata, tool, handler };