scorecard-ai-mcp 1.0.0-alpha.8 → 1.0.0-alpha.9

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 (242) hide show
  1. package/dynamic-tools.d.mts +1 -1
  2. package/dynamic-tools.d.mts.map +1 -1
  3. package/dynamic-tools.d.ts +1 -1
  4. package/dynamic-tools.d.ts.map +1 -1
  5. package/dynamic-tools.js +5 -4
  6. package/dynamic-tools.js.map +1 -1
  7. package/dynamic-tools.mjs +5 -4
  8. package/dynamic-tools.mjs.map +1 -1
  9. package/package.json +2 -2
  10. package/server.d.mts +1 -6
  11. package/server.d.mts.map +1 -1
  12. package/server.d.ts +1 -6
  13. package/server.d.ts.map +1 -1
  14. package/server.js +3 -11
  15. package/server.js.map +1 -1
  16. package/server.mjs +3 -11
  17. package/server.mjs.map +1 -1
  18. package/src/dynamic-tools.ts +13 -7
  19. package/src/server.ts +3 -11
  20. package/src/tools/index.ts +3 -16
  21. package/src/tools/projects/create-projects.ts +7 -2
  22. package/src/tools/projects/list-projects.ts +7 -2
  23. package/src/tools/records/create-records.ts +7 -2
  24. package/src/tools/runs/create-runs.ts +11 -6
  25. package/src/tools/scores/upsert-scores.ts +7 -2
  26. package/src/tools/system-configs/create-system-configs.ts +7 -2
  27. package/src/tools/system-configs/get-system-configs.ts +7 -5
  28. package/src/tools/system-configs/list-system-configs.ts +7 -2
  29. package/src/tools/systems/create-systems.ts +7 -2
  30. package/src/tools/systems/delete-systems.ts +7 -2
  31. package/src/tools/systems/get-systems.ts +7 -2
  32. package/src/tools/systems/list-systems.ts +7 -2
  33. package/src/tools/systems/update-systems.ts +7 -2
  34. package/src/tools/testcases/create-testcases.ts +7 -2
  35. package/src/tools/testcases/delete-testcases.ts +7 -2
  36. package/src/tools/testcases/get-testcases.ts +7 -2
  37. package/src/tools/testcases/list-testcases.ts +7 -2
  38. package/src/tools/testcases/update-testcases.ts +7 -2
  39. package/src/tools/testsets/create-testsets.ts +7 -2
  40. package/src/tools/testsets/delete-testsets.ts +7 -2
  41. package/src/tools/testsets/get-testsets.ts +7 -2
  42. package/src/tools/testsets/list-testsets.ts +7 -2
  43. package/src/tools/testsets/update-testsets.ts +7 -2
  44. package/src/tools/types.ts +104 -0
  45. package/tools/index.d.mts +2 -13
  46. package/tools/index.d.mts.map +1 -1
  47. package/tools/index.d.ts +2 -13
  48. package/tools/index.d.ts.map +1 -1
  49. package/tools/index.js.map +1 -1
  50. package/tools/index.mjs.map +1 -1
  51. package/tools/projects/create-projects.d.mts +2 -2
  52. package/tools/projects/create-projects.d.mts.map +1 -1
  53. package/tools/projects/create-projects.d.ts +2 -2
  54. package/tools/projects/create-projects.d.ts.map +1 -1
  55. package/tools/projects/create-projects.js +6 -2
  56. package/tools/projects/create-projects.js.map +1 -1
  57. package/tools/projects/create-projects.mjs +6 -2
  58. package/tools/projects/create-projects.mjs.map +1 -1
  59. package/tools/projects/list-projects.d.mts +2 -2
  60. package/tools/projects/list-projects.d.mts.map +1 -1
  61. package/tools/projects/list-projects.d.ts +2 -2
  62. package/tools/projects/list-projects.d.ts.map +1 -1
  63. package/tools/projects/list-projects.js +6 -2
  64. package/tools/projects/list-projects.js.map +1 -1
  65. package/tools/projects/list-projects.mjs +6 -2
  66. package/tools/projects/list-projects.mjs.map +1 -1
  67. package/tools/records/create-records.d.mts +2 -2
  68. package/tools/records/create-records.d.mts.map +1 -1
  69. package/tools/records/create-records.d.ts +2 -2
  70. package/tools/records/create-records.d.ts.map +1 -1
  71. package/tools/records/create-records.js +6 -2
  72. package/tools/records/create-records.js.map +1 -1
  73. package/tools/records/create-records.mjs +6 -2
  74. package/tools/records/create-records.mjs.map +1 -1
  75. package/tools/runs/create-runs.d.mts +2 -2
  76. package/tools/runs/create-runs.d.mts.map +1 -1
  77. package/tools/runs/create-runs.d.ts +2 -2
  78. package/tools/runs/create-runs.d.ts.map +1 -1
  79. package/tools/runs/create-runs.js +10 -6
  80. package/tools/runs/create-runs.js.map +1 -1
  81. package/tools/runs/create-runs.mjs +10 -6
  82. package/tools/runs/create-runs.mjs.map +1 -1
  83. package/tools/scores/upsert-scores.d.mts +2 -2
  84. package/tools/scores/upsert-scores.d.mts.map +1 -1
  85. package/tools/scores/upsert-scores.d.ts +2 -2
  86. package/tools/scores/upsert-scores.d.ts.map +1 -1
  87. package/tools/scores/upsert-scores.js +6 -2
  88. package/tools/scores/upsert-scores.js.map +1 -1
  89. package/tools/scores/upsert-scores.mjs +6 -2
  90. package/tools/scores/upsert-scores.mjs.map +1 -1
  91. package/tools/system-configs/create-system-configs.d.mts +2 -2
  92. package/tools/system-configs/create-system-configs.d.mts.map +1 -1
  93. package/tools/system-configs/create-system-configs.d.ts +2 -2
  94. package/tools/system-configs/create-system-configs.d.ts.map +1 -1
  95. package/tools/system-configs/create-system-configs.js +6 -2
  96. package/tools/system-configs/create-system-configs.js.map +1 -1
  97. package/tools/system-configs/create-system-configs.mjs +6 -2
  98. package/tools/system-configs/create-system-configs.mjs.map +1 -1
  99. package/tools/system-configs/get-system-configs.d.mts +2 -2
  100. package/tools/system-configs/get-system-configs.d.mts.map +1 -1
  101. package/tools/system-configs/get-system-configs.d.ts +2 -2
  102. package/tools/system-configs/get-system-configs.d.ts.map +1 -1
  103. package/tools/system-configs/get-system-configs.js +6 -5
  104. package/tools/system-configs/get-system-configs.js.map +1 -1
  105. package/tools/system-configs/get-system-configs.mjs +6 -5
  106. package/tools/system-configs/get-system-configs.mjs.map +1 -1
  107. package/tools/system-configs/list-system-configs.d.mts +2 -2
  108. package/tools/system-configs/list-system-configs.d.mts.map +1 -1
  109. package/tools/system-configs/list-system-configs.d.ts +2 -2
  110. package/tools/system-configs/list-system-configs.d.ts.map +1 -1
  111. package/tools/system-configs/list-system-configs.js +6 -2
  112. package/tools/system-configs/list-system-configs.js.map +1 -1
  113. package/tools/system-configs/list-system-configs.mjs +6 -2
  114. package/tools/system-configs/list-system-configs.mjs.map +1 -1
  115. package/tools/systems/create-systems.d.mts +2 -2
  116. package/tools/systems/create-systems.d.mts.map +1 -1
  117. package/tools/systems/create-systems.d.ts +2 -2
  118. package/tools/systems/create-systems.d.ts.map +1 -1
  119. package/tools/systems/create-systems.js +6 -2
  120. package/tools/systems/create-systems.js.map +1 -1
  121. package/tools/systems/create-systems.mjs +6 -2
  122. package/tools/systems/create-systems.mjs.map +1 -1
  123. package/tools/systems/delete-systems.d.mts +2 -2
  124. package/tools/systems/delete-systems.d.mts.map +1 -1
  125. package/tools/systems/delete-systems.d.ts +2 -2
  126. package/tools/systems/delete-systems.d.ts.map +1 -1
  127. package/tools/systems/delete-systems.js +6 -2
  128. package/tools/systems/delete-systems.js.map +1 -1
  129. package/tools/systems/delete-systems.mjs +6 -2
  130. package/tools/systems/delete-systems.mjs.map +1 -1
  131. package/tools/systems/get-systems.d.mts +2 -2
  132. package/tools/systems/get-systems.d.mts.map +1 -1
  133. package/tools/systems/get-systems.d.ts +2 -2
  134. package/tools/systems/get-systems.d.ts.map +1 -1
  135. package/tools/systems/get-systems.js +6 -2
  136. package/tools/systems/get-systems.js.map +1 -1
  137. package/tools/systems/get-systems.mjs +6 -2
  138. package/tools/systems/get-systems.mjs.map +1 -1
  139. package/tools/systems/list-systems.d.mts +2 -2
  140. package/tools/systems/list-systems.d.mts.map +1 -1
  141. package/tools/systems/list-systems.d.ts +2 -2
  142. package/tools/systems/list-systems.d.ts.map +1 -1
  143. package/tools/systems/list-systems.js +6 -2
  144. package/tools/systems/list-systems.js.map +1 -1
  145. package/tools/systems/list-systems.mjs +6 -2
  146. package/tools/systems/list-systems.mjs.map +1 -1
  147. package/tools/systems/update-systems.d.mts +2 -2
  148. package/tools/systems/update-systems.d.mts.map +1 -1
  149. package/tools/systems/update-systems.d.ts +2 -2
  150. package/tools/systems/update-systems.d.ts.map +1 -1
  151. package/tools/systems/update-systems.js +6 -2
  152. package/tools/systems/update-systems.js.map +1 -1
  153. package/tools/systems/update-systems.mjs +6 -2
  154. package/tools/systems/update-systems.mjs.map +1 -1
  155. package/tools/testcases/create-testcases.d.mts +2 -2
  156. package/tools/testcases/create-testcases.d.mts.map +1 -1
  157. package/tools/testcases/create-testcases.d.ts +2 -2
  158. package/tools/testcases/create-testcases.d.ts.map +1 -1
  159. package/tools/testcases/create-testcases.js +6 -2
  160. package/tools/testcases/create-testcases.js.map +1 -1
  161. package/tools/testcases/create-testcases.mjs +6 -2
  162. package/tools/testcases/create-testcases.mjs.map +1 -1
  163. package/tools/testcases/delete-testcases.d.mts +2 -2
  164. package/tools/testcases/delete-testcases.d.mts.map +1 -1
  165. package/tools/testcases/delete-testcases.d.ts +2 -2
  166. package/tools/testcases/delete-testcases.d.ts.map +1 -1
  167. package/tools/testcases/delete-testcases.js +6 -2
  168. package/tools/testcases/delete-testcases.js.map +1 -1
  169. package/tools/testcases/delete-testcases.mjs +6 -2
  170. package/tools/testcases/delete-testcases.mjs.map +1 -1
  171. package/tools/testcases/get-testcases.d.mts +2 -2
  172. package/tools/testcases/get-testcases.d.mts.map +1 -1
  173. package/tools/testcases/get-testcases.d.ts +2 -2
  174. package/tools/testcases/get-testcases.d.ts.map +1 -1
  175. package/tools/testcases/get-testcases.js +6 -2
  176. package/tools/testcases/get-testcases.js.map +1 -1
  177. package/tools/testcases/get-testcases.mjs +6 -2
  178. package/tools/testcases/get-testcases.mjs.map +1 -1
  179. package/tools/testcases/list-testcases.d.mts +2 -2
  180. package/tools/testcases/list-testcases.d.mts.map +1 -1
  181. package/tools/testcases/list-testcases.d.ts +2 -2
  182. package/tools/testcases/list-testcases.d.ts.map +1 -1
  183. package/tools/testcases/list-testcases.js +6 -2
  184. package/tools/testcases/list-testcases.js.map +1 -1
  185. package/tools/testcases/list-testcases.mjs +6 -2
  186. package/tools/testcases/list-testcases.mjs.map +1 -1
  187. package/tools/testcases/update-testcases.d.mts +2 -2
  188. package/tools/testcases/update-testcases.d.mts.map +1 -1
  189. package/tools/testcases/update-testcases.d.ts +2 -2
  190. package/tools/testcases/update-testcases.d.ts.map +1 -1
  191. package/tools/testcases/update-testcases.js +6 -2
  192. package/tools/testcases/update-testcases.js.map +1 -1
  193. package/tools/testcases/update-testcases.mjs +6 -2
  194. package/tools/testcases/update-testcases.mjs.map +1 -1
  195. package/tools/testsets/create-testsets.d.mts +2 -2
  196. package/tools/testsets/create-testsets.d.mts.map +1 -1
  197. package/tools/testsets/create-testsets.d.ts +2 -2
  198. package/tools/testsets/create-testsets.d.ts.map +1 -1
  199. package/tools/testsets/create-testsets.js +6 -2
  200. package/tools/testsets/create-testsets.js.map +1 -1
  201. package/tools/testsets/create-testsets.mjs +6 -2
  202. package/tools/testsets/create-testsets.mjs.map +1 -1
  203. package/tools/testsets/delete-testsets.d.mts +2 -2
  204. package/tools/testsets/delete-testsets.d.mts.map +1 -1
  205. package/tools/testsets/delete-testsets.d.ts +2 -2
  206. package/tools/testsets/delete-testsets.d.ts.map +1 -1
  207. package/tools/testsets/delete-testsets.js +6 -2
  208. package/tools/testsets/delete-testsets.js.map +1 -1
  209. package/tools/testsets/delete-testsets.mjs +6 -2
  210. package/tools/testsets/delete-testsets.mjs.map +1 -1
  211. package/tools/testsets/get-testsets.d.mts +2 -2
  212. package/tools/testsets/get-testsets.d.mts.map +1 -1
  213. package/tools/testsets/get-testsets.d.ts +2 -2
  214. package/tools/testsets/get-testsets.d.ts.map +1 -1
  215. package/tools/testsets/get-testsets.js +6 -2
  216. package/tools/testsets/get-testsets.js.map +1 -1
  217. package/tools/testsets/get-testsets.mjs +6 -2
  218. package/tools/testsets/get-testsets.mjs.map +1 -1
  219. package/tools/testsets/list-testsets.d.mts +2 -2
  220. package/tools/testsets/list-testsets.d.mts.map +1 -1
  221. package/tools/testsets/list-testsets.d.ts +2 -2
  222. package/tools/testsets/list-testsets.d.ts.map +1 -1
  223. package/tools/testsets/list-testsets.js +6 -2
  224. package/tools/testsets/list-testsets.js.map +1 -1
  225. package/tools/testsets/list-testsets.mjs +6 -2
  226. package/tools/testsets/list-testsets.mjs.map +1 -1
  227. package/tools/testsets/update-testsets.d.mts +2 -2
  228. package/tools/testsets/update-testsets.d.mts.map +1 -1
  229. package/tools/testsets/update-testsets.d.ts +2 -2
  230. package/tools/testsets/update-testsets.d.ts.map +1 -1
  231. package/tools/testsets/update-testsets.js +6 -2
  232. package/tools/testsets/update-testsets.js.map +1 -1
  233. package/tools/testsets/update-testsets.mjs +6 -2
  234. package/tools/testsets/update-testsets.mjs.map +1 -1
  235. package/tools/types.d.mts +51 -0
  236. package/tools/types.d.mts.map +1 -0
  237. package/tools/types.d.ts +51 -0
  238. package/tools/types.d.ts.map +1 -0
  239. package/tools/types.js +46 -0
  240. package/tools/types.js.map +1 -0
  241. package/tools/types.mjs +42 -0
  242. package/tools/types.mjs.map +1 -0
