scorecard-ai-mcp 1.0.0-alpha.4

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 (274) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +228 -0
  3. package/compat.d.mts +53 -0
  4. package/compat.d.mts.map +1 -0
  5. package/compat.d.ts +53 -0
  6. package/compat.d.ts.map +1 -0
  7. package/compat.js +351 -0
  8. package/compat.js.map +1 -0
  9. package/compat.mjs +338 -0
  10. package/compat.mjs.map +1 -0
  11. package/compat.test.d.mts +2 -0
  12. package/compat.test.d.mts.map +1 -0
  13. package/compat.test.d.ts +2 -0
  14. package/compat.test.d.ts.map +1 -0
  15. package/compat.test.js +950 -0
  16. package/compat.test.js.map +1 -0
  17. package/compat.test.mjs +948 -0
  18. package/compat.test.mjs.map +1 -0
  19. package/index.d.mts +2 -0
  20. package/index.d.mts.map +1 -0
  21. package/index.d.ts +2 -0
  22. package/index.d.ts.map +1 -0
  23. package/index.js +89 -0
  24. package/index.js.map +1 -0
  25. package/index.mjs +86 -0
  26. package/index.mjs.map +1 -0
  27. package/options.d.mts +9 -0
  28. package/options.d.mts.map +1 -0
  29. package/options.d.ts +9 -0
  30. package/options.d.ts.map +1 -0
  31. package/options.js +321 -0
  32. package/options.js.map +1 -0
  33. package/options.mjs +314 -0
  34. package/options.mjs.map +1 -0
  35. package/options.test.d.mts +2 -0
  36. package/options.test.d.mts.map +1 -0
  37. package/options.test.d.ts +2 -0
  38. package/options.test.d.ts.map +1 -0
  39. package/options.test.js +154 -0
  40. package/options.test.js.map +1 -0
  41. package/options.test.mjs +152 -0
  42. package/options.test.mjs.map +1 -0
  43. package/package.json +129 -0
  44. package/server.d.mts +33 -0
  45. package/server.d.mts.map +1 -0
  46. package/server.d.ts +33 -0
  47. package/server.d.ts.map +1 -0
  48. package/server.js +85 -0
  49. package/server.js.map +1 -0
  50. package/server.mjs +74 -0
  51. package/server.mjs.map +1 -0
  52. package/src/compat.test.ts +1068 -0
  53. package/src/compat.ts +437 -0
  54. package/src/index.ts +106 -0
  55. package/src/options.test.ts +193 -0
  56. package/src/options.ts +339 -0
  57. package/src/server.ts +98 -0
  58. package/src/tools/index.ts +129 -0
  59. package/src/tools/projects/list-projects.ts +39 -0
  60. package/src/tools/records/create-records.ts +47 -0
  61. package/src/tools/runs/create-runs.ts +46 -0
  62. package/src/tools/runs/update-runs.ts +44 -0
  63. package/src/tools/system-configs/create-system-configs.ts +59 -0
  64. package/src/tools/system-configs/get-system-configs.ts +34 -0
  65. package/src/tools/system-configs/list-system-configs.ts +42 -0
  66. package/src/tools/systems/create-systems.ts +52 -0
  67. package/src/tools/systems/delete-systems.ts +31 -0
  68. package/src/tools/systems/get-systems.ts +31 -0
  69. package/src/tools/systems/list-systems.ts +41 -0
  70. package/src/tools/systems/update-systems.ts +52 -0
  71. package/src/tools/testcases/create-testcases.ts +47 -0
  72. package/src/tools/testcases/delete-testcases.ts +35 -0
  73. package/src/tools/testcases/get-testcases.ts +31 -0
  74. package/src/tools/testcases/list-testcases.ts +41 -0
  75. package/src/tools/testcases/update-testcases.ts +35 -0
  76. package/src/tools/testsets/create-testsets.ts +73 -0
  77. package/src/tools/testsets/delete-testsets.ts +31 -0
  78. package/src/tools/testsets/get-testsets.ts +31 -0
  79. package/src/tools/testsets/list-testsets.ts +41 -0
  80. package/src/tools/testsets/update-testsets.ts +73 -0
  81. package/src/tools.ts +1 -0
  82. package/src/tsconfig.json +11 -0
  83. package/tools/index.d.mts +21 -0
  84. package/tools/index.d.mts.map +1 -0
  85. package/tools/index.d.ts +21 -0
  86. package/tools/index.d.ts.map +1 -0
  87. package/tools/index.js +99 -0
  88. package/tools/index.js.map +1 -0
  89. package/tools/index.mjs +92 -0
  90. package/tools/index.mjs.map +1 -0
  91. package/tools/projects/list-projects.d.mts +24 -0
  92. package/tools/projects/list-projects.d.mts.map +1 -0
  93. package/tools/projects/list-projects.d.ts +24 -0
  94. package/tools/projects/list-projects.d.ts.map +1 -0
  95. package/tools/projects/list-projects.js +33 -0
  96. package/tools/projects/list-projects.js.map +1 -0
  97. package/tools/projects/list-projects.mjs +29 -0
  98. package/tools/projects/list-projects.mjs.map +1 -0
  99. package/tools/records/create-records.d.mts +24 -0
  100. package/tools/records/create-records.d.mts.map +1 -0
  101. package/tools/records/create-records.d.ts +24 -0
  102. package/tools/records/create-records.d.ts.map +1 -0
  103. package/tools/records/create-records.js +44 -0
  104. package/tools/records/create-records.js.map +1 -0
  105. package/tools/records/create-records.mjs +40 -0
  106. package/tools/records/create-records.mjs.map +1 -0
  107. package/tools/runs/create-runs.d.mts +24 -0
  108. package/tools/runs/create-runs.d.mts.map +1 -0
  109. package/tools/runs/create-runs.d.ts +24 -0
  110. package/tools/runs/create-runs.d.ts.map +1 -0
  111. package/tools/runs/create-runs.js +43 -0
  112. package/tools/runs/create-runs.js.map +1 -0
  113. package/tools/runs/create-runs.mjs +39 -0
  114. package/tools/runs/create-runs.mjs.map +1 -0
  115. package/tools/runs/update-runs.d.mts +24 -0
  116. package/tools/runs/update-runs.d.mts.map +1 -0
  117. package/tools/runs/update-runs.d.ts +24 -0
  118. package/tools/runs/update-runs.d.ts.map +1 -0
  119. package/tools/runs/update-runs.js +41 -0
  120. package/tools/runs/update-runs.js.map +1 -0
  121. package/tools/runs/update-runs.mjs +37 -0
  122. package/tools/runs/update-runs.mjs.map +1 -0
  123. package/tools/system-configs/create-system-configs.d.mts +24 -0
  124. package/tools/system-configs/create-system-configs.d.mts.map +1 -0
  125. package/tools/system-configs/create-system-configs.d.ts +24 -0
  126. package/tools/system-configs/create-system-configs.d.ts.map +1 -0
  127. package/tools/system-configs/create-system-configs.js +54 -0
  128. package/tools/system-configs/create-system-configs.js.map +1 -0
  129. package/tools/system-configs/create-system-configs.mjs +50 -0
  130. package/tools/system-configs/create-system-configs.mjs.map +1 -0
  131. package/tools/system-configs/get-system-configs.d.mts +24 -0
  132. package/tools/system-configs/get-system-configs.d.mts.map +1 -0
  133. package/tools/system-configs/get-system-configs.d.ts +24 -0
  134. package/tools/system-configs/get-system-configs.d.ts.map +1 -0
  135. package/tools/system-configs/get-system-configs.js +31 -0
  136. package/tools/system-configs/get-system-configs.js.map +1 -0
  137. package/tools/system-configs/get-system-configs.mjs +27 -0
  138. package/tools/system-configs/get-system-configs.mjs.map +1 -0
  139. package/tools/system-configs/list-system-configs.d.mts +24 -0
  140. package/tools/system-configs/list-system-configs.d.mts.map +1 -0
  141. package/tools/system-configs/list-system-configs.d.ts +24 -0
  142. package/tools/system-configs/list-system-configs.d.ts.map +1 -0
  143. package/tools/system-configs/list-system-configs.js +36 -0
  144. package/tools/system-configs/list-system-configs.js.map +1 -0
  145. package/tools/system-configs/list-system-configs.mjs +32 -0
  146. package/tools/system-configs/list-system-configs.mjs.map +1 -0
  147. package/tools/systems/create-systems.d.mts +24 -0
  148. package/tools/systems/create-systems.d.mts.map +1 -0
  149. package/tools/systems/create-systems.d.ts +24 -0
  150. package/tools/systems/create-systems.d.ts.map +1 -0
  151. package/tools/systems/create-systems.js +48 -0
  152. package/tools/systems/create-systems.js.map +1 -0
  153. package/tools/systems/create-systems.mjs +44 -0
  154. package/tools/systems/create-systems.mjs.map +1 -0
  155. package/tools/systems/delete-systems.d.mts +24 -0
  156. package/tools/systems/delete-systems.d.mts.map +1 -0
  157. package/tools/systems/delete-systems.d.ts +24 -0
  158. package/tools/systems/delete-systems.d.ts.map +1 -0
  159. package/tools/systems/delete-systems.js +28 -0
  160. package/tools/systems/delete-systems.js.map +1 -0
  161. package/tools/systems/delete-systems.mjs +24 -0
  162. package/tools/systems/delete-systems.mjs.map +1 -0
  163. package/tools/systems/get-systems.d.mts +24 -0
  164. package/tools/systems/get-systems.d.mts.map +1 -0
  165. package/tools/systems/get-systems.d.ts +24 -0
  166. package/tools/systems/get-systems.d.ts.map +1 -0
  167. package/tools/systems/get-systems.js +28 -0
  168. package/tools/systems/get-systems.js.map +1 -0
  169. package/tools/systems/get-systems.mjs +24 -0
  170. package/tools/systems/get-systems.mjs.map +1 -0
  171. package/tools/systems/list-systems.d.mts +24 -0
  172. package/tools/systems/list-systems.d.mts.map +1 -0
  173. package/tools/systems/list-systems.d.ts +24 -0
  174. package/tools/systems/list-systems.d.ts.map +1 -0
  175. package/tools/systems/list-systems.js +36 -0
  176. package/tools/systems/list-systems.js.map +1 -0
  177. package/tools/systems/list-systems.mjs +32 -0
  178. package/tools/systems/list-systems.mjs.map +1 -0
  179. package/tools/systems/update-systems.d.mts +24 -0
  180. package/tools/systems/update-systems.d.mts.map +1 -0
  181. package/tools/systems/update-systems.d.ts +24 -0
  182. package/tools/systems/update-systems.d.ts.map +1 -0
  183. package/tools/systems/update-systems.js +48 -0
  184. package/tools/systems/update-systems.js.map +1 -0
  185. package/tools/systems/update-systems.mjs +44 -0
  186. package/tools/systems/update-systems.mjs.map +1 -0
  187. package/tools/testcases/create-testcases.d.mts +24 -0
  188. package/tools/testcases/create-testcases.d.mts.map +1 -0
  189. package/tools/testcases/create-testcases.d.ts +24 -0
  190. package/tools/testcases/create-testcases.d.ts.map +1 -0
  191. package/tools/testcases/create-testcases.js +43 -0
  192. package/tools/testcases/create-testcases.js.map +1 -0
  193. package/tools/testcases/create-testcases.mjs +39 -0
  194. package/tools/testcases/create-testcases.mjs.map +1 -0
  195. package/tools/testcases/delete-testcases.d.mts +24 -0
  196. package/tools/testcases/delete-testcases.d.mts.map +1 -0
  197. package/tools/testcases/delete-testcases.d.ts +24 -0
  198. package/tools/testcases/delete-testcases.d.ts.map +1 -0
  199. package/tools/testcases/delete-testcases.js +32 -0
  200. package/tools/testcases/delete-testcases.js.map +1 -0
  201. package/tools/testcases/delete-testcases.mjs +28 -0
  202. package/tools/testcases/delete-testcases.mjs.map +1 -0
  203. package/tools/testcases/get-testcases.d.mts +24 -0
  204. package/tools/testcases/get-testcases.d.mts.map +1 -0
  205. package/tools/testcases/get-testcases.d.ts +24 -0
  206. package/tools/testcases/get-testcases.d.ts.map +1 -0
  207. package/tools/testcases/get-testcases.js +28 -0
  208. package/tools/testcases/get-testcases.js.map +1 -0
  209. package/tools/testcases/get-testcases.mjs +24 -0
  210. package/tools/testcases/get-testcases.mjs.map +1 -0
  211. package/tools/testcases/list-testcases.d.mts +24 -0
  212. package/tools/testcases/list-testcases.d.mts.map +1 -0
  213. package/tools/testcases/list-testcases.d.ts +24 -0
  214. package/tools/testcases/list-testcases.d.ts.map +1 -0
  215. package/tools/testcases/list-testcases.js +36 -0
  216. package/tools/testcases/list-testcases.js.map +1 -0
  217. package/tools/testcases/list-testcases.mjs +32 -0
  218. package/tools/testcases/list-testcases.mjs.map +1 -0
  219. package/tools/testcases/update-testcases.d.mts +24 -0
  220. package/tools/testcases/update-testcases.d.mts.map +1 -0
  221. package/tools/testcases/update-testcases.d.ts +24 -0
  222. package/tools/testcases/update-testcases.d.ts.map +1 -0
  223. package/tools/testcases/update-testcases.js +32 -0
  224. package/tools/testcases/update-testcases.js.map +1 -0
  225. package/tools/testcases/update-testcases.mjs +28 -0
  226. package/tools/testcases/update-testcases.mjs.map +1 -0
  227. package/tools/testsets/create-testsets.d.mts +24 -0
  228. package/tools/testsets/create-testsets.d.mts.map +1 -0
  229. package/tools/testsets/create-testsets.d.ts +24 -0
  230. package/tools/testsets/create-testsets.d.ts.map +1 -0
  231. package/tools/testsets/create-testsets.js +68 -0
  232. package/tools/testsets/create-testsets.js.map +1 -0
  233. package/tools/testsets/create-testsets.mjs +64 -0
  234. package/tools/testsets/create-testsets.mjs.map +1 -0
  235. package/tools/testsets/delete-testsets.d.mts +24 -0
  236. package/tools/testsets/delete-testsets.d.mts.map +1 -0
  237. package/tools/testsets/delete-testsets.d.ts +24 -0
  238. package/tools/testsets/delete-testsets.d.ts.map +1 -0
  239. package/tools/testsets/delete-testsets.js +28 -0
  240. package/tools/testsets/delete-testsets.js.map +1 -0
  241. package/tools/testsets/delete-testsets.mjs +24 -0
  242. package/tools/testsets/delete-testsets.mjs.map +1 -0
  243. package/tools/testsets/get-testsets.d.mts +24 -0
  244. package/tools/testsets/get-testsets.d.mts.map +1 -0
  245. package/tools/testsets/get-testsets.d.ts +24 -0
  246. package/tools/testsets/get-testsets.d.ts.map +1 -0
  247. package/tools/testsets/get-testsets.js +28 -0
  248. package/tools/testsets/get-testsets.js.map +1 -0
  249. package/tools/testsets/get-testsets.mjs +24 -0
  250. package/tools/testsets/get-testsets.mjs.map +1 -0
  251. package/tools/testsets/list-testsets.d.mts +24 -0
  252. package/tools/testsets/list-testsets.d.mts.map +1 -0
  253. package/tools/testsets/list-testsets.d.ts +24 -0
  254. package/tools/testsets/list-testsets.d.ts.map +1 -0
  255. package/tools/testsets/list-testsets.js +36 -0
  256. package/tools/testsets/list-testsets.js.map +1 -0
  257. package/tools/testsets/list-testsets.mjs +32 -0
  258. package/tools/testsets/list-testsets.mjs.map +1 -0
  259. package/tools/testsets/update-testsets.d.mts +24 -0
  260. package/tools/testsets/update-testsets.d.mts.map +1 -0
  261. package/tools/testsets/update-testsets.d.ts +24 -0
  262. package/tools/testsets/update-testsets.d.ts.map +1 -0
  263. package/tools/testsets/update-testsets.js +68 -0
  264. package/tools/testsets/update-testsets.js.map +1 -0
  265. package/tools/testsets/update-testsets.mjs +64 -0
  266. package/tools/testsets/update-testsets.mjs.map +1 -0
  267. package/tools.d.mts +2 -0
  268. package/tools.d.mts.map +1 -0
  269. package/tools.d.ts +2 -0
  270. package/tools.d.ts.map +1 -0
  271. package/tools.js +18 -0
  272. package/tools.js.map +1 -0
  273. package/tools.mjs +2 -0
  274. package/tools.mjs.map +1 -0
