scorecard-ai-mcp 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -0
- package/code-tool-paths.cjs +6 -0
- package/code-tool-paths.cjs.map +1 -0
- package/code-tool-paths.d.cts +2 -0
- package/code-tool-paths.d.cts.map +1 -0
- package/code-tool-types.d.mts +14 -0
- package/code-tool-types.d.mts.map +1 -0
- package/code-tool-types.d.ts +14 -0
- package/code-tool-types.d.ts.map +1 -0
- package/code-tool-types.js +4 -0
- package/code-tool-types.js.map +1 -0
- package/code-tool-types.mjs +3 -0
- package/code-tool-types.mjs.map +1 -0
- package/code-tool-worker.d.mts +5 -0
- package/code-tool-worker.d.mts.map +1 -0
- package/code-tool-worker.d.ts +5 -0
- package/code-tool-worker.d.ts.map +1 -0
- package/code-tool-worker.js +45 -0
- package/code-tool-worker.js.map +1 -0
- package/code-tool-worker.mjs +40 -0
- package/code-tool-worker.mjs.map +1 -0
- package/code-tool.d.mts +12 -0
- package/code-tool.d.mts.map +1 -0
- package/code-tool.d.ts +12 -0
- package/code-tool.d.ts.map +1 -0
- package/code-tool.js +157 -0
- package/code-tool.js.map +1 -0
- package/code-tool.mjs +121 -0
- package/code-tool.mjs.map +1 -0
- package/compat.d.mts +4 -2
- package/compat.d.mts.map +1 -1
- package/compat.d.ts +4 -2
- package/compat.d.ts.map +1 -1
- package/compat.js +8 -3
- package/compat.js.map +1 -1
- package/compat.mjs +7 -2
- package/compat.mjs.map +1 -1
- package/filtering.d.mts +2 -0
- package/filtering.d.mts.map +1 -0
- package/filtering.d.ts +2 -0
- package/filtering.d.ts.map +1 -0
- package/filtering.js +20 -0
- package/filtering.js.map +1 -0
- package/filtering.mjs +13 -0
- package/filtering.mjs.map +1 -0
- package/headers.d.mts +4 -0
- package/headers.d.mts.map +1 -0
- package/headers.d.ts +4 -0
- package/headers.d.ts.map +1 -0
- package/headers.js +22 -0
- package/headers.js.map +1 -0
- package/headers.mjs +18 -0
- package/headers.mjs.map +1 -0
- package/http.d.mts +9 -0
- package/http.d.mts.map +1 -0
- package/http.d.ts +9 -0
- package/http.d.ts.map +1 -0
- package/http.js +108 -0
- package/http.js.map +1 -0
- package/http.mjs +100 -0
- package/http.mjs.map +1 -0
- package/index.js +15 -10
- package/index.js.map +1 -1
- package/index.mjs +17 -12
- package/index.mjs.map +1 -1
- package/options.d.mts +11 -6
- package/options.d.mts.map +1 -1
- package/options.d.ts +11 -6
- package/options.d.ts.map +1 -1
- package/options.js +136 -15
- package/options.js.map +1 -1
- package/options.mjs +135 -15
- package/options.mjs.map +1 -1
- package/package.json +89 -4
- package/server.d.mts +4 -16
- package/server.d.mts.map +1 -1
- package/server.d.ts +4 -16
- package/server.d.ts.map +1 -1
- package/server.js +86 -33
- package/server.js.map +1 -1
- package/server.mjs +84 -32
- package/server.mjs.map +1 -1
- package/src/code-tool-paths.cts +3 -0
- package/src/code-tool-types.ts +14 -0
- package/src/code-tool-worker.ts +46 -0
- package/src/code-tool.ts +146 -0
- package/src/compat.ts +9 -4
- package/src/filtering.ts +14 -0
- package/src/headers.ts +23 -0
- package/src/http.ts +127 -0
- package/src/index.ts +18 -14
- package/src/options.ts +158 -21
- package/src/server.ts +103 -48
- package/src/stdio.ts +13 -0
- package/src/tools/metrics/create-metrics.ts +8 -2
- package/src/tools/metrics/update-metrics.ts +8 -2
- package/src/tools/projects/create-projects.ts +14 -5
- package/src/tools/projects/list-projects.ts +16 -5
- package/src/tools/records/create-records.ts +17 -5
- package/src/tools/runs/create-runs.ts +14 -5
- package/src/tools/scores/upsert-scores.ts +16 -5
- package/src/tools/systems/delete-systems.ts +16 -5
- package/src/tools/systems/get-systems.ts +16 -5
- package/src/tools/systems/list-systems.ts +17 -5
- package/src/tools/systems/update-systems.ts +13 -5
- package/src/tools/systems/upsert-systems.ts +15 -5
- package/src/tools/systems/versions/get-systems-versions.ts +18 -5
- package/src/tools/systems/versions/upsert-systems-versions.ts +16 -5
- package/src/tools/testcases/create-testcases.ts +15 -5
- package/src/tools/testcases/delete-testcases.ts +14 -5
- package/src/tools/testcases/get-testcases.ts +16 -5
- package/src/tools/testcases/list-testcases.ts +17 -5
- package/src/tools/testcases/update-testcases.ts +17 -5
- package/src/tools/testsets/create-testsets.ts +14 -5
- package/src/tools/testsets/delete-testsets.ts +16 -5
- package/src/tools/testsets/get-testsets.ts +16 -5
- package/src/tools/testsets/list-testsets.ts +17 -5
- package/src/tools/testsets/update-testsets.ts +14 -5
- package/src/tools/types.ts +1 -1
- package/stdio.d.mts +3 -0
- package/stdio.d.mts.map +1 -0
- package/stdio.d.ts +3 -0
- package/stdio.d.ts.map +1 -0
- package/stdio.js +14 -0
- package/stdio.js.map +1 -0
- package/stdio.mjs +10 -0
- package/stdio.mjs.map +1 -0
- package/tools/metrics/create-metrics.d.mts +1 -1
- package/tools/metrics/create-metrics.d.mts.map +1 -1
- package/tools/metrics/create-metrics.d.ts +1 -1
- package/tools/metrics/create-metrics.d.ts.map +1 -1
- package/tools/metrics/create-metrics.js +7 -0
- package/tools/metrics/create-metrics.js.map +1 -1
- package/tools/metrics/create-metrics.mjs +7 -0
- package/tools/metrics/create-metrics.mjs.map +1 -1
- package/tools/metrics/update-metrics.d.mts +1 -1
- package/tools/metrics/update-metrics.d.mts.map +1 -1
- package/tools/metrics/update-metrics.d.ts +1 -1
- package/tools/metrics/update-metrics.d.ts.map +1 -1
- package/tools/metrics/update-metrics.js +7 -0
- package/tools/metrics/update-metrics.js.map +1 -1
- package/tools/metrics/update-metrics.mjs +7 -0
- package/tools/metrics/update-metrics.mjs.map +1 -1
- package/tools/projects/create-projects.d.mts +1 -1
- package/tools/projects/create-projects.d.mts.map +1 -1
- package/tools/projects/create-projects.d.ts +1 -1
- package/tools/projects/create-projects.d.ts.map +1 -1
- package/tools/projects/create-projects.js +11 -3
- package/tools/projects/create-projects.js.map +1 -1
- package/tools/projects/create-projects.mjs +11 -3
- package/tools/projects/create-projects.mjs.map +1 -1
- package/tools/projects/list-projects.d.mts +1 -1
- package/tools/projects/list-projects.d.mts.map +1 -1
- package/tools/projects/list-projects.d.ts +1 -1
- package/tools/projects/list-projects.d.ts.map +1 -1
- package/tools/projects/list-projects.js +14 -3
- package/tools/projects/list-projects.js.map +1 -1
- package/tools/projects/list-projects.mjs +14 -3
- package/tools/projects/list-projects.mjs.map +1 -1
- package/tools/records/create-records.d.mts +1 -1
- package/tools/records/create-records.d.mts.map +1 -1
- package/tools/records/create-records.d.ts +1 -1
- package/tools/records/create-records.d.ts.map +1 -1
- package/tools/records/create-records.js +14 -3
- package/tools/records/create-records.js.map +1 -1
- package/tools/records/create-records.mjs +14 -3
- package/tools/records/create-records.mjs.map +1 -1
- package/tools/runs/create-runs.d.mts +1 -1
- package/tools/runs/create-runs.d.mts.map +1 -1
- package/tools/runs/create-runs.d.ts +1 -1
- package/tools/runs/create-runs.d.ts.map +1 -1
- package/tools/runs/create-runs.js +11 -3
- package/tools/runs/create-runs.js.map +1 -1
- package/tools/runs/create-runs.mjs +11 -3
- package/tools/runs/create-runs.mjs.map +1 -1
- package/tools/scores/upsert-scores.d.mts +1 -1
- package/tools/scores/upsert-scores.d.mts.map +1 -1
- package/tools/scores/upsert-scores.d.ts +1 -1
- package/tools/scores/upsert-scores.d.ts.map +1 -1
- package/tools/scores/upsert-scores.js +14 -3
- package/tools/scores/upsert-scores.js.map +1 -1
- package/tools/scores/upsert-scores.mjs +14 -3
- package/tools/scores/upsert-scores.mjs.map +1 -1
- package/tools/systems/delete-systems.d.mts +1 -1
- package/tools/systems/delete-systems.d.mts.map +1 -1
- package/tools/systems/delete-systems.d.ts +1 -1
- package/tools/systems/delete-systems.d.ts.map +1 -1
- package/tools/systems/delete-systems.js +13 -3
- package/tools/systems/delete-systems.js.map +1 -1
- package/tools/systems/delete-systems.mjs +13 -3
- package/tools/systems/delete-systems.mjs.map +1 -1
- package/tools/systems/get-systems.d.mts +1 -1
- package/tools/systems/get-systems.d.mts.map +1 -1
- package/tools/systems/get-systems.d.ts +1 -1
- package/tools/systems/get-systems.d.ts.map +1 -1
- package/tools/systems/get-systems.js +13 -3
- package/tools/systems/get-systems.js.map +1 -1
- package/tools/systems/get-systems.mjs +13 -3
- package/tools/systems/get-systems.mjs.map +1 -1
- package/tools/systems/list-systems.d.mts +1 -1
- package/tools/systems/list-systems.d.mts.map +1 -1
- package/tools/systems/list-systems.d.ts +1 -1
- package/tools/systems/list-systems.d.ts.map +1 -1
- package/tools/systems/list-systems.js +14 -3
- package/tools/systems/list-systems.js.map +1 -1
- package/tools/systems/list-systems.mjs +14 -3
- package/tools/systems/list-systems.mjs.map +1 -1
- package/tools/systems/update-systems.d.mts +1 -1
- package/tools/systems/update-systems.d.mts.map +1 -1
- package/tools/systems/update-systems.d.ts +1 -1
- package/tools/systems/update-systems.d.ts.map +1 -1
- package/tools/systems/update-systems.js +11 -3
- package/tools/systems/update-systems.js.map +1 -1
- package/tools/systems/update-systems.mjs +11 -3
- package/tools/systems/update-systems.mjs.map +1 -1
- package/tools/systems/upsert-systems.d.mts +1 -1
- package/tools/systems/upsert-systems.d.mts.map +1 -1
- package/tools/systems/upsert-systems.d.ts +1 -1
- package/tools/systems/upsert-systems.d.ts.map +1 -1
- package/tools/systems/upsert-systems.js +12 -3
- package/tools/systems/upsert-systems.js.map +1 -1
- package/tools/systems/upsert-systems.mjs +12 -3
- package/tools/systems/upsert-systems.mjs.map +1 -1
- package/tools/systems/versions/get-systems-versions.d.mts +1 -1
- package/tools/systems/versions/get-systems-versions.d.mts.map +1 -1
- package/tools/systems/versions/get-systems-versions.d.ts +1 -1
- package/tools/systems/versions/get-systems-versions.d.ts.map +1 -1
- package/tools/systems/versions/get-systems-versions.js +13 -3
- package/tools/systems/versions/get-systems-versions.js.map +1 -1
- package/tools/systems/versions/get-systems-versions.mjs +13 -3
- package/tools/systems/versions/get-systems-versions.mjs.map +1 -1
- package/tools/systems/versions/upsert-systems-versions.d.mts +1 -1
- package/tools/systems/versions/upsert-systems-versions.d.mts.map +1 -1
- package/tools/systems/versions/upsert-systems-versions.d.ts +1 -1
- package/tools/systems/versions/upsert-systems-versions.d.ts.map +1 -1
- package/tools/systems/versions/upsert-systems-versions.js +12 -3
- package/tools/systems/versions/upsert-systems-versions.js.map +1 -1
- package/tools/systems/versions/upsert-systems-versions.mjs +12 -3
- package/tools/systems/versions/upsert-systems-versions.mjs.map +1 -1
- package/tools/testcases/create-testcases.d.mts +1 -1
- package/tools/testcases/create-testcases.d.mts.map +1 -1
- package/tools/testcases/create-testcases.d.ts +1 -1
- package/tools/testcases/create-testcases.d.ts.map +1 -1
- package/tools/testcases/create-testcases.js +12 -3
- package/tools/testcases/create-testcases.js.map +1 -1
- package/tools/testcases/create-testcases.mjs +12 -3
- package/tools/testcases/create-testcases.mjs.map +1 -1
- package/tools/testcases/delete-testcases.d.mts +1 -1
- package/tools/testcases/delete-testcases.d.mts.map +1 -1
- package/tools/testcases/delete-testcases.d.ts +1 -1
- package/tools/testcases/delete-testcases.d.ts.map +1 -1
- package/tools/testcases/delete-testcases.js +11 -3
- package/tools/testcases/delete-testcases.js.map +1 -1
- package/tools/testcases/delete-testcases.mjs +11 -3
- package/tools/testcases/delete-testcases.mjs.map +1 -1
- package/tools/testcases/get-testcases.d.mts +1 -1
- package/tools/testcases/get-testcases.d.mts.map +1 -1
- package/tools/testcases/get-testcases.d.ts +1 -1
- package/tools/testcases/get-testcases.d.ts.map +1 -1
- package/tools/testcases/get-testcases.js +13 -3
- package/tools/testcases/get-testcases.js.map +1 -1
- package/tools/testcases/get-testcases.mjs +13 -3
- package/tools/testcases/get-testcases.mjs.map +1 -1
- package/tools/testcases/list-testcases.d.mts +1 -1
- package/tools/testcases/list-testcases.d.mts.map +1 -1
- package/tools/testcases/list-testcases.d.ts +1 -1
- package/tools/testcases/list-testcases.d.ts.map +1 -1
- package/tools/testcases/list-testcases.js +14 -3
- package/tools/testcases/list-testcases.js.map +1 -1
- package/tools/testcases/list-testcases.mjs +14 -3
- package/tools/testcases/list-testcases.mjs.map +1 -1
- package/tools/testcases/update-testcases.d.mts +1 -1
- package/tools/testcases/update-testcases.d.mts.map +1 -1
- package/tools/testcases/update-testcases.d.ts +1 -1
- package/tools/testcases/update-testcases.d.ts.map +1 -1
- package/tools/testcases/update-testcases.js +14 -3
- package/tools/testcases/update-testcases.js.map +1 -1
- package/tools/testcases/update-testcases.mjs +14 -3
- package/tools/testcases/update-testcases.mjs.map +1 -1
- package/tools/testsets/create-testsets.d.mts +1 -1
- package/tools/testsets/create-testsets.d.mts.map +1 -1
- package/tools/testsets/create-testsets.d.ts +1 -1
- package/tools/testsets/create-testsets.d.ts.map +1 -1
- package/tools/testsets/create-testsets.js +12 -3
- package/tools/testsets/create-testsets.js.map +1 -1
- package/tools/testsets/create-testsets.mjs +12 -3
- package/tools/testsets/create-testsets.mjs.map +1 -1
- package/tools/testsets/delete-testsets.d.mts +1 -1
- package/tools/testsets/delete-testsets.d.mts.map +1 -1
- package/tools/testsets/delete-testsets.d.ts +1 -1
- package/tools/testsets/delete-testsets.d.ts.map +1 -1
- package/tools/testsets/delete-testsets.js +13 -3
- package/tools/testsets/delete-testsets.js.map +1 -1
- package/tools/testsets/delete-testsets.mjs +13 -3
- package/tools/testsets/delete-testsets.mjs.map +1 -1
- package/tools/testsets/get-testsets.d.mts +1 -1
- package/tools/testsets/get-testsets.d.mts.map +1 -1
- package/tools/testsets/get-testsets.d.ts +1 -1
- package/tools/testsets/get-testsets.d.ts.map +1 -1
- package/tools/testsets/get-testsets.js +13 -3
- package/tools/testsets/get-testsets.js.map +1 -1
- package/tools/testsets/get-testsets.mjs +13 -3
- package/tools/testsets/get-testsets.mjs.map +1 -1
- package/tools/testsets/list-testsets.d.mts +1 -1
- package/tools/testsets/list-testsets.d.mts.map +1 -1
- package/tools/testsets/list-testsets.d.ts +1 -1
- package/tools/testsets/list-testsets.d.ts.map +1 -1
- package/tools/testsets/list-testsets.js +14 -3
- package/tools/testsets/list-testsets.js.map +1 -1
- package/tools/testsets/list-testsets.mjs +14 -3
- package/tools/testsets/list-testsets.mjs.map +1 -1
- package/tools/testsets/update-testsets.d.mts +1 -1
- package/tools/testsets/update-testsets.d.mts.map +1 -1
- package/tools/testsets/update-testsets.d.ts +1 -1
- package/tools/testsets/update-testsets.d.ts.map +1 -1
- package/tools/testsets/update-testsets.js +12 -3
- package/tools/testsets/update-testsets.js.map +1 -1
- package/tools/testsets/update-testsets.mjs +12 -3
- package/tools/testsets/update-testsets.mjs.map +1 -1
- package/tools/types.d.mts +1 -1
- package/tools/types.d.mts.map +1 -1
- package/tools/types.d.ts +1 -1
- package/tools/types.d.ts.map +1 -1
- package/tools/types.js.map +1 -1
- package/tools/types.mjs.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-records.d.ts","sourceRoot":"","sources":["../../src/tools/records/create-records.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-records.d.ts","sourceRoot":"","sources":["../../src/tools/records/create-records.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,8BAA8B;OAErE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAuClB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.handler = exports.tool = exports.metadata = void 0;
|
|
5
|
+
const filtering_1 = require("scorecard-ai-mcp/filtering");
|
|
5
6
|
const types_1 = require("scorecard-ai-mcp/tools/types");
|
|
6
7
|
exports.metadata = {
|
|
7
8
|
resource: 'records',
|
|
@@ -13,7 +14,7 @@ exports.metadata = {
|
|
|
13
14
|
};
|
|
14
15
|
exports.tool = {
|
|
15
16
|
name: 'create_records',
|
|
16
|
-
description: '
|
|
17
|
+
description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate a new 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```",
|
|
17
18
|
inputSchema: {
|
|
18
19
|
type: 'object',
|
|
19
20
|
properties: {
|
|
@@ -23,25 +24,35 @@ exports.tool = {
|
|
|
23
24
|
expected: {
|
|
24
25
|
type: 'object',
|
|
25
26
|
description: 'The expected outputs for the Testcase.',
|
|
27
|
+
additionalProperties: true,
|
|
26
28
|
},
|
|
27
29
|
inputs: {
|
|
28
30
|
type: 'object',
|
|
29
31
|
description: "The actual inputs sent to the system, which should match the system's input schema.",
|
|
32
|
+
additionalProperties: true,
|
|
30
33
|
},
|
|
31
34
|
outputs: {
|
|
32
35
|
type: 'object',
|
|
33
36
|
description: 'The actual outputs from the system.',
|
|
37
|
+
additionalProperties: true,
|
|
34
38
|
},
|
|
35
39
|
testcaseId: {
|
|
36
40
|
type: 'string',
|
|
37
41
|
description: 'The ID of the Testcase.',
|
|
38
42
|
},
|
|
43
|
+
jq_filter: {
|
|
44
|
+
type: 'string',
|
|
45
|
+
title: 'jq Filter',
|
|
46
|
+
description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
47
|
+
},
|
|
39
48
|
},
|
|
49
|
+
required: ['runId', 'expected', 'inputs', 'outputs'],
|
|
40
50
|
},
|
|
51
|
+
annotations: {},
|
|
41
52
|
};
|
|
42
53
|
const handler = async (client, args) => {
|
|
43
|
-
const { runId, ...body } = args;
|
|
44
|
-
return (0, types_1.asTextContentResult)(await client.records.create(runId, body));
|
|
54
|
+
const { runId, jq_filter, ...body } = args;
|
|
55
|
+
return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.records.create(runId, body)));
|
|
45
56
|
};
|
|
46
57
|
exports.handler = handler;
|
|
47
58
|
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-records.js","sourceRoot":"","sources":["../../src/tools/records/create-records.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"create-records.js","sourceRoot":"","sources":["../../src/tools/records/create-records.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0DAAyD;AACzD,wDAA6E;AAKhE,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,uBAAuB;IACjC,WAAW,EAAE,cAAc;CAC5B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EACT,o5CAAo5C;IACt5C,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;aACf;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wCAAwC;gBACrD,oBAAoB,EAAE,IAAI;aAC3B;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,qFAAqF;gBAClG,oBAAoB,EAAE,IAAI;aAC3B;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,qCAAqC;gBAClD,oBAAoB,EAAE,IAAI;aAC3B;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yBAAyB;aACvC;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC;KACrD;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAClD,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AACrG,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { maybeFilter } from 'scorecard-ai-mcp/filtering';
|
|
2
3
|
import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
|
|
3
4
|
export const metadata = {
|
|
4
5
|
resource: 'records',
|
|
@@ -10,7 +11,7 @@ export const metadata = {
|
|
|
10
11
|
};
|
|
11
12
|
export const tool = {
|
|
12
13
|
name: 'create_records',
|
|
13
|
-
description: '
|
|
14
|
+
description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate a new 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```",
|
|
14
15
|
inputSchema: {
|
|
15
16
|
type: 'object',
|
|
16
17
|
properties: {
|
|
@@ -20,25 +21,35 @@ export const tool = {
|
|
|
20
21
|
expected: {
|
|
21
22
|
type: 'object',
|
|
22
23
|
description: 'The expected outputs for the Testcase.',
|
|
24
|
+
additionalProperties: true,
|
|
23
25
|
},
|
|
24
26
|
inputs: {
|
|
25
27
|
type: 'object',
|
|
26
28
|
description: "The actual inputs sent to the system, which should match the system's input schema.",
|
|
29
|
+
additionalProperties: true,
|
|
27
30
|
},
|
|
28
31
|
outputs: {
|
|
29
32
|
type: 'object',
|
|
30
33
|
description: 'The actual outputs from the system.',
|
|
34
|
+
additionalProperties: true,
|
|
31
35
|
},
|
|
32
36
|
testcaseId: {
|
|
33
37
|
type: 'string',
|
|
34
38
|
description: 'The ID of the Testcase.',
|
|
35
39
|
},
|
|
40
|
+
jq_filter: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
title: 'jq Filter',
|
|
43
|
+
description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
44
|
+
},
|
|
36
45
|
},
|
|
46
|
+
required: ['runId', 'expected', 'inputs', 'outputs'],
|
|
37
47
|
},
|
|
48
|
+
annotations: {},
|
|
38
49
|
};
|
|
39
50
|
export const handler = async (client, args) => {
|
|
40
|
-
const { runId, ...body } = args;
|
|
41
|
-
return asTextContentResult(await client.records.create(runId, body));
|
|
51
|
+
const { runId, jq_filter, ...body } = args;
|
|
52
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.records.create(runId, body)));
|
|
42
53
|
};
|
|
43
54
|
export default { metadata, tool, handler };
|
|
44
55
|
//# sourceMappingURL=create-records.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-records.mjs","sourceRoot":"","sources":["../../src/tools/records/create-records.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,mBAAmB,EAAE,MAAM,8BAA8B;
|
|
1
|
+
{"version":3,"file":"create-records.mjs","sourceRoot":"","sources":["../../src/tools/records/create-records.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,4BAA4B;OACjD,EAAY,mBAAmB,EAAE,MAAM,8BAA8B;AAK5E,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,uBAAuB;IACjC,WAAW,EAAE,cAAc;CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EACT,o5CAAo5C;IACt5C,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;aACf;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wCAAwC;gBACrD,oBAAoB,EAAE,IAAI;aAC3B;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,qFAAqF;gBAClG,oBAAoB,EAAE,IAAI;aAC3B;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,qCAAqC;gBAClD,oBAAoB,EAAE,IAAI;aAC3B;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yBAAyB;aACvC;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC;KACrD;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAClD,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AACrG,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Metadata } from 'scorecard-ai-mcp/tools/types';
|
|
1
2
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
-
import type { Metadata } from "..//index.mjs";
|
|
3
3
|
import Scorecard from 'scorecard-ai';
|
|
4
4
|
export declare const metadata: Metadata;
|
|
5
5
|
export declare const tool: Tool;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-runs.d.mts","sourceRoot":"","sources":["../../src/tools/runs/create-runs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-runs.d.mts","sourceRoot":"","sources":["../../src/tools/runs/create-runs.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,8BAA8B;OAErE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAmClB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Metadata } from 'scorecard-ai-mcp/tools/types';
|
|
1
2
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
-
import type { Metadata } from "..//index.js";
|
|
3
3
|
import Scorecard from 'scorecard-ai';
|
|
4
4
|
export declare const metadata: Metadata;
|
|
5
5
|
export declare const tool: Tool;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-runs.d.ts","sourceRoot":"","sources":["../../src/tools/runs/create-runs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-runs.d.ts","sourceRoot":"","sources":["../../src/tools/runs/create-runs.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,8BAA8B;OAErE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAmClB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.handler = exports.tool = exports.metadata = void 0;
|
|
5
|
+
const filtering_1 = require("scorecard-ai-mcp/filtering");
|
|
5
6
|
const types_1 = require("scorecard-ai-mcp/tools/types");
|
|
6
7
|
exports.metadata = {
|
|
7
8
|
resource: 'runs',
|
|
@@ -13,7 +14,7 @@ exports.metadata = {
|
|
|
13
14
|
};
|
|
14
15
|
exports.tool = {
|
|
15
16
|
name: 'create_runs',
|
|
16
|
-
description: '
|
|
17
|
+
description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate a new 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 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 testsetId: {\n type: 'string',\n description: 'The ID of the Testset this Run is testing.'\n },\n systemVersionId: {\n type: 'string',\n description: 'The ID of the system version this Run is using.'\n }\n },\n required: [ 'id',\n 'metricIds',\n 'status',\n 'testsetId'\n ]\n }\n }\n}\n```",
|
|
17
18
|
inputSchema: {
|
|
18
19
|
type: 'object',
|
|
19
20
|
properties: {
|
|
@@ -35,12 +36,19 @@ exports.tool = {
|
|
|
35
36
|
type: 'string',
|
|
36
37
|
description: 'The ID of the Testset this Run is testing.',
|
|
37
38
|
},
|
|
39
|
+
jq_filter: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
title: 'jq Filter',
|
|
42
|
+
description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
43
|
+
},
|
|
38
44
|
},
|
|
45
|
+
required: ['projectId', 'metricIds'],
|
|
39
46
|
},
|
|
47
|
+
annotations: {},
|
|
40
48
|
};
|
|
41
49
|
const handler = async (client, args) => {
|
|
42
|
-
const { projectId, ...body } = args;
|
|
43
|
-
return (0, types_1.asTextContentResult)(await client.runs.create(projectId, body));
|
|
50
|
+
const { projectId, jq_filter, ...body } = args;
|
|
51
|
+
return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.runs.create(projectId, body)));
|
|
44
52
|
};
|
|
45
53
|
exports.handler = handler;
|
|
46
54
|
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-runs.js","sourceRoot":"","sources":["../../src/tools/runs/create-runs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"create-runs.js","sourceRoot":"","sources":["../../src/tools/runs/create-runs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0DAAyD;AACzD,wDAA6E;AAKhE,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,MAAM;IAChB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,4BAA4B;IACtC,WAAW,EAAE,WAAW;CACzB,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,aAAa;IACnB,WAAW,EACT,04CAA04C;IAC54C,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;aACf;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,2CAA2C;gBACxD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,eAAe,EAAE;gBACf,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iDAAiD;aAC/D;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,4CAA4C;aAC1D;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC;KACrC;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACtD,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AACtG,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { maybeFilter } from 'scorecard-ai-mcp/filtering';
|
|
2
3
|
import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
|
|
3
4
|
export const metadata = {
|
|
4
5
|
resource: 'runs',
|
|
@@ -10,7 +11,7 @@ export const metadata = {
|
|
|
10
11
|
};
|
|
11
12
|
export const tool = {
|
|
12
13
|
name: 'create_runs',
|
|
13
|
-
description: '
|
|
14
|
+
description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate a new 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 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 testsetId: {\n type: 'string',\n description: 'The ID of the Testset this Run is testing.'\n },\n systemVersionId: {\n type: 'string',\n description: 'The ID of the system version this Run is using.'\n }\n },\n required: [ 'id',\n 'metricIds',\n 'status',\n 'testsetId'\n ]\n }\n }\n}\n```",
|
|
14
15
|
inputSchema: {
|
|
15
16
|
type: 'object',
|
|
16
17
|
properties: {
|
|
@@ -32,12 +33,19 @@ export const tool = {
|
|
|
32
33
|
type: 'string',
|
|
33
34
|
description: 'The ID of the Testset this Run is testing.',
|
|
34
35
|
},
|
|
36
|
+
jq_filter: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
title: 'jq Filter',
|
|
39
|
+
description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
40
|
+
},
|
|
35
41
|
},
|
|
42
|
+
required: ['projectId', 'metricIds'],
|
|
36
43
|
},
|
|
44
|
+
annotations: {},
|
|
37
45
|
};
|
|
38
46
|
export const handler = async (client, args) => {
|
|
39
|
-
const { projectId, ...body } = args;
|
|
40
|
-
return asTextContentResult(await client.runs.create(projectId, body));
|
|
47
|
+
const { projectId, jq_filter, ...body } = args;
|
|
48
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.runs.create(projectId, body)));
|
|
41
49
|
};
|
|
42
50
|
export default { metadata, tool, handler };
|
|
43
51
|
//# sourceMappingURL=create-runs.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-runs.mjs","sourceRoot":"","sources":["../../src/tools/runs/create-runs.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,mBAAmB,EAAE,MAAM,8BAA8B;
|
|
1
|
+
{"version":3,"file":"create-runs.mjs","sourceRoot":"","sources":["../../src/tools/runs/create-runs.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,4BAA4B;OACjD,EAAY,mBAAmB,EAAE,MAAM,8BAA8B;AAK5E,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,MAAM;IAChB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,4BAA4B;IACtC,WAAW,EAAE,WAAW;CACzB,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,aAAa;IACnB,WAAW,EACT,04CAA04C;IAC54C,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;aACf;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,2CAA2C;gBACxD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,eAAe,EAAE;gBACf,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iDAAiD;aAC/D;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,4CAA4C;aAC1D;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC;KACrC;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACtD,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AACtG,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Metadata } from 'scorecard-ai-mcp/tools/types';
|
|
1
2
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
-
import type { Metadata } from "..//index.mjs";
|
|
3
3
|
import Scorecard from 'scorecard-ai';
|
|
4
4
|
export declare const metadata: Metadata;
|
|
5
5
|
export declare const tool: Tool;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upsert-scores.d.mts","sourceRoot":"","sources":["../../src/tools/scores/upsert-scores.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"upsert-scores.d.mts","sourceRoot":"","sources":["../../src/tools/scores/upsert-scores.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,8BAA8B;OAErE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA+BlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Metadata } from 'scorecard-ai-mcp/tools/types';
|
|
1
2
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
-
import type { Metadata } from "..//index.js";
|
|
3
3
|
import Scorecard from 'scorecard-ai';
|
|
4
4
|
export declare const metadata: Metadata;
|
|
5
5
|
export declare const tool: Tool;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upsert-scores.d.ts","sourceRoot":"","sources":["../../src/tools/scores/upsert-scores.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"upsert-scores.d.ts","sourceRoot":"","sources":["../../src/tools/scores/upsert-scores.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,8BAA8B;OAErE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA+BlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.handler = exports.tool = exports.metadata = void 0;
|
|
5
|
+
const filtering_1 = require("scorecard-ai-mcp/filtering");
|
|
5
6
|
const types_1 = require("scorecard-ai-mcp/tools/types");
|
|
6
7
|
exports.metadata = {
|
|
7
8
|
resource: 'scores',
|
|
@@ -13,7 +14,7 @@ exports.metadata = {
|
|
|
13
14
|
};
|
|
14
15
|
exports.tool = {
|
|
15
16
|
name: 'upsert_scores',
|
|
16
|
-
description: '
|
|
17
|
+
description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate 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```",
|
|
17
18
|
inputSchema: {
|
|
18
19
|
type: 'object',
|
|
19
20
|
properties: {
|
|
@@ -26,13 +27,23 @@ exports.tool = {
|
|
|
26
27
|
score: {
|
|
27
28
|
type: 'object',
|
|
28
29
|
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.",
|
|
30
|
+
additionalProperties: true,
|
|
31
|
+
},
|
|
32
|
+
jq_filter: {
|
|
33
|
+
type: 'string',
|
|
34
|
+
title: 'jq Filter',
|
|
35
|
+
description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
29
36
|
},
|
|
30
37
|
},
|
|
38
|
+
required: ['recordId', 'metricConfigId', 'score'],
|
|
39
|
+
},
|
|
40
|
+
annotations: {
|
|
41
|
+
idempotentHint: true,
|
|
31
42
|
},
|
|
32
43
|
};
|
|
33
44
|
const handler = async (client, args) => {
|
|
34
|
-
const { metricConfigId, ...body } = args;
|
|
35
|
-
return (0, types_1.asTextContentResult)(await client.scores.upsert(metricConfigId, body));
|
|
45
|
+
const { metricConfigId, jq_filter, ...body } = args;
|
|
46
|
+
return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.scores.upsert(metricConfigId, body)));
|
|
36
47
|
};
|
|
37
48
|
exports.handler = handler;
|
|
38
49
|
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upsert-scores.js","sourceRoot":"","sources":["../../src/tools/scores/upsert-scores.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"upsert-scores.js","sourceRoot":"","sources":["../../src/tools/scores/upsert-scores.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0DAAyD;AACzD,wDAA6E;AAKhE,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,6CAA6C;IACvD,WAAW,EAAE,aAAa;CAC3B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,eAAe;IACrB,WAAW,EACT,02EAA02E;IAC52E,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;aACf;YACD,cAAc,EAAE;gBACd,IAAI,EAAE,QAAQ;aACf;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,8NAA8N;gBAChO,oBAAoB,EAAE,IAAI;aAC3B;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,UAAU,EAAE,gBAAgB,EAAE,OAAO,CAAC;KAClD;IACD,WAAW,EAAE;QACX,cAAc,EAAE,IAAI;KACrB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC3D,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAC7G,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { maybeFilter } from 'scorecard-ai-mcp/filtering';
|
|
2
3
|
import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
|
|
3
4
|
export const metadata = {
|
|
4
5
|
resource: 'scores',
|
|
@@ -10,7 +11,7 @@ export const metadata = {
|
|
|
10
11
|
};
|
|
11
12
|
export const tool = {
|
|
12
13
|
name: 'upsert_scores',
|
|
13
|
-
description: '
|
|
14
|
+
description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate 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```",
|
|
14
15
|
inputSchema: {
|
|
15
16
|
type: 'object',
|
|
16
17
|
properties: {
|
|
@@ -23,13 +24,23 @@ export const tool = {
|
|
|
23
24
|
score: {
|
|
24
25
|
type: 'object',
|
|
25
26
|
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.",
|
|
27
|
+
additionalProperties: true,
|
|
28
|
+
},
|
|
29
|
+
jq_filter: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
title: 'jq Filter',
|
|
32
|
+
description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
26
33
|
},
|
|
27
34
|
},
|
|
35
|
+
required: ['recordId', 'metricConfigId', 'score'],
|
|
36
|
+
},
|
|
37
|
+
annotations: {
|
|
38
|
+
idempotentHint: true,
|
|
28
39
|
},
|
|
29
40
|
};
|
|
30
41
|
export const handler = async (client, args) => {
|
|
31
|
-
const { metricConfigId, ...body } = args;
|
|
32
|
-
return asTextContentResult(await client.scores.upsert(metricConfigId, body));
|
|
42
|
+
const { metricConfigId, jq_filter, ...body } = args;
|
|
43
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.scores.upsert(metricConfigId, body)));
|
|
33
44
|
};
|
|
34
45
|
export default { metadata, tool, handler };
|
|
35
46
|
//# sourceMappingURL=upsert-scores.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upsert-scores.mjs","sourceRoot":"","sources":["../../src/tools/scores/upsert-scores.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,mBAAmB,EAAE,MAAM,8BAA8B;
|
|
1
|
+
{"version":3,"file":"upsert-scores.mjs","sourceRoot":"","sources":["../../src/tools/scores/upsert-scores.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,4BAA4B;OACjD,EAAY,mBAAmB,EAAE,MAAM,8BAA8B;AAK5E,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,6CAA6C;IACvD,WAAW,EAAE,aAAa;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,eAAe;IACrB,WAAW,EACT,02EAA02E;IAC52E,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;aACf;YACD,cAAc,EAAE;gBACd,IAAI,EAAE,QAAQ;aACf;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,8NAA8N;gBAChO,oBAAoB,EAAE,IAAI;aAC3B;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,UAAU,EAAE,gBAAgB,EAAE,OAAO,CAAC;KAClD;IACD,WAAW,EAAE;QACX,cAAc,EAAE,IAAI;KACrB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC3D,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAC7G,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Metadata } from 'scorecard-ai-mcp/tools/types';
|
|
1
2
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
-
import type { Metadata } from "..//index.mjs";
|
|
3
3
|
import Scorecard from 'scorecard-ai';
|
|
4
4
|
export declare const metadata: Metadata;
|
|
5
5
|
export declare const tool: Tool;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-systems.d.mts","sourceRoot":"","sources":["../../src/tools/systems/delete-systems.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete-systems.d.mts","sourceRoot":"","sources":["../../src/tools/systems/delete-systems.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,8BAA8B;OAErE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAsBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Metadata } from 'scorecard-ai-mcp/tools/types';
|
|
1
2
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
-
import type { Metadata } from "..//index.js";
|
|
3
3
|
import Scorecard from 'scorecard-ai';
|
|
4
4
|
export declare const metadata: Metadata;
|
|
5
5
|
export declare const tool: Tool;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-systems.d.ts","sourceRoot":"","sources":["../../src/tools/systems/delete-systems.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete-systems.d.ts","sourceRoot":"","sources":["../../src/tools/systems/delete-systems.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,8BAA8B;OAErE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAsBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.handler = exports.tool = exports.metadata = void 0;
|
|
5
|
+
const filtering_1 = require("scorecard-ai-mcp/filtering");
|
|
5
6
|
const types_1 = require("scorecard-ai-mcp/tools/types");
|
|
6
7
|
exports.metadata = {
|
|
7
8
|
resource: 'systems',
|
|
@@ -13,19 +14,28 @@ exports.metadata = {
|
|
|
13
14
|
};
|
|
14
15
|
exports.tool = {
|
|
15
16
|
name: 'delete_systems',
|
|
16
|
-
description: '
|
|
17
|
+
description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nDelete a system definition by ID. This will not delete associated system versions.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n success: {\n type: 'boolean',\n description: 'Whether the deletion was successful.'\n }\n },\n required: [ 'success'\n ]\n}\n```",
|
|
17
18
|
inputSchema: {
|
|
18
19
|
type: 'object',
|
|
19
20
|
properties: {
|
|
20
21
|
systemId: {
|
|
21
22
|
type: 'string',
|
|
22
23
|
},
|
|
24
|
+
jq_filter: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
title: 'jq Filter',
|
|
27
|
+
description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
28
|
+
},
|
|
23
29
|
},
|
|
30
|
+
required: ['systemId'],
|
|
31
|
+
},
|
|
32
|
+
annotations: {
|
|
33
|
+
idempotentHint: true,
|
|
24
34
|
},
|
|
25
35
|
};
|
|
26
36
|
const handler = async (client, args) => {
|
|
27
|
-
const { systemId, ...body } = args;
|
|
28
|
-
return (0, types_1.asTextContentResult)(await client.systems.delete(systemId));
|
|
37
|
+
const { systemId, jq_filter, ...body } = args;
|
|
38
|
+
return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.systems.delete(systemId)));
|
|
29
39
|
};
|
|
30
40
|
exports.handler = handler;
|
|
31
41
|
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-systems.js","sourceRoot":"","sources":["../../src/tools/systems/delete-systems.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"delete-systems.js","sourceRoot":"","sources":["../../src/tools/systems/delete-systems.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0DAAyD;AACzD,wDAA6E;AAKhE,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,QAAQ;IACpB,QAAQ,EAAE,qBAAqB;IAC/B,WAAW,EAAE,cAAc;CAC5B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EACT,0dAA0d;IAC5d,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;aACf;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,UAAU,CAAC;KACvB;IACD,WAAW,EAAE;QACX,cAAc,EAAE,IAAI;KACrB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACrD,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AAClG,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { maybeFilter } from 'scorecard-ai-mcp/filtering';
|
|
2
3
|
import { asTextContentResult } from 'scorecard-ai-mcp/tools/types';
|
|
3
4
|
export const metadata = {
|
|
4
5
|
resource: 'systems',
|
|
@@ -10,19 +11,28 @@ export const metadata = {
|
|
|
10
11
|
};
|
|
11
12
|
export const tool = {
|
|
12
13
|
name: 'delete_systems',
|
|
13
|
-
description: '
|
|
14
|
+
description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nDelete a system definition by ID. This will not delete associated system versions.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n success: {\n type: 'boolean',\n description: 'Whether the deletion was successful.'\n }\n },\n required: [ 'success'\n ]\n}\n```",
|
|
14
15
|
inputSchema: {
|
|
15
16
|
type: 'object',
|
|
16
17
|
properties: {
|
|
17
18
|
systemId: {
|
|
18
19
|
type: 'string',
|
|
19
20
|
},
|
|
21
|
+
jq_filter: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
title: 'jq Filter',
|
|
24
|
+
description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
25
|
+
},
|
|
20
26
|
},
|
|
27
|
+
required: ['systemId'],
|
|
28
|
+
},
|
|
29
|
+
annotations: {
|
|
30
|
+
idempotentHint: true,
|
|
21
31
|
},
|
|
22
32
|
};
|
|
23
33
|
export const handler = async (client, args) => {
|
|
24
|
-
const { systemId, ...body } = args;
|
|
25
|
-
return asTextContentResult(await client.systems.delete(systemId));
|
|
34
|
+
const { systemId, jq_filter, ...body } = args;
|
|
35
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.systems.delete(systemId)));
|
|
26
36
|
};
|
|
27
37
|
export default { metadata, tool, handler };
|
|
28
38
|
//# sourceMappingURL=delete-systems.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-systems.mjs","sourceRoot":"","sources":["../../src/tools/systems/delete-systems.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,mBAAmB,EAAE,MAAM,8BAA8B;
|
|
1
|
+
{"version":3,"file":"delete-systems.mjs","sourceRoot":"","sources":["../../src/tools/systems/delete-systems.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,4BAA4B;OACjD,EAAY,mBAAmB,EAAE,MAAM,8BAA8B;AAK5E,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,QAAQ;IACpB,QAAQ,EAAE,qBAAqB;IAC/B,WAAW,EAAE,cAAc;CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EACT,0dAA0d;IAC5d,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;aACf;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,UAAU,CAAC;KACvB;IACD,WAAW,EAAE;QACX,cAAc,EAAE,IAAI;KACrB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAiB,EAAE,IAAyC,EAAE,EAAE;IAC5F,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACrD,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AAClG,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Metadata } from 'scorecard-ai-mcp/tools/types';
|
|
1
2
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
-
import type { Metadata } from "..//index.mjs";
|
|
3
3
|
import Scorecard from 'scorecard-ai';
|
|
4
4
|
export declare const metadata: Metadata;
|
|
5
5
|
export declare const tool: Tool;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-systems.d.mts","sourceRoot":"","sources":["../../src/tools/systems/get-systems.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-systems.d.mts","sourceRoot":"","sources":["../../src/tools/systems/get-systems.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,8BAA8B;OAErE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAsBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Metadata } from 'scorecard-ai-mcp/tools/types';
|
|
1
2
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
-
import type { Metadata } from "..//index.js";
|
|
3
3
|
import Scorecard from 'scorecard-ai';
|
|
4
4
|
export declare const metadata: Metadata;
|
|
5
5
|
export declare const tool: Tool;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-systems.d.ts","sourceRoot":"","sources":["../../src/tools/systems/get-systems.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-systems.d.ts","sourceRoot":"","sources":["../../src/tools/systems/get-systems.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,8BAA8B;OAErE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,SAAS,MAAM,cAAc;AAEpC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAsBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAGzF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,SAAS,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK1F,wBAA2C"}
|