@@ -1,5 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
4
+
3
5
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
6
  import type { Metadata } from '../';
5
7
  import Scorecard from 'scorecard-ai';
@@ -8,6 +10,9 @@ export const metadata: Metadata = {
8
10
  resource: 'system_configs',
9
11
  operation: 'read',
10
12
  tags: [],
13
+ httpMethod: 'get',
14
+ httpPath: '/systems/configs/{systemConfigId}',
15
+ operationId: 'getSystemConfig',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
@@ -16,9 +21,6 @@ export const tool: Tool = {
16
21
  inputSchema: {
17
22
  type: 'object',
18
23
  properties: {
19
- systemId: {
20
- type: 'string',
21
- },
22
24
  systemConfigId: {
23
25
  type: 'string',
24
26
  },
@@ -26,9 +28,9 @@ export const tool: Tool = {
26
28
  },
27
29
  };
28
30
 
29
- export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
31
+ export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
30
32
  const { systemConfigId, ...body } = args as any;
31
- return client.systemConfigs.get(systemConfigId, body);
33
+ return asTextContentResult(await client.systemConfigs.get(systemConfigId));
32
34
  };
33
35
 
34
36
  export default { metadata, tool, handler };
@@ -1,5 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
4
+
3
5
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
6
  import type { Metadata } from '../';
5
7
  import Scorecard from 'scorecard-ai';
@@ -8,6 +10,9 @@ export const metadata: Metadata = {
8
10
  resource: 'system_configs',
9
11
  operation: 'read',
10
12
  tags: [],
13
+ httpMethod: 'get',
14
+ httpPath: '/systems/{systemId}/configs',
15
+ operationId: 'listSystemConfigs',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
@@ -34,9 +39,9 @@ export const tool: Tool = {
34
39
  },
35
40
  };
36
41
 
37
- export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
42
+ export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
38
43
  const { systemId, ...body } = args as any;
39
- return client.systemConfigs.list(systemId, body);
44
+ return asTextContentResult(await client.systemConfigs.list(systemId, body));
40
45
  };
41
46
 
42
47
  export default { metadata, tool, handler };
@@ -1,5 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
4
+
3
5
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
6
  import type { Metadata } from '../';
5
7
  import Scorecard from 'scorecard-ai';
@@ -8,6 +10,9 @@ export const metadata: Metadata = {
8
10
  resource: 'systems',
9
11
  operation: 'write',
10
12
  tags: [],
13
+ httpMethod: 'post',
14
+ httpPath: '/projects/{projectId}/systems',
15
+ operationId: 'createSystem',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
@@ -44,9 +49,9 @@ export const tool: Tool = {
44
49
  },
45
50
  };
46
51
 
47
- export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
52
+ export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
48
53
  const { projectId, ...body } = args as any;
49
- return client.systems.create(projectId, body);
54
+ return asTextContentResult(await client.systems.create(projectId, body));
50
55
  };