@@ -0,0 +1,129 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import Scorecard from 'scorecard-ai';
4
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
5
+
6
+ import list_projects from './projects/list-projects';
7
+ import create_testsets from './testsets/create-testsets';
8
+ import update_testsets from './testsets/update-testsets';
9
+ import list_testsets from './testsets/list-testsets';
10
+ import delete_testsets from './testsets/delete-testsets';
11
+ import get_testsets from './testsets/get-testsets';
12
+ import create_testcases from './testcases/create-testcases';
13
+ import update_testcases from './testcases/update-testcases';
14
+ import list_testcases from './testcases/list-testcases';
15
+ import delete_testcases from './testcases/delete-testcases';
16
+ import get_testcases from './testcases/get-testcases';
17
+ import create_runs from './runs/create-runs';
18
+ import update_runs from './runs/update-runs';
19
+ import create_records from './records/create-records';
20
+ import create_systems from './systems/create-systems';
21
+ import update_systems from './systems/update-systems';
22
+ import list_systems from './systems/list-systems';
23
+ import delete_systems from './systems/delete-systems';
24
+ import get_systems from './systems/get-systems';
25
+ import create_system_configs from './system-configs/create-system-configs';
26
+ import list_system_configs from './system-configs/list-system-configs';
27
+ import get_system_configs from './system-configs/get-system-configs';
28
+
29
+ export type HandlerFunction = (client: Scorecard, args: Record<string, unknown> | undefined) => Promise<any>;
30
+
31
+ export type Metadata = {
32
+ resource: string;
33
+ operation: 'read' | 'write';
34
+ tags: string[];
35
+ };
36
+
37
+ export type Endpoint = {
38
+ metadata: Metadata;
39
+ tool: Tool;
40
+ handler: HandlerFunction;
41
+ };
42
+
43
+ export const endpoints: Endpoint[] = [];
44
+
45
+ function addEndpoint(endpoint: Endpoint) {
46
+ endpoints.push(endpoint);
47
+ }
48
+
49
+ addEndpoint(list_projects);
50
+ addEndpoint(create_testsets);
51
+ addEndpoint(update_testsets);
52
+ addEndpoint(list_testsets);
53
+ addEndpoint(delete_testsets);
54
+ addEndpoint(get_testsets);
55
+ addEndpoint(create_testcases);
56
+ addEndpoint(update_testcases);
57
+ addEndpoint(list_testcases);
58
+ addEndpoint(delete_testcases);
59
+ addEndpoint(get_testcases);
60
+ addEndpoint(create_runs);
61
+ addEndpoint(update_runs);
62
+ addEndpoint(create_records);
63
+ addEndpoint(create_systems);
64
+ addEndpoint(update_systems);
65
+ addEndpoint(list_systems);
66
+ addEndpoint(delete_systems);
67
+ addEndpoint(get_systems);
68
+ addEndpoint(create_system_configs);
69
+ addEndpoint(list_system_configs);
70
+ addEndpoint(get_system_configs);
71
+
72
+ export type Filter = {
73
+ type: 'resource' | 'operation' | 'tag' | 'tool';
74
+ op: 'include' | 'exclude';
75
+ value: string;
76
+ };
77
+
78
+ export function query(filters: Filter[], endpoints: Endpoint[]): Endpoint[] {
79
+ if (filters.length === 0) {
80
+ return endpoints;
81
+ }
82
+
83
+ const allExcludes = filters.every((filter) => filter.op === 'exclude');
84
+ const unmatchedFilters = new Set(filters);
85
+
86
+ const filtered = endpoints.filter((endpoint: Endpoint) => {
87
+ let included = false || allExcludes;
88
+
89
+ for (const filter of filters) {
90
+ if (match(filter, endpoint)) {
91
+ unmatchedFilters.delete(filter);
92
+ included = filter.op === 'include';
93
+ }
94
+ }
95
+
96
+ return included;
97
+ });
98
+
99
+ // Check if any filters didn't match
100
+ if (unmatchedFilters.size > 0) {
101
+ throw new Error(
102
+ `The following filters did not match any endpoints: ${[...unmatchedFilters]
103
+ .map((f) => `${f.type}=${f.value}`)
104
+ .join(', ')}`,
105
+ );
106
+ }
107
+
108
+ return filtered;
109
+ }
110
+
111
+ function match({ type, value }: Filter, endpoint: Endpoint): boolean {
112
+ switch (type) {
113
+ case 'resource': {
114
+ const regexStr = '^' + normalizeResource(value).replace(/\*/g, '.*') + '$';
115
+ const regex = new RegExp(regexStr);
116
+ return regex.test(normalizeResource(endpoint.metadata.resource));
117
+ }
118
+ case 'operation':
119
+ return endpoint.metadata.operation === value;
120
+ case 'tag':
121
+ return endpoint.metadata.tags.includes(value);
122
+ case 'tool':
123
+ return endpoint.tool.name === value;
124
+ }
125
+ }
126
+
127
+ function normalizeResource(resource: string): string {
128
+ return resource.toLowerCase().replace(/[^a-z.*\-_]*/g, '');
129
+ }
@@ -0,0 +1,39 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
+ import type { Metadata } from '../';
5
+ import Scorecard from 'scorecard-ai';
6
+
7
+ export const metadata: Metadata = {
8
+ resource: 'projects',
9
+ operation: 'read',
10
+ tags: [],
11
+ };
12
+
13
+ export const tool: Tool = {
14
+ name: 'list_projects',
15
+ description:
16
+ 'Retrieve a paginated list of all Projects. Projects are ordered by creation date, with oldest Projects first.',
17
+ inputSchema: {
18
+ type: 'object',
19
+ properties: {
20
+ cursor: {
21
+ type: 'string',
22
+ description:
23
+ 'Cursor for pagination. Pass the `nextCursor` from the previous response to get the next page of results.',
24
+ },
25
+ limit: {
26
+ type: 'integer',
27
+ description:
28
+ 'Maximum number of items to return (1-100). Use with `cursor` for pagination through large sets.',
29
+ },
30
+ },
31
+ },
32
+ };
33
+
34
+ export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
35
+ const body = args as any;
36
+ return client.projects.list(body);
37
+ };
38
+
39
+ export default { metadata, tool, handler };
@@ -0,0 +1,47 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
+ import type { Metadata } from '../';
5
+ import Scorecard from 'scorecard-ai';
6
+
7
+ export const metadata: Metadata = {
8
+ resource: 'records',
9
+ operation: 'write',
10
+ tags: [],
11
+ };
12
+
13
+ export const tool: Tool = {
14
+ name: 'create_records',
15
+ description: 'Create a new Record in a Run.',
16
+ inputSchema: {
17
+ type: 'object',
18
+ properties: {
19
+ runId: {
20
+ type: 'string',
21
+ },
22
+ inputs: {
23
+ type: 'object',
24
+ description: "The actual inputs sent to the system, which should match the system's input schema.",
25
+ },
26
+ labels: {
27
+ type: 'object',
28
+ description: 'The expected outputs for the Testcase.',
29
+ },
30
+ outputs: {
31
+ type: 'object',
32
+ description: 'The actual outputs from the system.',
33
+ },
34
+ testcaseId: {
35
+ type: 'string',
36
+ description: 'The ID of the Testcase.',
37
+ },
38
+ },
39
+ },
40
+ };
41
+
42
+ export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
43
+ const { runId, ...body } = args as any;
44
+ return client.records.create(runId, body);
45
+ };
46
+
47
+ export default { metadata, tool, handler };
@@ -0,0 +1,46 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
+ import type { Metadata } from '../';
5
+ import Scorecard from 'scorecard-ai';
6
+
7
+ export const metadata: Metadata = {
8
+ resource: 'runs',
9
+ operation: 'write',
10
+ tags: [],
11
+ };
12
+
13
+ export const tool: Tool = {
14
+ name: 'create_runs',
15
+ description: 'Create a new Run.',
16
+ inputSchema: {
17
+ type: 'object',
18
+ properties: {
19
+ projectId: {
20
+ type: 'string',
21
+ },
22
+ metricIds: {
23
+ type: 'array',
24
+ description: 'The IDs of the metrics this Run is using.',
25
+ items: {
26
+ type: 'string',
27
+ },
28
+ },
29
+ testsetId: {
30
+ type: 'string',
31
+ description: 'The ID of the Testset this Run is testing.',
32
+ },
33
+ systemConfigId: {
34
+ type: 'string',
35
+ description: 'The ID of the system configuration this Run is using.',
36
+ },
37
+ },
38
+ },
39
+ };
40
+
41
+ export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
42
+ const { projectId, ...body } = args as any;
43
+ return client.runs.create(projectId, body);
44
+ };
45
+
46
+ export default { metadata, tool, handler };
@@ -0,0 +1,44 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
+ import type { Metadata } from '../';
5
+ import Scorecard from 'scorecard-ai';
6
+
7
+ export const metadata: Metadata = {
8
+ resource: 'runs',
9
+ operation: 'write',
10
+ tags: [],
11
+ };
12
+
13
+ export const tool: Tool = {
14
+ name: 'update_runs',
15
+ description: 'Update the status of a Run.',
16
+ inputSchema: {
17
+ type: 'object',
18
+ properties: {
19
+ runId: {
20
+ type: 'string',
21
+ },
22
+ status: {
23
+ type: 'string',
24
+ description: 'The status of the Run.',
25
+ enum: [
26
+ 'pending',
27
+ 'awaiting_execution',
28
+ 'running_execution',
29
+ 'awaiting_scoring',
30
+ 'running_scoring',
31
+ 'awaiting_human_scoring',
32
+ 'completed',
33
+ ],
34
+ },
35
+ },
36
+ },
37
+ };
38
+
39
+ export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
40
+ const { runId, ...body } = args as any;
41
+ return client.runs.update(runId, body);
42
+ };
43
+
44
+ export default { metadata, tool, handler };
@@ -0,0 +1,59 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
+ import type { Metadata } from '../';
5
+ import Scorecard from 'scorecard-ai';
6
+
7
+ export const metadata: Metadata = {
8
+ resource: 'system_configs',
9
+ operation: 'write',
10
+ tags: [],
11
+ };
12
+
13
+ export const tool: Tool = {
14
+ name: 'create_system_configs',
15
+ description:
16
+ "Create a new configuration for a system.\n\nEach configuration contains specific parameter values that match the system's configSchema - things like model parameters, thresholds, or processing options.\nOnce created, configurations cannot be modified, ensuring stable reference points for evaluations.\n\nWhen creating a configuration:\n- The 'config' object is validated against the parent system's configSchema\n- Configurations with validation errors are still stored, with errors included in the response\n- Validation errors indicate fields that don't match the schema but don't prevent creation\n- Having validation errors may affect how some evaluation metrics are calculated",
17
+ inputSchema: {
18
+ type: 'object',
19
+ properties: {
20
+ systemId: {
21
+ type: 'string',
22
+ },
23
+ config: {
24
+ type: 'object',
25
+ description: 'The configuration of the system.',
26
+ },
27
+ name: {
28
+ type: 'string',
29
+ description: 'The name of the system configuration.',
30
+ },
31
+ validationErrors: {
32
+ type: 'array',
33
+ description:
34
+ "Validation errors found in the configuration. If present, the configuration doesn't fully conform to its system's configSchema.",
35
+ items: {
36
+ type: 'object',
37
+ properties: {
38
+ message: {
39
+ type: 'string',
40
+ description: 'Human-readable error description.',
41
+ },
42
+ path: {
43
+ type: 'string',
44
+ description: 'JSON Pointer to the field with the validation error.',
45
+ },
46
+ },
47
+ required: ['message', 'path'],
48
+ },
49
+ },
50
+ },
51
+ },
52
+ };
53
+
54
+ export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
55
+ const { systemId, ...body } = args as any;
56
+ return client.systemConfigs.create(systemId, body);
57
+ };
58
+
59
+ export default { metadata, tool, handler };
@@ -0,0 +1,34 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
+ import type { Metadata } from '../';
5
+ import Scorecard from 'scorecard-ai';
6
+
7
+ export const metadata: Metadata = {
8
+ resource: 'system_configs',
9
+ operation: 'read',
10
+ tags: [],
11
+ };
12
+
13
+ export const tool: Tool = {
14
+ name: 'get_system_configs',
15
+ description: 'Retrieve a specific system configuration by ID.',
16
+ inputSchema: {
17
+ type: 'object',
18
+ properties: {
19
+ systemId: {
20
+ type: 'string',
21
+ },
22
+ systemConfigId: {
23
+ type: 'string',
24
+ },
25
+ },
26
+ },
27
+ };
28
+
29
+ export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
30
+ const { systemConfigId, ...body } = args as any;
31
+ return client.systemConfigs.get(systemConfigId, body);
32
+ };
33
+
34
+ export default { metadata, tool, handler };
@@ -0,0 +1,42 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
+ import type { Metadata } from '../';
5
+ import Scorecard from 'scorecard-ai';
6
+
7
+ export const metadata: Metadata = {
8
+ resource: 'system_configs',
9
+ operation: 'read',
10
+ tags: [],
11
+ };
12
+
13
+ export const tool: Tool = {
14
+ name: 'list_system_configs',
15
+ description:
16
+ 'Retrieve a paginated list of configurations for a specific system.\n\nSystem configurations provide concrete parameter values for a System Under Test, defining exactly how the system should be configured during an evaluation run.',
17
+ inputSchema: {
18
+ type: 'object',
19
+ properties: {
20
+ systemId: {
21
+ type: 'string',
22
+ },
23
+ cursor: {
24
+ type: 'string',
25
+ description:
26
+ 'Cursor for pagination. Pass the `nextCursor` from the previous response to get the next page of results.',
27
+ },
28
+ limit: {
29
+ type: 'integer',
30
+ description:
31
+ 'Maximum number of items to return (1-100). Use with `cursor` for pagination through large sets.',
32
+ },
33
+ },
34
+ },
35
+ };
36
+
37
+ export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
38
+ const { systemId, ...body } = args as any;
39
+ return client.systemConfigs.list(systemId, body);
40
+ };
41
+
42
+ export default { metadata, tool, handler };
@@ -0,0 +1,52 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
+ import type { Metadata } from '../';
5
+ import Scorecard from 'scorecard-ai';
6
+
7
+ export const metadata: Metadata = {
8
+ resource: 'systems',
9
+ operation: 'write',
10
+ tags: [],
11
+ };
12
+
13
+ export const tool: Tool = {
14
+ name: 'create_systems',
15
+ description:
16
+ 'Create a new system definition that specifies the interface contracts for a component you want to evaluate.\n\nA system acts as a template that defines three key contracts through JSON Schemas:\n1. Input Schema: What data your system accepts (e.g., user queries, context documents)\n2. Output Schema: What data your system produces (e.g., responses, confidence scores)\n3. Config Schema: What parameters can be adjusted (e.g., model selection, temperature)\n\nThis separation lets you evaluate any system as a black box, focusing on its interface rather than implementation details.',
17
+ inputSchema: {
18
+ type: 'object',
19
+ properties: {
20
+ projectId: {
21
+ type: 'string',
22
+ },
23
+ configSchema: {
24
+ type: 'object',
25
+ description: "The schema of the system's configuration.",
26
+ },
27
+ description: {
28
+ type: 'string',
29
+ description: 'The description of the system.',
30
+ },
31
+ inputSchema: {
32
+ type: 'object',
33
+ description: "The schema of the system's inputs.",
34
+ },
35
+ name: {
36
+ type: 'string',
37
+ description: 'The name of the system.',
38
+ },
39
+ outputSchema: {
40
+ type: 'object',
41
+ description: "The schema of the system's outputs.",
42
+ },
43
+ },
44
+ },
45
+ };
46
+
47
+ export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
48
+ const { projectId, ...body } = args as any;
49
+ return client.systems.create(projectId, body);
50
+ };
51
+
52
+ export default { metadata, tool, handler };
@@ -0,0 +1,31 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
+ import type { Metadata } from '../';
5
+ import Scorecard from 'scorecard-ai';
6
+
7
+ export const metadata: Metadata = {
8
+ resource: 'systems',
9
+ operation: 'write',
10
+ tags: [],
11
+ };
12
+
13
+ export const tool: Tool = {
14
+ name: 'delete_systems',
15
+ description: 'Delete a system definition by ID. This will not delete associated system configurations.',
16
+ inputSchema: {
17
+ type: 'object',
18
+ properties: {
19
+ systemId: {
20
+ type: 'string',
21
+ },
22
+ },
23
+ },
24
+ };
25
+
26
+ export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
27
+ const { systemId, ...body } = args as any;
28
+ return client.systems.delete(systemId);
29
+ };
30
+
31
+ export default { metadata, tool, handler };
@@ -0,0 +1,31 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
+ import type { Metadata } from '../';
5
+ import Scorecard from 'scorecard-ai';
6
+
7
+ export const metadata: Metadata = {
8
+ resource: 'systems',
9
+ operation: 'read',
10
+ tags: [],
11
+ };
12
+
13
+ export const tool: Tool = {
14
+ name: 'get_systems',
15
+ description: 'Retrieve a specific system by ID.',
16
+ inputSchema: {
17
+ type: 'object',
18
+ properties: {
19
+ systemId: {
20
+ type: 'string',
21
+ },
22
+ },
23
+ },
24
+ };
25
+
26
+ export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
27
+ const { systemId, ...body } = args as any;
28
+ return client.systems.get(systemId);
29
+ };
30
+
31
+ export default { metadata, tool, handler };
@@ -0,0 +1,41 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
+ import type { Metadata } from '../';
5
+ import Scorecard from 'scorecard-ai';
6
+
7
+ export const metadata: Metadata = {
8
+ resource: 'systems',
9
+ operation: 'read',
10
+ tags: [],
11
+ };
12
+
13
+ export const tool: Tool = {
14
+ name: 'list_systems',
15
+ description: 'Retrieve a paginated list of all systems. Systems are ordered by creation date.',
16
+ inputSchema: {
17
+ type: 'object',
18
+ properties: {
19
+ projectId: {
20
+ type: 'string',
21
+ },
22
+ cursor: {
23
+ type: 'string',
24
+ description:
25
+ 'Cursor for pagination. Pass the `nextCursor` from the previous response to get the next page of results.',
26
+ },
27
+ limit: {
28
+ type: 'integer',
29
+ description:
30
+ 'Maximum number of items to return (1-100). Use with `cursor` for pagination through large sets.',
31
+ },
32
+ },
33
+ },
34
+ };
35
+
36
+ export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
37
+ const { projectId, ...body } = args as any;
38
+ return client.systems.list(projectId, body);
39
+ };
40
+
41
+ export default { metadata, tool, handler };
@@ -0,0 +1,52 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
+ import type { Metadata } from '../';
5
+ import Scorecard from 'scorecard-ai';
6
+
7
+ export const metadata: Metadata = {
8
+ resource: 'systems',
9
+ operation: 'write',
10
+ tags: [],
11
+ };
12
+
13
+ export const tool: Tool = {
14
+ name: 'update_systems',
15
+ description:
16
+ "Update an existing system definition. Only the fields provided in the request body will be updated.\nIf a field is provided, the new content will replace the existing content.\nIf a field is not provided, the existing content will remain unchanged.\n\nWhen updating schemas:\n- The system will accept your changes regardless of compatibility with existing configurations\n- Schema updates won't invalidate existing evaluations or configurations\n- For significant redesigns, creating a new system definition provides a cleaner separation",
17
+ inputSchema: {
18
+ type: 'object',
19
+ properties: {
20
+ systemId: {
21
+ type: 'string',
22
+ },
23
+ configSchema: {
24
+ type: 'object',
25
+ description: "The schema of the system's configuration.",
26
+ },
27
+ description: {
28
+ type: 'string',
29
+ description: 'The description of the system.',
30
+ },
31
+ inputSchema: {
32
+ type: 'object',
33
+ description: "The schema of the system's inputs.",
34
+ },
35
+ name: {
36
+ type: 'string',
37
+ description: 'The name of the system.',
38
+ },
39
+ outputSchema: {
40
+ type: 'object',
41
+ description: "The schema of the system's outputs.",
42
+ },
43
+ },
44
+ },
45
+ };
46
+
47
+ export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
48
+ const { systemId, ...body } = args as any;
49
+ return client.systems.update(systemId, body);
50
+ };
51
+
52
+ export default { metadata, tool, handler };