scorecard-ai-mcp 2.6.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +76 -194
- package/code-tool-types.d.mts +7 -9
- package/code-tool-types.d.mts.map +1 -1
- package/code-tool-types.d.ts +7 -9
- package/code-tool-types.d.ts.map +1 -1
- package/code-tool.d.mts +2 -44
- package/code-tool.d.mts.map +1 -1
- package/code-tool.d.ts +2 -44
- package/code-tool.d.ts.map +1 -1
- package/code-tool.js +60 -8
- package/code-tool.js.map +1 -1
- package/code-tool.mjs +61 -9
- package/code-tool.mjs.map +1 -1
- package/docs-search-tool.d.mts +4 -3
- package/docs-search-tool.d.mts.map +1 -1
- package/docs-search-tool.d.ts +4 -3
- package/docs-search-tool.d.ts.map +1 -1
- package/docs-search-tool.js +2 -1
- package/docs-search-tool.js.map +1 -1
- package/docs-search-tool.mjs +2 -1
- package/docs-search-tool.mjs.map +1 -1
- package/http.d.mts.map +1 -1
- package/http.d.ts.map +1 -1
- package/http.js +2 -22
- package/http.js.map +1 -1
- package/http.mjs +2 -22
- package/http.mjs.map +1 -1
- package/index.js +4 -40
- package/index.js.map +1 -1
- package/index.mjs +4 -40
- package/index.mjs.map +1 -1
- package/options.d.mts +0 -9
- package/options.d.mts.map +1 -1
- package/options.d.ts +0 -9
- package/options.d.ts.map +1 -1
- package/options.js +6 -361
- package/options.js.map +1 -1
- package/options.mjs +6 -361
- package/options.mjs.map +1 -1
- package/package.json +11 -51
- package/server.d.mts +3 -8
- package/server.d.mts.map +1 -1
- package/server.d.ts +3 -8
- package/server.d.ts.map +1 -1
- package/server.js +12 -65
- package/server.js.map +1 -1
- package/server.mjs +11 -62
- package/server.mjs.map +1 -1
- package/src/code-tool-types.ts +7 -9
- package/src/code-tool.ts +66 -12
- package/src/docs-search-tool.ts +2 -1
- package/src/http.ts +3 -24
- package/src/index.ts +5 -52
- package/src/options.ts +7 -388
- package/src/server.ts +12 -72
- package/src/stdio.ts +2 -3
- package/src/{tools/types.ts → types.ts} +1 -1
- package/stdio.d.mts +1 -2
- package/stdio.d.mts.map +1 -1
- package/stdio.d.ts +1 -2
- package/stdio.d.ts.map +1 -1
- package/stdio.js +2 -2
- package/stdio.js.map +1 -1
- package/stdio.mjs +2 -2
- package/stdio.mjs.map +1 -1
- package/{tools/types.d.mts → types.d.mts} +1 -1
- package/types.d.mts.map +1 -0
- package/{tools/types.d.ts → types.d.ts} +1 -1
- package/types.d.ts.map +1 -0
- package/types.js.map +1 -0
- package/types.mjs.map +1 -0
- package/compat.d.mts +0 -58
- package/compat.d.mts.map +0 -1
- package/compat.d.ts +0 -58
- package/compat.d.ts.map +0 -1
- package/compat.js +0 -387
- package/compat.js.map +0 -1
- package/compat.mjs +0 -378
- package/compat.mjs.map +0 -1
- package/dynamic-tools.d.mts +0 -12
- package/dynamic-tools.d.mts.map +0 -1
- package/dynamic-tools.d.ts +0 -12
- package/dynamic-tools.d.ts.map +0 -1
- package/dynamic-tools.js +0 -135
- package/dynamic-tools.js.map +0 -1
- package/dynamic-tools.mjs +0 -132
- package/dynamic-tools.mjs.map +0 -1
- package/filtering.d.mts +0 -3
- package/filtering.d.mts.map +0 -1
- package/filtering.d.ts +0 -3
- package/filtering.d.ts.map +0 -1
- package/filtering.js +0 -24
- package/filtering.js.map +0 -1
- package/filtering.mjs +0 -16
- package/filtering.mjs.map +0 -1
- package/src/compat.ts +0 -483
- package/src/dynamic-tools.ts +0 -159
- package/src/filtering.ts +0 -18
- package/src/tools/index.ts +0 -131
- package/src/tools/metrics/create-metrics.ts +0 -383
- package/src/tools/metrics/delete-metrics.ts +0 -54
- package/src/tools/metrics/get-metrics.ts +0 -46
- package/src/tools/metrics/list-metrics.ts +0 -58
- package/src/tools/metrics/update-metrics.ts +0 -383
- package/src/tools/projects/create-projects.ts +0 -57
- package/src/tools/projects/list-projects.ts +0 -62
- package/src/tools/records/create-records.ts +0 -71
- package/src/tools/records/delete-records.ts +0 -54
- package/src/tools/records/list-records.ts +0 -65
- package/src/tools/runs/create-runs.ts +0 -67
- package/src/tools/runs/get-runs.ts +0 -54
- package/src/tools/runs/list-runs.ts +0 -65
- package/src/tools/scores/upsert-scores.ts +0 -65
- package/src/tools/systems/delete-systems.ts +0 -54
- package/src/tools/systems/get-systems.ts +0 -54
- package/src/tools/systems/list-systems.ts +0 -65
- package/src/tools/systems/update-systems.ts +0 -64
- package/src/tools/systems/upsert-systems.ts +0 -66
- package/src/tools/systems/versions/get-systems-versions.ts +0 -56
- package/src/tools/systems/versions/upsert-systems-versions.ts +0 -64
- package/src/tools/testcases/create-testcases.ts +0 -67
- package/src/tools/testcases/delete-testcases.ts +0 -56
- package/src/tools/testcases/get-testcases.ts +0 -54
- package/src/tools/testcases/list-testcases.ts +0 -65
- package/src/tools/testcases/update-testcases.ts +0 -59
- package/src/tools/testsets/create-testsets.ts +0 -94
- package/src/tools/testsets/delete-testsets.ts +0 -54
- package/src/tools/testsets/get-testsets.ts +0 -54
- package/src/tools/testsets/list-testsets.ts +0 -65
- package/src/tools/testsets/update-testsets.ts +0 -94
- package/src/tools.ts +0 -1
- package/tools/index.d.mts +0 -10
- package/tools/index.d.mts.map +0 -1
- package/tools/index.d.ts +0 -10
- package/tools/index.d.ts.map +0 -1
- package/tools/index.js +0 -115
- package/tools/index.js.map +0 -1
- package/tools/index.mjs +0 -108
- package/tools/index.mjs.map +0 -1
- package/tools/metrics/create-metrics.d.mts +0 -51
- package/tools/metrics/create-metrics.d.mts.map +0 -1
- package/tools/metrics/create-metrics.d.ts +0 -51
- package/tools/metrics/create-metrics.d.ts.map +0 -1
- package/tools/metrics/create-metrics.js +0 -381
- package/tools/metrics/create-metrics.js.map +0 -1
- package/tools/metrics/create-metrics.mjs +0 -374
- package/tools/metrics/create-metrics.mjs.map +0 -1
- package/tools/metrics/delete-metrics.d.mts +0 -51
- package/tools/metrics/delete-metrics.d.mts.map +0 -1
- package/tools/metrics/delete-metrics.d.ts +0 -51
- package/tools/metrics/delete-metrics.d.ts.map +0 -1
- package/tools/metrics/delete-metrics.js +0 -54
- package/tools/metrics/delete-metrics.js.map +0 -1
- package/tools/metrics/delete-metrics.mjs +0 -47
- package/tools/metrics/delete-metrics.mjs.map +0 -1
- package/tools/metrics/get-metrics.d.mts +0 -51
- package/tools/metrics/get-metrics.d.mts.map +0 -1
- package/tools/metrics/get-metrics.d.ts +0 -51
- package/tools/metrics/get-metrics.d.ts.map +0 -1
- package/tools/metrics/get-metrics.js +0 -48
- package/tools/metrics/get-metrics.js.map +0 -1
- package/tools/metrics/get-metrics.mjs +0 -41
- package/tools/metrics/get-metrics.mjs.map +0 -1
- package/tools/metrics/list-metrics.d.mts +0 -51
- package/tools/metrics/list-metrics.d.mts.map +0 -1
- package/tools/metrics/list-metrics.d.ts +0 -51
- package/tools/metrics/list-metrics.d.ts.map +0 -1
- package/tools/metrics/list-metrics.js +0 -57
- package/tools/metrics/list-metrics.js.map +0 -1
- package/tools/metrics/list-metrics.mjs +0 -50
- package/tools/metrics/list-metrics.mjs.map +0 -1
- package/tools/metrics/update-metrics.d.mts +0 -51
- package/tools/metrics/update-metrics.d.mts.map +0 -1
- package/tools/metrics/update-metrics.d.ts +0 -51
- package/tools/metrics/update-metrics.d.ts.map +0 -1
- package/tools/metrics/update-metrics.js +0 -381
- package/tools/metrics/update-metrics.js.map +0 -1
- package/tools/metrics/update-metrics.mjs +0 -374
- package/tools/metrics/update-metrics.mjs.map +0 -1
- package/tools/projects/create-projects.d.mts +0 -51
- package/tools/projects/create-projects.d.mts.map +0 -1
- package/tools/projects/create-projects.d.ts +0 -51
- package/tools/projects/create-projects.d.ts.map +0 -1
- package/tools/projects/create-projects.js +0 -57
- package/tools/projects/create-projects.js.map +0 -1
- package/tools/projects/create-projects.mjs +0 -50
- package/tools/projects/create-projects.mjs.map +0 -1
- package/tools/projects/list-projects.d.mts +0 -51
- package/tools/projects/list-projects.d.mts.map +0 -1
- package/tools/projects/list-projects.d.ts +0 -51
- package/tools/projects/list-projects.d.ts.map +0 -1
- package/tools/projects/list-projects.js +0 -60
- package/tools/projects/list-projects.js.map +0 -1
- package/tools/projects/list-projects.mjs +0 -53
- package/tools/projects/list-projects.mjs.map +0 -1
- package/tools/records/create-records.d.mts +0 -51
- package/tools/records/create-records.d.mts.map +0 -1
- package/tools/records/create-records.d.ts +0 -51
- package/tools/records/create-records.d.ts.map +0 -1
- package/tools/records/create-records.js +0 -71
- package/tools/records/create-records.js.map +0 -1
- package/tools/records/create-records.mjs +0 -64
- package/tools/records/create-records.mjs.map +0 -1
- package/tools/records/delete-records.d.mts +0 -51
- package/tools/records/delete-records.d.mts.map +0 -1
- package/tools/records/delete-records.d.ts +0 -51
- package/tools/records/delete-records.d.ts.map +0 -1
- package/tools/records/delete-records.js +0 -54
- package/tools/records/delete-records.js.map +0 -1
- package/tools/records/delete-records.mjs +0 -47
- package/tools/records/delete-records.mjs.map +0 -1
- package/tools/records/list-records.d.mts +0 -51
- package/tools/records/list-records.d.mts.map +0 -1
- package/tools/records/list-records.d.ts +0 -51
- package/tools/records/list-records.d.ts.map +0 -1
- package/tools/records/list-records.js +0 -63
- package/tools/records/list-records.js.map +0 -1
- package/tools/records/list-records.mjs +0 -56
- package/tools/records/list-records.mjs.map +0 -1
- package/tools/runs/create-runs.d.mts +0 -51
- package/tools/runs/create-runs.d.mts.map +0 -1
- package/tools/runs/create-runs.d.ts +0 -51
- package/tools/runs/create-runs.d.ts.map +0 -1
- package/tools/runs/create-runs.js +0 -67
- package/tools/runs/create-runs.js.map +0 -1
- package/tools/runs/create-runs.mjs +0 -60
- package/tools/runs/create-runs.mjs.map +0 -1
- package/tools/runs/get-runs.d.mts +0 -51
- package/tools/runs/get-runs.d.mts.map +0 -1
- package/tools/runs/get-runs.d.ts +0 -51
- package/tools/runs/get-runs.d.ts.map +0 -1
- package/tools/runs/get-runs.js +0 -54
- package/tools/runs/get-runs.js.map +0 -1
- package/tools/runs/get-runs.mjs +0 -47
- package/tools/runs/get-runs.mjs.map +0 -1
- package/tools/runs/list-runs.d.mts +0 -51
- package/tools/runs/list-runs.d.mts.map +0 -1
- package/tools/runs/list-runs.d.ts +0 -51
- package/tools/runs/list-runs.d.ts.map +0 -1
- package/tools/runs/list-runs.js +0 -63
- package/tools/runs/list-runs.js.map +0 -1
- package/tools/runs/list-runs.mjs +0 -56
- package/tools/runs/list-runs.mjs.map +0 -1
- package/tools/scores/upsert-scores.d.mts +0 -51
- package/tools/scores/upsert-scores.d.mts.map +0 -1
- package/tools/scores/upsert-scores.d.ts +0 -51
- package/tools/scores/upsert-scores.d.ts.map +0 -1
- package/tools/scores/upsert-scores.js +0 -62
- package/tools/scores/upsert-scores.js.map +0 -1
- package/tools/scores/upsert-scores.mjs +0 -55
- package/tools/scores/upsert-scores.mjs.map +0 -1
- package/tools/systems/delete-systems.d.mts +0 -51
- package/tools/systems/delete-systems.d.mts.map +0 -1
- package/tools/systems/delete-systems.d.ts +0 -51
- package/tools/systems/delete-systems.d.ts.map +0 -1
- package/tools/systems/delete-systems.js +0 -54
- package/tools/systems/delete-systems.js.map +0 -1
- package/tools/systems/delete-systems.mjs +0 -47
- package/tools/systems/delete-systems.mjs.map +0 -1
- package/tools/systems/get-systems.d.mts +0 -51
- package/tools/systems/get-systems.d.mts.map +0 -1
- package/tools/systems/get-systems.d.ts +0 -51
- package/tools/systems/get-systems.d.ts.map +0 -1
- package/tools/systems/get-systems.js +0 -54
- package/tools/systems/get-systems.js.map +0 -1
- package/tools/systems/get-systems.mjs +0 -47
- package/tools/systems/get-systems.mjs.map +0 -1
- package/tools/systems/list-systems.d.mts +0 -51
- package/tools/systems/list-systems.d.mts.map +0 -1
- package/tools/systems/list-systems.d.ts +0 -51
- package/tools/systems/list-systems.d.ts.map +0 -1
- package/tools/systems/list-systems.js +0 -63
- package/tools/systems/list-systems.js.map +0 -1
- package/tools/systems/list-systems.mjs +0 -56
- package/tools/systems/list-systems.mjs.map +0 -1
- package/tools/systems/update-systems.d.mts +0 -51
- package/tools/systems/update-systems.d.mts.map +0 -1
- package/tools/systems/update-systems.d.ts +0 -51
- package/tools/systems/update-systems.d.ts.map +0 -1
- package/tools/systems/update-systems.js +0 -64
- package/tools/systems/update-systems.js.map +0 -1
- package/tools/systems/update-systems.mjs +0 -57
- package/tools/systems/update-systems.mjs.map +0 -1
- package/tools/systems/upsert-systems.d.mts +0 -51
- package/tools/systems/upsert-systems.d.mts.map +0 -1
- package/tools/systems/upsert-systems.d.ts +0 -51
- package/tools/systems/upsert-systems.d.ts.map +0 -1
- package/tools/systems/upsert-systems.js +0 -65
- package/tools/systems/upsert-systems.js.map +0 -1
- package/tools/systems/upsert-systems.mjs +0 -58
- package/tools/systems/upsert-systems.mjs.map +0 -1
- package/tools/systems/versions/get-systems-versions.d.mts +0 -51
- package/tools/systems/versions/get-systems-versions.d.mts.map +0 -1
- package/tools/systems/versions/get-systems-versions.d.ts +0 -51
- package/tools/systems/versions/get-systems-versions.d.ts.map +0 -1
- package/tools/systems/versions/get-systems-versions.js +0 -54
- package/tools/systems/versions/get-systems-versions.js.map +0 -1
- package/tools/systems/versions/get-systems-versions.mjs +0 -47
- package/tools/systems/versions/get-systems-versions.mjs.map +0 -1
- package/tools/systems/versions/upsert-systems-versions.d.mts +0 -51
- package/tools/systems/versions/upsert-systems-versions.d.mts.map +0 -1
- package/tools/systems/versions/upsert-systems-versions.d.ts +0 -51
- package/tools/systems/versions/upsert-systems-versions.d.ts.map +0 -1
- package/tools/systems/versions/upsert-systems-versions.js +0 -61
- package/tools/systems/versions/upsert-systems-versions.js.map +0 -1
- package/tools/systems/versions/upsert-systems-versions.mjs +0 -54
- package/tools/systems/versions/upsert-systems-versions.mjs.map +0 -1
- package/tools/testcases/create-testcases.d.mts +0 -51
- package/tools/testcases/create-testcases.d.mts.map +0 -1
- package/tools/testcases/create-testcases.d.ts +0 -51
- package/tools/testcases/create-testcases.d.ts.map +0 -1
- package/tools/testcases/create-testcases.js +0 -67
- package/tools/testcases/create-testcases.js.map +0 -1
- package/tools/testcases/create-testcases.mjs +0 -60
- package/tools/testcases/create-testcases.mjs.map +0 -1
- package/tools/testcases/delete-testcases.d.mts +0 -51
- package/tools/testcases/delete-testcases.d.mts.map +0 -1
- package/tools/testcases/delete-testcases.d.ts +0 -51
- package/tools/testcases/delete-testcases.d.ts.map +0 -1
- package/tools/testcases/delete-testcases.js +0 -56
- package/tools/testcases/delete-testcases.js.map +0 -1
- package/tools/testcases/delete-testcases.mjs +0 -49
- package/tools/testcases/delete-testcases.mjs.map +0 -1
- package/tools/testcases/get-testcases.d.mts +0 -51
- package/tools/testcases/get-testcases.d.mts.map +0 -1
- package/tools/testcases/get-testcases.d.ts +0 -51
- package/tools/testcases/get-testcases.d.ts.map +0 -1
- package/tools/testcases/get-testcases.js +0 -54
- package/tools/testcases/get-testcases.js.map +0 -1
- package/tools/testcases/get-testcases.mjs +0 -47
- package/tools/testcases/get-testcases.mjs.map +0 -1
- package/tools/testcases/list-testcases.d.mts +0 -51
- package/tools/testcases/list-testcases.d.mts.map +0 -1
- package/tools/testcases/list-testcases.d.ts +0 -51
- package/tools/testcases/list-testcases.d.ts.map +0 -1
- package/tools/testcases/list-testcases.js +0 -63
- package/tools/testcases/list-testcases.js.map +0 -1
- package/tools/testcases/list-testcases.mjs +0 -56
- package/tools/testcases/list-testcases.mjs.map +0 -1
- package/tools/testcases/update-testcases.d.mts +0 -51
- package/tools/testcases/update-testcases.d.mts.map +0 -1
- package/tools/testcases/update-testcases.d.ts +0 -51
- package/tools/testcases/update-testcases.d.ts.map +0 -1
- package/tools/testcases/update-testcases.js +0 -59
- package/tools/testcases/update-testcases.js.map +0 -1
- package/tools/testcases/update-testcases.mjs +0 -52
- package/tools/testcases/update-testcases.mjs.map +0 -1
- package/tools/testsets/create-testsets.d.mts +0 -51
- package/tools/testsets/create-testsets.d.mts.map +0 -1
- package/tools/testsets/create-testsets.d.ts +0 -51
- package/tools/testsets/create-testsets.d.ts.map +0 -1
- package/tools/testsets/create-testsets.js +0 -93
- package/tools/testsets/create-testsets.js.map +0 -1
- package/tools/testsets/create-testsets.mjs +0 -86
- package/tools/testsets/create-testsets.mjs.map +0 -1
- package/tools/testsets/delete-testsets.d.mts +0 -51
- package/tools/testsets/delete-testsets.d.mts.map +0 -1
- package/tools/testsets/delete-testsets.d.ts +0 -51
- package/tools/testsets/delete-testsets.d.ts.map +0 -1
- package/tools/testsets/delete-testsets.js +0 -54
- package/tools/testsets/delete-testsets.js.map +0 -1
- package/tools/testsets/delete-testsets.mjs +0 -47
- package/tools/testsets/delete-testsets.mjs.map +0 -1
- package/tools/testsets/get-testsets.d.mts +0 -51
- package/tools/testsets/get-testsets.d.mts.map +0 -1
- package/tools/testsets/get-testsets.d.ts +0 -51
- package/tools/testsets/get-testsets.d.ts.map +0 -1
- package/tools/testsets/get-testsets.js +0 -54
- package/tools/testsets/get-testsets.js.map +0 -1
- package/tools/testsets/get-testsets.mjs +0 -47
- package/tools/testsets/get-testsets.mjs.map +0 -1
- package/tools/testsets/list-testsets.d.mts +0 -51
- package/tools/testsets/list-testsets.d.mts.map +0 -1
- package/tools/testsets/list-testsets.d.ts +0 -51
- package/tools/testsets/list-testsets.d.ts.map +0 -1
- package/tools/testsets/list-testsets.js +0 -63
- package/tools/testsets/list-testsets.js.map +0 -1
- package/tools/testsets/list-testsets.mjs +0 -56
- package/tools/testsets/list-testsets.mjs.map +0 -1
- package/tools/testsets/update-testsets.d.mts +0 -51
- package/tools/testsets/update-testsets.d.mts.map +0 -1
- package/tools/testsets/update-testsets.d.ts +0 -51
- package/tools/testsets/update-testsets.d.ts.map +0 -1
- package/tools/testsets/update-testsets.js +0 -93
- package/tools/testsets/update-testsets.js.map +0 -1
- package/tools/testsets/update-testsets.mjs +0 -86
- package/tools/testsets/update-testsets.mjs.map +0 -1
- package/tools/types.d.mts.map +0 -1
- package/tools/types.d.ts.map +0 -1
- package/tools/types.js.map +0 -1
- package/tools/types.mjs.map +0 -1
- package/tools.d.mts +0 -2
- package/tools.d.mts.map +0 -1
- package/tools.d.ts +0 -2
- package/tools.d.ts.map +0 -1
- package/tools.js +0 -18
- package/tools.js.map +0 -1
- package/tools.mjs +0 -2
- package/tools.mjs.map +0 -1
- /package/{tools/types.js → types.js} +0 -0
- /package/{tools/types.mjs → types.mjs} +0 -0
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { isJqError, maybeFilter } from 'scorecard-ai-mcp/filtering';
|
|
4
|
-
import { Metadata, asErrorResult, asTextContentResult } from 'scorecard-ai-mcp/tools/types';
|
|
5
|
-
|
|
6
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
-
import Scorecard from 'scorecard-ai';
|
|
8
|
-
|
|
9
|
-
export const metadata: Metadata = {
|
|
10
|
-
resource: 'systems',
|
|
11
|
-
operation: 'write',
|
|
12
|
-
tags: [],
|
|
13
|
-
httpMethod: 'patch',
|
|
14
|
-
httpPath: '/systems/{systemId}',
|
|
15
|
-
operationId: 'updateSystem',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const tool: Tool = {
|
|
19
|
-
name: 'update_systems',
|
|
20
|
-
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nUpdate an existing system. Only the fields provided in the request body will be updated.\nIf a field is provided, the new content will replace the existing content.\nIf a field is not provided, the existing content will remain unchanged.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/system',\n $defs: {\n system: {\n type: 'object',\n description: 'A System Under Test (SUT).\\n\\nSystems are templates - to run evaluations, pair them with a SystemVersion that provides specific\\nparameter values.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the system.'\n },\n description: {\n type: 'string',\n description: 'The description of the system.'\n },\n name: {\n type: 'string',\n description: 'The name of the system. Unique within the project.'\n },\n productionVersion: {\n $ref: '#/$defs/system_version'\n },\n versions: {\n type: 'array',\n description: 'The versions of the system.',\n items: {\n type: 'object',\n description: 'A SystemVersion defines the specific settings for a System Under Test.\\n\\nSystem versions contain parameter values that determine system behavior during evaluation.\\nThey are immutable snapshots - once created, they never change.\\n\\nWhen running evaluations, you reference a specific systemVersionId to establish which system version to test.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the system version.'\n },\n name: {\n type: 'string',\n description: 'The name of the system version.'\n }\n },\n required: [ 'id',\n 'name'\n ]\n }\n }\n },\n required: [ 'id',\n 'description',\n 'name',\n 'productionVersion',\n 'versions'\n ]\n },\n system_version: {\n type: 'object',\n description: 'A SystemVersion defines the specific settings for a System Under Test.\\n\\nSystem versions contain parameter values that determine system behavior during evaluation.\\nThey are immutable snapshots - once created, they never change.\\n\\nWhen running evaluations, you reference a specific systemVersionId to establish which system version to test.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the system version.'\n },\n config: {\n type: 'object',\n description: 'The configuration of the system version.',\n additionalProperties: true\n },\n name: {\n type: 'string',\n description: 'The name of the system version.'\n },\n systemId: {\n type: 'string',\n description: 'The ID of the system the system version belongs to.'\n }\n },\n required: [ 'id',\n 'config',\n 'name',\n 'systemId'\n ]\n }\n }\n}\n```",
|
|
22
|
-
inputSchema: {
|
|
23
|
-
type: 'object',
|
|
24
|
-
properties: {
|
|
25
|
-
systemId: {
|
|
26
|
-
type: 'string',
|
|
27
|
-
},
|
|
28
|
-
description: {
|
|
29
|
-
type: 'string',
|
|
30
|
-
description: 'The description of the system.',
|
|
31
|
-
},
|
|
32
|
-
name: {
|
|
33
|
-
type: 'string',
|
|
34
|
-
description: 'The name of the system. Unique within the project.',
|
|
35
|
-
},
|
|
36
|
-
productionVersionId: {
|
|
37
|
-
type: 'string',
|
|
38
|
-
description: 'The ID of the production version of the system.',
|
|
39
|
-
},
|
|
40
|
-
jq_filter: {
|
|
41
|
-
type: 'string',
|
|
42
|
-
title: 'jq Filter',
|
|
43
|
-
description:
|
|
44
|
-
'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/).',
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
required: ['systemId'],
|
|
48
|
-
},
|
|
49
|
-
annotations: {},
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
|
|
53
|
-
const { systemId, jq_filter, ...body } = args as any;
|
|
54
|
-
try {
|
|
55
|
-
return asTextContentResult(await maybeFilter(jq_filter, await client.systems.update(systemId, body)));
|
|
56
|
-
} catch (error) {
|
|
57
|
-
if (error instanceof Scorecard.APIError || isJqError(error)) {
|
|
58
|
-
return asErrorResult(error.message);
|
|
59
|
-
}
|
|
60
|
-
throw error;
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export default { metadata, tool, handler };
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { isJqError, maybeFilter } from 'scorecard-ai-mcp/filtering';
|
|
4
|
-
import { Metadata, asErrorResult, asTextContentResult } from 'scorecard-ai-mcp/tools/types';
|
|
5
|
-
|
|
6
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
-
import Scorecard from 'scorecard-ai';
|
|
8
|
-
|
|
9
|
-
export const metadata: Metadata = {
|
|
10
|
-
resource: 'systems',
|
|
11
|
-
operation: 'write',
|
|
12
|
-
tags: [],
|
|
13
|
-
httpMethod: 'post',
|
|
14
|
-
httpPath: '/projects/{projectId}/systems',
|
|
15
|
-
operationId: 'upsertSystem',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const tool: Tool = {
|
|
19
|
-
name: 'upsert_systems',
|
|
20
|
-
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate a new system. If one with the same name in the project exists, it updates it instead.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/system',\n $defs: {\n system: {\n type: 'object',\n description: 'A System Under Test (SUT).\\n\\nSystems are templates - to run evaluations, pair them with a SystemVersion that provides specific\\nparameter values.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the system.'\n },\n description: {\n type: 'string',\n description: 'The description of the system.'\n },\n name: {\n type: 'string',\n description: 'The name of the system. Unique within the project.'\n },\n productionVersion: {\n $ref: '#/$defs/system_version'\n },\n versions: {\n type: 'array',\n description: 'The versions of the system.',\n items: {\n type: 'object',\n description: 'A SystemVersion defines the specific settings for a System Under Test.\\n\\nSystem versions contain parameter values that determine system behavior during evaluation.\\nThey are immutable snapshots - once created, they never change.\\n\\nWhen running evaluations, you reference a specific systemVersionId to establish which system version to test.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the system version.'\n },\n name: {\n type: 'string',\n description: 'The name of the system version.'\n }\n },\n required: [ 'id',\n 'name'\n ]\n }\n }\n },\n required: [ 'id',\n 'description',\n 'name',\n 'productionVersion',\n 'versions'\n ]\n },\n system_version: {\n type: 'object',\n description: 'A SystemVersion defines the specific settings for a System Under Test.\\n\\nSystem versions contain parameter values that determine system behavior during evaluation.\\nThey are immutable snapshots - once created, they never change.\\n\\nWhen running evaluations, you reference a specific systemVersionId to establish which system version to test.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the system version.'\n },\n config: {\n type: 'object',\n description: 'The configuration of the system version.',\n additionalProperties: true\n },\n name: {\n type: 'string',\n description: 'The name of the system version.'\n },\n systemId: {\n type: 'string',\n description: 'The ID of the system the system version belongs to.'\n }\n },\n required: [ 'id',\n 'config',\n 'name',\n 'systemId'\n ]\n }\n }\n}\n```",
|
|
22
|
-
inputSchema: {
|
|
23
|
-
type: 'object',
|
|
24
|
-
properties: {
|
|
25
|
-
projectId: {
|
|
26
|
-
type: 'string',
|
|
27
|
-
},
|
|
28
|
-
config: {
|
|
29
|
-
type: 'object',
|
|
30
|
-
description: 'The configuration of the system.',
|
|
31
|
-
additionalProperties: true,
|
|
32
|
-
},
|
|
33
|
-
description: {
|
|
34
|
-
type: 'string',
|
|
35
|
-
description: 'The description of the system.',
|
|
36
|
-
},
|
|
37
|
-
name: {
|
|
38
|
-
type: 'string',
|
|
39
|
-
description:
|
|
40
|
-
'The name of the system. Should be unique within the project. Default is "Default system"',
|
|
41
|
-
},
|
|
42
|
-
jq_filter: {
|
|
43
|
-
type: 'string',
|
|
44
|
-
title: 'jq Filter',
|
|
45
|
-
description:
|
|
46
|
-
'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
|
-
},
|
|
48
|
-
},
|
|
49
|
-
required: ['projectId', 'config'],
|
|
50
|
-
},
|
|
51
|
-
annotations: {},
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
|
|
55
|
-
const { projectId, jq_filter, ...body } = args as any;
|
|
56
|
-
try {
|
|
57
|
-
return asTextContentResult(await maybeFilter(jq_filter, await client.systems.upsert(projectId, body)));
|
|
58
|
-
} catch (error) {
|
|
59
|
-
if (error instanceof Scorecard.APIError || isJqError(error)) {
|
|
60
|
-
return asErrorResult(error.message);
|
|
61
|
-
}
|
|
62
|
-
throw error;
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export default { metadata, tool, handler };
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { isJqError, maybeFilter } from 'scorecard-ai-mcp/filtering';
|
|
4
|
-
import { Metadata, asErrorResult, asTextContentResult } from 'scorecard-ai-mcp/tools/types';
|
|
5
|
-
|
|
6
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
-
import Scorecard from 'scorecard-ai';
|
|
8
|
-
|
|
9
|
-
export const metadata: Metadata = {
|
|
10
|
-
resource: 'systems.versions',
|
|
11
|
-
operation: 'read',
|
|
12
|
-
tags: [],
|
|
13
|
-
httpMethod: 'get',
|
|
14
|
-
httpPath: '/systems/versions/{systemVersionId}',
|
|
15
|
-
operationId: 'getSystemVersion',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const tool: Tool = {
|
|
19
|
-
name: 'get_systems_versions',
|
|
20
|
-
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve a specific system version by ID.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/system_version',\n $defs: {\n system_version: {\n type: 'object',\n description: 'A SystemVersion defines the specific settings for a System Under Test.\\n\\nSystem versions contain parameter values that determine system behavior during evaluation.\\nThey are immutable snapshots - once created, they never change.\\n\\nWhen running evaluations, you reference a specific systemVersionId to establish which system version to test.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the system version.'\n },\n config: {\n type: 'object',\n description: 'The configuration of the system version.',\n additionalProperties: true\n },\n name: {\n type: 'string',\n description: 'The name of the system version.'\n },\n systemId: {\n type: 'string',\n description: 'The ID of the system the system version belongs to.'\n }\n },\n required: [ 'id',\n 'config',\n 'name',\n 'systemId'\n ]\n }\n }\n}\n```",
|
|
22
|
-
inputSchema: {
|
|
23
|
-
type: 'object',
|
|
24
|
-
properties: {
|
|
25
|
-
systemVersionId: {
|
|
26
|
-
type: 'string',
|
|
27
|
-
},
|
|
28
|
-
jq_filter: {
|
|
29
|
-
type: 'string',
|
|
30
|
-
title: 'jq Filter',
|
|
31
|
-
description:
|
|
32
|
-
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
required: ['systemVersionId'],
|
|
36
|
-
},
|
|
37
|
-
annotations: {
|
|
38
|
-
readOnlyHint: true,
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
|
|
43
|
-
const { systemVersionId, jq_filter, ...body } = args as any;
|
|
44
|
-
try {
|
|
45
|
-
return asTextContentResult(
|
|
46
|
-
await maybeFilter(jq_filter, await client.systems.versions.get(systemVersionId)),
|
|
47
|
-
);
|
|
48
|
-
} catch (error) {
|
|
49
|
-
if (error instanceof Scorecard.APIError || isJqError(error)) {
|
|
50
|
-
return asErrorResult(error.message);
|
|
51
|
-
}
|
|
52
|
-
throw error;
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export default { metadata, tool, handler };
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { isJqError, maybeFilter } from 'scorecard-ai-mcp/filtering';
|
|
4
|
-
import { Metadata, asErrorResult, asTextContentResult } from 'scorecard-ai-mcp/tools/types';
|
|
5
|
-
|
|
6
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
-
import Scorecard from 'scorecard-ai';
|
|
8
|
-
|
|
9
|
-
export const metadata: Metadata = {
|
|
10
|
-
resource: 'systems.versions',
|
|
11
|
-
operation: 'write',
|
|
12
|
-
tags: [],
|
|
13
|
-
httpMethod: 'post',
|
|
14
|
-
httpPath: '/systems/{systemId}/versions',
|
|
15
|
-
operationId: 'upsertSystemVersion',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const tool: Tool = {
|
|
19
|
-
name: 'upsert_systems_versions',
|
|
20
|
-
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate a new system version if it does not already exist. Does **not** set the created version to be the system's production version.\n\nIf there is already a system version with the same config, its name will be updated.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/system_version',\n $defs: {\n system_version: {\n type: 'object',\n description: 'A SystemVersion defines the specific settings for a System Under Test.\\n\\nSystem versions contain parameter values that determine system behavior during evaluation.\\nThey are immutable snapshots - once created, they never change.\\n\\nWhen running evaluations, you reference a specific systemVersionId to establish which system version to test.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the system version.'\n },\n config: {\n type: 'object',\n description: 'The configuration of the system version.',\n additionalProperties: true\n },\n name: {\n type: 'string',\n description: 'The name of the system version.'\n },\n systemId: {\n type: 'string',\n description: 'The ID of the system the system version belongs to.'\n }\n },\n required: [ 'id',\n 'config',\n 'name',\n 'systemId'\n ]\n }\n }\n}\n```",
|
|
22
|
-
inputSchema: {
|
|
23
|
-
type: 'object',
|
|
24
|
-
properties: {
|
|
25
|
-
systemId: {
|
|
26
|
-
type: 'string',
|
|
27
|
-
},
|
|
28
|
-
config: {
|
|
29
|
-
type: 'object',
|
|
30
|
-
description: 'The configuration of the system version.',
|
|
31
|
-
additionalProperties: true,
|
|
32
|
-
},
|
|
33
|
-
name: {
|
|
34
|
-
type: 'string',
|
|
35
|
-
description:
|
|
36
|
-
"The name of the system version. If creating a new system version and the name isn't provided, it will be autogenerated.",
|
|
37
|
-
},
|
|
38
|
-
jq_filter: {
|
|
39
|
-
type: 'string',
|
|
40
|
-
title: 'jq Filter',
|
|
41
|
-
description:
|
|
42
|
-
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
required: ['systemId', 'config'],
|
|
46
|
-
},
|
|
47
|
-
annotations: {},
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
|
|
51
|
-
const { systemId, jq_filter, ...body } = args as any;
|
|
52
|
-
try {
|
|
53
|
-
return asTextContentResult(
|
|
54
|
-
await maybeFilter(jq_filter, await client.systems.versions.upsert(systemId, body)),
|
|
55
|
-
);
|
|
56
|
-
} catch (error) {
|
|
57
|
-
if (error instanceof Scorecard.APIError || isJqError(error)) {
|
|
58
|
-
return asErrorResult(error.message);
|
|
59
|
-
}
|
|
60
|
-
throw error;
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export default { metadata, tool, handler };
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { isJqError, maybeFilter } from 'scorecard-ai-mcp/filtering';
|
|
4
|
-
import { Metadata, asErrorResult, asTextContentResult } from 'scorecard-ai-mcp/tools/types';
|
|
5
|
-
|
|
6
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
-
import Scorecard from 'scorecard-ai';
|
|
8
|
-
|
|
9
|
-
export const metadata: Metadata = {
|
|
10
|
-
resource: 'testcases',
|
|
11
|
-
operation: 'write',
|
|
12
|
-
tags: [],
|
|
13
|
-
httpMethod: 'post',
|
|
14
|
-
httpPath: '/testsets/{testsetId}/testcases',
|
|
15
|
-
operationId: 'createTestcases',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const tool: Tool = {
|
|
19
|
-
name: 'create_testcases',
|
|
20
|
-
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate multiple Testcases in the specified Testset.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/testcase_create_response',\n $defs: {\n testcase_create_response: {\n type: 'object',\n properties: {\n items: {\n type: 'array',\n items: {\n $ref: '#/$defs/testcase'\n }\n }\n },\n required: [ 'items'\n ]\n },\n testcase: {\n type: 'object',\n description: 'A test case in the Scorecard system. Contains JSON data that is validated against the schema defined by its Testset.\\nThe `inputs` and `expected` fields are derived from the `data` field based on the Testset\\'s `fieldMapping`, and include all mapped fields, including those with validation errors.\\nTestcases are stored regardless of validation results, with any validation errors included in the `validationErrors` field.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the Testcase.'\n },\n expected: {\n type: 'object',\n description: 'Derived from data based on the Testset\\'s fieldMapping. Contains all fields marked as expected outputs, including those with validation errors.',\n additionalProperties: true\n },\n inputs: {\n type: 'object',\n description: 'Derived from data based on the Testset\\'s fieldMapping. Contains all fields marked as inputs, including those with validation errors.',\n additionalProperties: true\n },\n jsonData: {\n type: 'object',\n description: 'The JSON data of the Testcase, which is validated against the Testset\\'s schema.',\n additionalProperties: true\n },\n testsetId: {\n type: 'string',\n description: 'The ID of the Testset this Testcase belongs to.'\n },\n validationErrors: {\n type: 'array',\n description: 'Validation errors found in the Testcase data. If present, the Testcase doesn\\'t fully conform to its Testset\\'s schema.',\n items: {\n type: 'object',\n properties: {\n message: {\n type: 'string',\n description: 'Human-readable error description.'\n },\n path: {\n type: 'string',\n description: 'JSON Pointer to the field with the validation error.'\n }\n },\n required: [ 'message',\n 'path'\n ]\n }\n }\n },\n required: [ 'id',\n 'expected',\n 'inputs',\n 'jsonData',\n 'testsetId'\n ]\n }\n }\n}\n```",
|
|
22
|
-
inputSchema: {
|
|
23
|
-
type: 'object',
|
|
24
|
-
properties: {
|
|
25
|
-
testsetId: {
|
|
26
|
-
type: 'string',
|
|
27
|
-
},
|
|
28
|
-
items: {
|
|
29
|
-
type: 'array',
|
|
30
|
-
description: 'Testcases to create (max 100).',
|
|
31
|
-
items: {
|
|
32
|
-
type: 'object',
|
|
33
|
-
properties: {
|
|
34
|
-
jsonData: {
|
|
35
|
-
type: 'object',
|
|
36
|
-
description: "The JSON data of the Testcase, which is validated against the Testset's schema.",
|
|
37
|
-
additionalProperties: true,
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
required: ['jsonData'],
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
jq_filter: {
|
|
44
|
-
type: 'string',
|
|
45
|
-
title: 'jq Filter',
|
|
46
|
-
description:
|
|
47
|
-
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
required: ['testsetId', 'items'],
|
|
51
|
-
},
|
|
52
|
-
annotations: {},
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
|
|
56
|
-
const { testsetId, jq_filter, ...body } = args as any;
|
|
57
|
-
try {
|
|
58
|
-
return asTextContentResult(await maybeFilter(jq_filter, await client.testcases.create(testsetId, body)));
|
|
59
|
-
} catch (error) {
|
|
60
|
-
if (error instanceof Scorecard.APIError || isJqError(error)) {
|
|
61
|
-
return asErrorResult(error.message);
|
|
62
|
-
}
|
|
63
|
-
throw error;
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export default { metadata, tool, handler };
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { isJqError, maybeFilter } from 'scorecard-ai-mcp/filtering';
|
|
4
|
-
import { Metadata, asErrorResult, asTextContentResult } from 'scorecard-ai-mcp/tools/types';
|
|
5
|
-
|
|
6
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
-
import Scorecard from 'scorecard-ai';
|
|
8
|
-
|
|
9
|
-
export const metadata: Metadata = {
|
|
10
|
-
resource: 'testcases',
|
|
11
|
-
operation: 'write',
|
|
12
|
-
tags: [],
|
|
13
|
-
httpMethod: 'post',
|
|
14
|
-
httpPath: '/testcases/bulk-delete',
|
|
15
|
-
operationId: 'deleteTestcases',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const tool: Tool = {
|
|
19
|
-
name: 'delete_testcases',
|
|
20
|
-
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nDelete multiple Testcases by their IDs.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/testcase_delete_response',\n $defs: {\n testcase_delete_response: {\n type: 'object',\n properties: {\n success: {\n type: 'boolean',\n description: 'Whether the deletion was successful.'\n }\n },\n required: [ 'success'\n ]\n }\n }\n}\n```",
|
|
22
|
-
inputSchema: {
|
|
23
|
-
type: 'object',
|
|
24
|
-
properties: {
|
|
25
|
-
ids: {
|
|
26
|
-
type: 'array',
|
|
27
|
-
description: 'IDs of Testcases to delete.',
|
|
28
|
-
items: {
|
|
29
|
-
type: 'string',
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
jq_filter: {
|
|
33
|
-
type: 'string',
|
|
34
|
-
title: 'jq Filter',
|
|
35
|
-
description:
|
|
36
|
-
'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/).',
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
required: ['ids'],
|
|
40
|
-
},
|
|
41
|
-
annotations: {},
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
|
|
45
|
-
const { jq_filter, ...body } = args as any;
|
|
46
|
-
try {
|
|
47
|
-
return asTextContentResult(await maybeFilter(jq_filter, await client.testcases.delete(body)));
|
|
48
|
-
} catch (error) {
|
|
49
|
-
if (error instanceof Scorecard.APIError || isJqError(error)) {
|
|
50
|
-
return asErrorResult(error.message);
|
|
51
|
-
}
|
|
52
|
-
throw error;
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export default { metadata, tool, handler };
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { isJqError, maybeFilter } from 'scorecard-ai-mcp/filtering';
|
|
4
|
-
import { Metadata, asErrorResult, asTextContentResult } from 'scorecard-ai-mcp/tools/types';
|
|
5
|
-
|
|
6
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
-
import Scorecard from 'scorecard-ai';
|
|
8
|
-
|
|
9
|
-
export const metadata: Metadata = {
|
|
10
|
-
resource: 'testcases',
|
|
11
|
-
operation: 'read',
|
|
12
|
-
tags: [],
|
|
13
|
-
httpMethod: 'get',
|
|
14
|
-
httpPath: '/testcases/{testcaseId}',
|
|
15
|
-
operationId: 'getTestcase',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const tool: Tool = {
|
|
19
|
-
name: 'get_testcases',
|
|
20
|
-
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve a specific Testcase by ID.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/testcase',\n $defs: {\n testcase: {\n type: 'object',\n description: 'A test case in the Scorecard system. Contains JSON data that is validated against the schema defined by its Testset.\\nThe `inputs` and `expected` fields are derived from the `data` field based on the Testset\\'s `fieldMapping`, and include all mapped fields, including those with validation errors.\\nTestcases are stored regardless of validation results, with any validation errors included in the `validationErrors` field.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the Testcase.'\n },\n expected: {\n type: 'object',\n description: 'Derived from data based on the Testset\\'s fieldMapping. Contains all fields marked as expected outputs, including those with validation errors.',\n additionalProperties: true\n },\n inputs: {\n type: 'object',\n description: 'Derived from data based on the Testset\\'s fieldMapping. Contains all fields marked as inputs, including those with validation errors.',\n additionalProperties: true\n },\n jsonData: {\n type: 'object',\n description: 'The JSON data of the Testcase, which is validated against the Testset\\'s schema.',\n additionalProperties: true\n },\n testsetId: {\n type: 'string',\n description: 'The ID of the Testset this Testcase belongs to.'\n },\n validationErrors: {\n type: 'array',\n description: 'Validation errors found in the Testcase data. If present, the Testcase doesn\\'t fully conform to its Testset\\'s schema.',\n items: {\n type: 'object',\n properties: {\n message: {\n type: 'string',\n description: 'Human-readable error description.'\n },\n path: {\n type: 'string',\n description: 'JSON Pointer to the field with the validation error.'\n }\n },\n required: [ 'message',\n 'path'\n ]\n }\n }\n },\n required: [ 'id',\n 'expected',\n 'inputs',\n 'jsonData',\n 'testsetId'\n ]\n }\n }\n}\n```",
|
|
22
|
-
inputSchema: {
|
|
23
|
-
type: 'object',
|
|
24
|
-
properties: {
|
|
25
|
-
testcaseId: {
|
|
26
|
-
type: 'string',
|
|
27
|
-
},
|
|
28
|
-
jq_filter: {
|
|
29
|
-
type: 'string',
|
|
30
|
-
title: 'jq Filter',
|
|
31
|
-
description:
|
|
32
|
-
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
required: ['testcaseId'],
|
|
36
|
-
},
|
|
37
|
-
annotations: {
|
|
38
|
-
readOnlyHint: true,
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
|
|
43
|
-
const { testcaseId, jq_filter, ...body } = args as any;
|
|
44
|
-
try {
|
|
45
|
-
return asTextContentResult(await maybeFilter(jq_filter, await client.testcases.get(testcaseId)));
|
|
46
|
-
} catch (error) {
|
|
47
|
-
if (error instanceof Scorecard.APIError || isJqError(error)) {
|
|
48
|
-
return asErrorResult(error.message);
|
|
49
|
-
}
|
|
50
|
-
throw error;
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export default { metadata, tool, handler };
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { isJqError, maybeFilter } from 'scorecard-ai-mcp/filtering';
|
|
4
|
-
import { Metadata, asErrorResult, asTextContentResult } from 'scorecard-ai-mcp/tools/types';
|
|
5
|
-
|
|
6
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
-
import Scorecard from 'scorecard-ai';
|
|
8
|
-
|
|
9
|
-
export const metadata: Metadata = {
|
|
10
|
-
resource: 'testcases',
|
|
11
|
-
operation: 'read',
|
|
12
|
-
tags: [],
|
|
13
|
-
httpMethod: 'get',
|
|
14
|
-
httpPath: '/testsets/{testsetId}/testcases',
|
|
15
|
-
operationId: 'listTestcases',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const tool: Tool = {
|
|
19
|
-
name: 'list_testcases',
|
|
20
|
-
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve a paginated list of Testcases belonging to a Testset.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/testcase'\n }\n },\n hasMore: {\n type: 'boolean'\n },\n nextCursor: {\n type: 'string'\n },\n total: {\n type: 'integer'\n }\n },\n required: [ 'data',\n 'hasMore',\n 'nextCursor'\n ],\n $defs: {\n testcase: {\n type: 'object',\n description: 'A test case in the Scorecard system. Contains JSON data that is validated against the schema defined by its Testset.\\nThe `inputs` and `expected` fields are derived from the `data` field based on the Testset\\'s `fieldMapping`, and include all mapped fields, including those with validation errors.\\nTestcases are stored regardless of validation results, with any validation errors included in the `validationErrors` field.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the Testcase.'\n },\n expected: {\n type: 'object',\n description: 'Derived from data based on the Testset\\'s fieldMapping. Contains all fields marked as expected outputs, including those with validation errors.',\n additionalProperties: true\n },\n inputs: {\n type: 'object',\n description: 'Derived from data based on the Testset\\'s fieldMapping. Contains all fields marked as inputs, including those with validation errors.',\n additionalProperties: true\n },\n jsonData: {\n type: 'object',\n description: 'The JSON data of the Testcase, which is validated against the Testset\\'s schema.',\n additionalProperties: true\n },\n testsetId: {\n type: 'string',\n description: 'The ID of the Testset this Testcase belongs to.'\n },\n validationErrors: {\n type: 'array',\n description: 'Validation errors found in the Testcase data. If present, the Testcase doesn\\'t fully conform to its Testset\\'s schema.',\n items: {\n type: 'object',\n properties: {\n message: {\n type: 'string',\n description: 'Human-readable error description.'\n },\n path: {\n type: 'string',\n description: 'JSON Pointer to the field with the validation error.'\n }\n },\n required: [ 'message',\n 'path'\n ]\n }\n }\n },\n required: [ 'id',\n 'expected',\n 'inputs',\n 'jsonData',\n 'testsetId'\n ]\n }\n }\n}\n```",
|
|
22
|
-
inputSchema: {
|
|
23
|
-
type: 'object',
|
|
24
|
-
properties: {
|
|
25
|
-
testsetId: {
|
|
26
|
-
type: 'string',
|
|
27
|
-
},
|
|
28
|
-
cursor: {
|
|
29
|
-
type: 'string',
|
|
30
|
-
description:
|
|
31
|
-
'Cursor for pagination. Pass the `nextCursor` from the previous response to get the next page of results.',
|
|
32
|
-
},
|
|
33
|
-
limit: {
|
|
34
|
-
type: 'integer',
|
|
35
|
-
description:
|
|
36
|
-
'Maximum number of items to return (1-100). Use with `cursor` for pagination through large sets.',
|
|
37
|
-
},
|
|
38
|
-
jq_filter: {
|
|
39
|
-
type: 'string',
|
|
40
|
-
title: 'jq Filter',
|
|
41
|
-
description:
|
|
42
|
-
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
required: ['testsetId'],
|
|
46
|
-
},
|
|
47
|
-
annotations: {
|
|
48
|
-
readOnlyHint: true,
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
|
|
53
|
-
const { testsetId, jq_filter, ...body } = args as any;
|
|
54
|
-
const response = await client.testcases.list(testsetId, body).asResponse();
|
|
55
|
-
try {
|
|
56
|
-
return asTextContentResult(await maybeFilter(jq_filter, await response.json()));
|
|
57
|
-
} catch (error) {
|
|
58
|
-
if (error instanceof Scorecard.APIError || isJqError(error)) {
|
|
59
|
-
return asErrorResult(error.message);
|
|
60
|
-
}
|
|
61
|
-
throw error;
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export default { metadata, tool, handler };
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { isJqError, maybeFilter } from 'scorecard-ai-mcp/filtering';
|
|
4
|
-
import { Metadata, asErrorResult, asTextContentResult } from 'scorecard-ai-mcp/tools/types';
|
|
5
|
-
|
|
6
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
-
import Scorecard from 'scorecard-ai';
|
|
8
|
-
|
|
9
|
-
export const metadata: Metadata = {
|
|
10
|
-
resource: 'testcases',
|
|
11
|
-
operation: 'write',
|
|
12
|
-
tags: [],
|
|
13
|
-
httpMethod: 'put',
|
|
14
|
-
httpPath: '/testcases/{testcaseId}',
|
|
15
|
-
operationId: 'updateTestcase',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const tool: Tool = {
|
|
19
|
-
name: 'update_testcases',
|
|
20
|
-
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nReplace the data of an existing Testcase while keeping its ID.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/testcase',\n $defs: {\n testcase: {\n type: 'object',\n description: 'A test case in the Scorecard system. Contains JSON data that is validated against the schema defined by its Testset.\\nThe `inputs` and `expected` fields are derived from the `data` field based on the Testset\\'s `fieldMapping`, and include all mapped fields, including those with validation errors.\\nTestcases are stored regardless of validation results, with any validation errors included in the `validationErrors` field.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the Testcase.'\n },\n expected: {\n type: 'object',\n description: 'Derived from data based on the Testset\\'s fieldMapping. Contains all fields marked as expected outputs, including those with validation errors.',\n additionalProperties: true\n },\n inputs: {\n type: 'object',\n description: 'Derived from data based on the Testset\\'s fieldMapping. Contains all fields marked as inputs, including those with validation errors.',\n additionalProperties: true\n },\n jsonData: {\n type: 'object',\n description: 'The JSON data of the Testcase, which is validated against the Testset\\'s schema.',\n additionalProperties: true\n },\n testsetId: {\n type: 'string',\n description: 'The ID of the Testset this Testcase belongs to.'\n },\n validationErrors: {\n type: 'array',\n description: 'Validation errors found in the Testcase data. If present, the Testcase doesn\\'t fully conform to its Testset\\'s schema.',\n items: {\n type: 'object',\n properties: {\n message: {\n type: 'string',\n description: 'Human-readable error description.'\n },\n path: {\n type: 'string',\n description: 'JSON Pointer to the field with the validation error.'\n }\n },\n required: [ 'message',\n 'path'\n ]\n }\n }\n },\n required: [ 'id',\n 'expected',\n 'inputs',\n 'jsonData',\n 'testsetId'\n ]\n }\n }\n}\n```",
|
|
22
|
-
inputSchema: {
|
|
23
|
-
type: 'object',
|
|
24
|
-
properties: {
|
|
25
|
-
testcaseId: {
|
|
26
|
-
type: 'string',
|
|
27
|
-
},
|
|
28
|
-
jsonData: {
|
|
29
|
-
type: 'object',
|
|
30
|
-
description: "The JSON data of the Testcase, which is validated against the Testset's schema.",
|
|
31
|
-
additionalProperties: true,
|
|
32
|
-
},
|
|
33
|
-
jq_filter: {
|
|
34
|
-
type: 'string',
|
|
35
|
-
title: 'jq Filter',
|
|
36
|
-
description:
|
|
37
|
-
'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/).',
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
required: ['testcaseId', 'jsonData'],
|
|
41
|
-
},
|
|
42
|
-
annotations: {
|
|
43
|
-
idempotentHint: true,
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
|
|
48
|
-
const { testcaseId, jq_filter, ...body } = args as any;
|
|
49
|
-
try {
|
|
50
|
-
return asTextContentResult(await maybeFilter(jq_filter, await client.testcases.update(testcaseId, body)));
|
|
51
|
-
} catch (error) {
|
|
52
|
-
if (error instanceof Scorecard.APIError || isJqError(error)) {
|
|
53
|
-
return asErrorResult(error.message);
|
|
54
|
-
}
|
|
55
|
-
throw error;
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export default { metadata, tool, handler };
|