51
56
 
52
57
  export default { metadata, tool, handler };
@@ -1,5 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
4
+
3
5
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
6
  import type { Metadata } from '../';
5
7
  import Scorecard from 'scorecard-ai';
@@ -8,6 +10,9 @@ export const metadata: Metadata = {
8
10
  resource: 'systems',
9
11
  operation: 'write',
10
12
  tags: [],
13
+ httpMethod: 'delete',
14
+ httpPath: '/systems/{systemId}',
15
+ operationId: 'deleteSystem',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
@@ -23,9 +28,9 @@ export const tool: Tool = {
23
28
  },
24
29
  };
25
30
 
26
- export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
31
+ export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
27
32
  const { systemId, ...body } = args as any;
28
- return client.systems.delete(systemId);
33
+ return asTextContentResult(await client.systems.delete(systemId));
29
34
  };
30
35
 
31
36
  export default { metadata, tool, handler };
@@ -1,5 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
4
+
3
5
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
6
  import type { Metadata } from '../';
5
7
  import Scorecard from 'scorecard-ai';
@@ -8,6 +10,9 @@ export const metadata: Metadata = {
8
10
  resource: 'systems',
9
11
  operation: 'read',
10
12
  tags: [],
13
+ httpMethod: 'get',
14
+ httpPath: '/systems/{systemId}',
15
+ operationId: 'getSystem',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
@@ -23,9 +28,9 @@ export const tool: Tool = {
23
28
  },
24
29
  };
25
30
 
26
- export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
31
+ export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
27
32
  const { systemId, ...body } = args as any;
28
- return client.systems.get(systemId);
33
+ return asTextContentResult(await client.systems.get(systemId));
29
34
  };
30
35
 
31
36
  export default { metadata, tool, handler };
@@ -1,5 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
4
+
3
5
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
6
  import type { Metadata } from '../';
5
7
  import Scorecard from 'scorecard-ai';
@@ -8,6 +10,9 @@ export const metadata: Metadata = {
8
10
  resource: 'systems',
9
11
  operation: 'read',
10
12
  tags: [],
13
+ httpMethod: 'get',
14
+ httpPath: '/projects/{projectId}/systems',
15
+ operationId: 'listSystems',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
@@ -33,9 +38,9 @@ export const tool: Tool = {
33
38
  },
34
39
  };
35
40
 
36
- export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
41
+ export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
37
42
  const { projectId, ...body } = args as any;
38
- return client.systems.list(projectId, body);
43
+ return asTextContentResult(await client.systems.list(projectId, body));
39
44
  };
40
45
 
41
46
  export default { metadata, tool, handler };
@@ -1,5 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
4
+
3
5
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
6
  import type { Metadata } from '../';
5
7
  import Scorecard from 'scorecard-ai';
@@ -8,6 +10,9 @@ export const metadata: Metadata = {
8
10
  resource: 'systems',
9
11
  operation: 'write',
10
12
  tags: [],
13
+ httpMethod: 'patch',
14
+ httpPath: '/systems/{systemId}',
15
+ operationId: 'updateSystem',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
@@ -44,9 +49,9 @@ export const tool: Tool = {
44
49
  },
45
50
  };
46
51
 
47
- export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
52
+ export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
48
53
  const { systemId, ...body } = args as any;
49
- return client.systems.update(systemId, body);
54
+ return asTextContentResult(await client.systems.update(systemId, body));
50
55
  };
51
56
 
52
57
  export default { metadata, tool, handler };
@@ -1,5 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
4
+
3
5
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
6
  import type { Metadata } from '../';
5
7
  import Scorecard from 'scorecard-ai';
@@ -8,6 +10,9 @@ export const metadata: Metadata = {
8
10
  resource: 'testcases',
9
11
  operation: 'write',
10
12
  tags: [],
13
+ httpMethod: 'post',
14
+ httpPath: '/testsets/{testsetId}/testcases',
15
+ operationId: 'createTestcases',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
@@ -37,9 +42,9 @@ export const tool: Tool = {
37
42
  },
38
43
  };
39
44
 
40
- export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
45
+ export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
41
46
  const { testsetId, ...body } = args as any;
42
- return client.testcases.create(testsetId, body);
47
+ return asTextContentResult(await client.testcases.create(testsetId, body));
43
48
  };
44
49
 
45
50
  export default { metadata, tool, handler };
@@ -1,5 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
4
+
3
5
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
6
  import type { Metadata } from '../';
5
7
  import Scorecard from 'scorecard-ai';
@@ -8,6 +10,9 @@ export const metadata: Metadata = {
8
10
  resource: 'testcases',
9
11
  operation: 'write',
10
12
  tags: [],
13
+ httpMethod: 'post',
14
+ httpPath: '/testcases/bulk-delete',
15
+ operationId: 'deleteTestcases',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
@@ -27,9 +32,9 @@ export const tool: Tool = {
27
32
  },
28
33
  };
29
34
 
30
- export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
35
+ export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
31
36
  const body = args as any;
32
- return client.testcases.delete(body);
37
+ return asTextContentResult(await client.testcases.delete(body));
33
38
  };
34
39
 
35
40
  export default { metadata, tool, handler };
@@ -1,5 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
4
+
3
5
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
6
  import type { Metadata } from '../';
5
7
  import Scorecard from 'scorecard-ai';
@@ -8,6 +10,9 @@ export const metadata: Metadata = {
8
10
  resource: 'testcases',
9
11
  operation: 'read',
10
12
  tags: [],
13
+ httpMethod: 'get',
14
+ httpPath: '/testcases/{testcaseId}',
15
+ operationId: 'getTestcase',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
@@ -23,9 +28,9 @@ export const tool: Tool = {
23
28
  },
24
29
  };
25
30
 
26
- export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
31
+ export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
27
32
  const { testcaseId, ...body } = args as any;
28
- return client.testcases.get(testcaseId);
33
+ return asTextContentResult(await client.testcases.get(testcaseId));
29
34
  };
30
35
 
31
36
  export default { metadata, tool, handler };
@@ -1,5 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
4
+
3
5
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
6
  import type { Metadata } from '../';
5
7
  import Scorecard from 'scorecard-ai';
@@ -8,6 +10,9 @@ export const metadata: Metadata = {
8
10
  resource: 'testcases',
9
11
  operation: 'read',
10
12
  tags: [],
13
+ httpMethod: 'get',
14
+ httpPath: '/testsets/{testsetId}/testcases',
15
+ operationId: 'listTestcases',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
@@ -33,9 +38,9 @@ export const tool: Tool = {
33
38
  },
34
39
  };
35
40
 
36
- export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
41
+ export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
37
42
  const { testsetId, ...body } = args as any;
38
- return client.testcases.list(testsetId, body);
43
+ return asTextContentResult(await client.testcases.list(testsetId, body));
39
44
  };
40
45
 
41
46
  export default { metadata, tool, handler };
@@ -1,5 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
4
+
3
5
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
6
  import type { Metadata } from '../';
5
7
  import Scorecard from 'scorecard-ai';
@@ -8,6 +10,9 @@ export const metadata: Metadata = {
8
10
  resource: 'testcases',
9
11
  operation: 'write',
10
12
  tags: [],
13
+ httpMethod: 'put',
14
+ httpPath: '/testcases/{testcaseId}',
15
+ operationId: 'updateTestcase',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
@@ -27,9 +32,9 @@ export const tool: Tool = {
27
32
  },
28
33
  };
29
34
 
30
- export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
35
+ export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
31
36
  const { testcaseId, ...body } = args as any;
32
- return client.testcases.update(testcaseId, body);
37
+ return asTextContentResult(await client.testcases.update(testcaseId, body));
33
38
  };
34
39
 
35
40
  export default { metadata, tool, handler };
@@ -1,5 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
4
+
3
5
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
6
  import type { Metadata } from '../';
5
7
  import Scorecard from 'scorecard-ai';
@@ -8,6 +10,9 @@ export const metadata: Metadata = {
8
10
  resource: 'testsets',
9
11
  operation: 'write',
10
12
  tags: [],
13
+ httpMethod: 'post',
14
+ httpPath: '/projects/{projectId}/testsets',
15
+ operationId: 'createTestset',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
@@ -65,9 +70,9 @@ export const tool: Tool = {
65
70
  },
66
71
  };
67
72
 
68
- export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
73
+ export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
69
74
  const { projectId, ...body } = args as any;
70
- return client.testsets.create(projectId, body);
75
+ return asTextContentResult(await client.testsets.create(projectId, body));
71
76
  };
72
77
 
73
78
  export default { metadata, tool, handler };
@@ -1,5 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
4
+
3
5
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
6
  import type { Metadata } from '../';
5
7
  import Scorecard from 'scorecard-ai';
@@ -8,6 +10,9 @@ export const metadata: Metadata = {
8
10
  resource: 'testsets',
9
11
  operation: 'write',
10
12
  tags: [],
13
+ httpMethod: 'delete',
14
+ httpPath: '/testsets/{testsetId}',
15
+ operationId: 'deleteTestset',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
@@ -23,9 +28,9 @@ export const tool: Tool = {
23
28
  },
24
29
  };
25
30
 
26
- export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
31
+ export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
27
32
  const { testsetId, ...body } = args as any;
28
- return client.testsets.delete(testsetId);
33
+ return asTextContentResult(await client.testsets.delete(testsetId));
29
34
  };
30
35
 
31
36
  export default { metadata, tool, handler };
@@ -1,5 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
4
+
3
5
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
6
  import type { Metadata } from '../';
5
7
  import Scorecard from 'scorecard-ai';
@@ -8,6 +10,9 @@ export const metadata: Metadata = {
8
10
  resource: 'testsets',
9
11
  operation: 'read',
10
12
  tags: [],
13
+ httpMethod: 'get',
14
+ httpPath: '/testsets/{testsetId}',
15
+ operationId: 'getTestset',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
@@ -23,9 +28,9 @@ export const tool: Tool = {
23
28
  },
24
29
  };
25
30
 
26
- export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
31
+ export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
27
32
  const { testsetId, ...body } = args as any;
28
- return client.testsets.get(testsetId);
33
+ return asTextContentResult(await client.testsets.get(testsetId));
29
34
  };
30
35
 
31
36
  export default { metadata, tool, handler };
@@ -1,5 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
4
+
3
5
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
6
  import type { Metadata } from '../';
5
7
  import Scorecard from 'scorecard-ai';
@@ -8,6 +10,9 @@ export const metadata: Metadata = {
8
10
  resource: 'testsets',
9
11
  operation: 'read',
10
12
  tags: [],
13
+ httpMethod: 'get',
14
+ httpPath: '/projects/{projectId}/testsets',
15
+ operationId: 'listTestsets',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
@@ -33,9 +38,9 @@ export const tool: Tool = {
33
38
  },
34
39
  };
35
40
 
36
- export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
41
+ export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
37
42
  const { projectId, ...body } = args as any;
38
- return client.testsets.list(projectId, body);
43
+ return asTextContentResult(await client.testsets.list(projectId, body));
39
44
  };
40
45
 
41
46
  export default { metadata, tool, handler };
@@ -1,5 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
4
+
3
5
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
4
6
  import type { Metadata } from '../';
5
7
  import Scorecard from 'scorecard-ai';
@@ -8,6 +10,9 @@ export const metadata: Metadata = {
8
10
  resource: 'testsets',
9
11
  operation: 'write',
10
12
  tags: [],
13
+ httpMethod: 'patch',
14
+ httpPath: '/testsets/{testsetId}',
15
+ operationId: 'updateTestset',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
@@ -65,9 +70,9 @@ export const tool: Tool = {
65
70
  },
66
71
  };
67
72
 
68
- export const handler = (client: Scorecard, args: Record<string, unknown> | undefined) => {
73
+ export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
69
74
  const { testsetId, ...body } = args as any;
70
- return client.testsets.update(testsetId, body);
75
+ return asTextContentResult(await client.testsets.update(testsetId, body));
71
76
  };
72
77
 
73
78
  export default { metadata, tool, handler };
@@ -0,0 +1,104 @@
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
+ type TextContentBlock = {
7
+ type: 'text';
8
+ text: string;
9
+ };
10
+
11
+ type ImageContentBlock = {
12
+ type: 'image';
13
+ data: string;
14
+ mimeType: string;
15
+ };
16
+
17
+ type AudioContentBlock = {
18
+ type: 'audio';
19
+ data: string;
20
+ mimeType: string;
21
+ };
22
+
23
+ type ResourceContentBlock = {
24
+ type: 'resource';
25
+ resource:
26
+ | {
27
+ uri: string;
28
+ mimeType: string;
29
+ text: string;
30
+ }
31
+ | {
32
+ uri: string;
33
+ mimeType: string;
34
+ blob: string;
35
+ };
36
+ };
37
+
38
+ export type ContentBlock = TextContentBlock | ImageContentBlock | AudioContentBlock | ResourceContentBlock;
39
+
40
+ export type ToolCallResult = {
41
+ content: ContentBlock[];
42
+ isError?: boolean;
43
+ };
44
+
45
+ export type HandlerFunction = (
46
+ client: Scorecard,
47
+ args: Record<string, unknown> | undefined,
48
+ ) => Promise<ToolCallResult>;
49
+
50
+ export function asTextContentResult(result: Object): ToolCallResult {
51
+ return {
52
+ content: [
53
+ {
54
+ type: 'text',
55
+ text: JSON.stringify(result, null, 2),
56
+ },
57
+ ],
58
+ };
59
+ }
60
+
61
+ export async function asBinaryContentResult(response: Response): Promise<ToolCallResult> {
62
+ const blob = await response.blob();
63
+ const mimeType = blob.type;
64
+ const data = Buffer.from(await blob.arrayBuffer()).toString('base64');
65
+ if (mimeType.startsWith('image/')) {
66
+ return {
67
+ content: [{ type: 'image', mimeType, data }],
68
+ };
69
+ } else if (mimeType.startsWith('audio/')) {
70
+ return {
71
+ content: [{ type: 'audio', mimeType, data }],
72
+ };
73
+ } else {
74
+ return {
75
+ content: [
76
+ {
77
+ type: 'resource',
78
+ resource: {
79
+ // We must give a URI, even though this isn't actually an MCP resource.
80
+ uri: 'resource://tool-response',
81
+ mimeType,
82
+ blob: data,
83
+ },
84
+ },
85
+ ],
86
+ };
87
+ }
88
+ }
89
+
90
+ export type Metadata = {
91
+ resource: string;
92
+ operation: 'read' | 'write';
93
+ tags: string[];
94
+
95
+ httpMethod?: string;
96
+ httpPath?: string;
97
+ operationId?: string;
98
+ };
99
+
100
+ export type Endpoint = {
101
+ metadata: Metadata;
102
+ tool: Tool;
103
+ handler: HandlerFunction;
104
+ };
package/tools/index.d.mts CHANGED
@@ -1,16 +1,5 @@
1
- import Scorecard from 'scorecard-ai';
2
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
3
- export type HandlerFunction = (client: Scorecard, args: Record<string, unknown> | undefined) => Promise<any>;
4
- export type Metadata = {
5
- resource: string;
6
- operation: 'read' | 'write';
7
- tags: string[];
8
- };
9
- export type Endpoint = {
10
- metadata: Metadata;
11
- tool: Tool;
12
- handler: HandlerFunction;
13
- };
1
+ import { Metadata, Endpoint, HandlerFunction } from "./types.mjs";
2
+ export { Metadata, Endpoint, HandlerFunction };
14
3
  export declare const endpoints: Endpoint[];
15
4
  export type Filter = {
16
5
  type: 'resource' | 'operation' | 'tag' | 'tool';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/tools/index.ts"],"names":[],"mappings":"OAEO,SAAS,MAAM,cAAc;OAC7B,EAAE,IAAI,EAAE,MAAM,oCAAoC;AA0BzD,MAAM,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;AAE7G,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,QAAQ,EAAO,CAAC;AA8BxC,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,UAAU,GAAG,WAAW,GAAG,KAAK,GAAG,MAAM,CAAC;IAChD,EAAE,EAAE,SAAS,GAAG,SAAS,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CA2B1E"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/tools/index.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE;AAE9C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC;AA0B/C,eAAO,MAAM,SAAS,EAAE,QAAQ,EAAO,CAAC;AA8BxC,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,UAAU,GAAG,WAAW,GAAG,KAAK,GAAG,MAAM,CAAC;IAChD,EAAE,EAAE,SAAS,GAAG,SAAS,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CA2B1E"}
package/tools/index.d.ts CHANGED
@@ -1,16 +1,5 @@
1
- import Scorecard from 'scorecard-ai';
2
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
3
- export type HandlerFunction = (client: Scorecard, args: Record<string, unknown> | undefined) => Promise<any>;
4
- export type Metadata = {
5
- resource: string;
6
- operation: 'read' | 'write';
7
- tags: string[];
8
- };
9
- export type Endpoint = {
10
- metadata: Metadata;
11
- tool: Tool;
12
- handler: HandlerFunction;
13
- };
1
+ import { Metadata, Endpoint, HandlerFunction } from "./types.js";
2
+ export { Metadata, Endpoint, HandlerFunction };
14
3
  export declare const endpoints: Endpoint[];
15
4
  export type Filter = {
16
5
  type: 'resource' | 'operation' | 'tag' | 'tool';