scorecard-ai-mcp 2.5.0 → 3.0.0-beta.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 +14 -225
- package/code-tool-types.d.mts +6 -7
- package/code-tool-types.d.mts.map +1 -1
- package/code-tool-types.d.ts +6 -7
- package/code-tool-types.d.ts.map +1 -1
- package/code-tool.d.mts +2 -2
- package/code-tool.d.mts.map +1 -1
- package/code-tool.d.ts +2 -2
- package/code-tool.d.ts.map +1 -1
- package/code-tool.js +54 -128
- package/code-tool.js.map +1 -1
- package/code-tool.mjs +54 -95
- package/code-tool.mjs.map +1 -1
- package/docs-search-tool.d.mts +15 -9
- package/docs-search-tool.d.mts.map +1 -1
- package/docs-search-tool.d.ts +15 -9
- package/docs-search-tool.d.ts.map +1 -1
- package/docs-search-tool.js +11 -3
- package/docs-search-tool.js.map +1 -1
- package/docs-search-tool.mjs +11 -3
- 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 +1 -18
- package/http.js.map +1 -1
- package/http.mjs +1 -18
- 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 +10 -66
- 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 +6 -5
- package/src/code-tool.ts +63 -117
- package/src/docs-search-tool.ts +15 -4
- package/src/http.ts +1 -19
- 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/code-tool-paths.cjs +0 -6
- package/code-tool-paths.cjs.map +0 -1
- package/code-tool-paths.d.cts +0 -2
- package/code-tool-paths.d.cts.map +0 -1
- package/code-tool-worker.d.mts +0 -5
- package/code-tool-worker.d.mts.map +0 -1
- package/code-tool-worker.d.ts +0 -5
- package/code-tool-worker.d.ts.map +0 -1
- package/code-tool-worker.js +0 -179
- package/code-tool-worker.js.map +0 -1
- package/code-tool-worker.mjs +0 -174
- package/code-tool-worker.mjs.map +0 -1
- 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/code-tool-paths.cts +0 -3
- package/src/code-tool-worker.ts +0 -225
- 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 -376
- package/src/tools/metrics/delete-metrics.ts +0 -54
- package/src/tools/metrics/get-metrics.ts +0 -39
- package/src/tools/metrics/list-metrics.ts +0 -51
- package/src/tools/metrics/update-metrics.ts +0 -376
- 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 -45
- package/tools/metrics/create-metrics.d.mts.map +0 -1
- package/tools/metrics/create-metrics.d.ts +0 -45
- package/tools/metrics/create-metrics.d.ts.map +0 -1
- package/tools/metrics/create-metrics.js +0 -369
- package/tools/metrics/create-metrics.js.map +0 -1
- package/tools/metrics/create-metrics.mjs +0 -365
- package/tools/metrics/create-metrics.mjs.map +0 -1
- package/tools/metrics/delete-metrics.d.mts +0 -45
- package/tools/metrics/delete-metrics.d.mts.map +0 -1
- package/tools/metrics/delete-metrics.d.ts +0 -45
- package/tools/metrics/delete-metrics.d.ts.map +0 -1
- package/tools/metrics/delete-metrics.js +0 -50
- package/tools/metrics/delete-metrics.js.map +0 -1
- package/tools/metrics/delete-metrics.mjs +0 -46
- package/tools/metrics/delete-metrics.mjs.map +0 -1
- package/tools/metrics/get-metrics.d.mts +0 -45
- package/tools/metrics/get-metrics.d.mts.map +0 -1
- package/tools/metrics/get-metrics.d.ts +0 -45
- package/tools/metrics/get-metrics.d.ts.map +0 -1
- package/tools/metrics/get-metrics.js +0 -36
- package/tools/metrics/get-metrics.js.map +0 -1
- package/tools/metrics/get-metrics.mjs +0 -32
- package/tools/metrics/get-metrics.mjs.map +0 -1
- package/tools/metrics/list-metrics.d.mts +0 -45
- package/tools/metrics/list-metrics.d.mts.map +0 -1
- package/tools/metrics/list-metrics.d.ts +0 -45
- package/tools/metrics/list-metrics.d.ts.map +0 -1
- package/tools/metrics/list-metrics.js +0 -45
- package/tools/metrics/list-metrics.js.map +0 -1
- package/tools/metrics/list-metrics.mjs +0 -41
- package/tools/metrics/list-metrics.mjs.map +0 -1
- package/tools/metrics/update-metrics.d.mts +0 -45
- package/tools/metrics/update-metrics.d.mts.map +0 -1
- package/tools/metrics/update-metrics.d.ts +0 -45
- package/tools/metrics/update-metrics.d.ts.map +0 -1
- package/tools/metrics/update-metrics.js +0 -369
- package/tools/metrics/update-metrics.js.map +0 -1
- package/tools/metrics/update-metrics.mjs +0 -365
- package/tools/metrics/update-metrics.mjs.map +0 -1
- package/tools/projects/create-projects.d.mts +0 -45
- package/tools/projects/create-projects.d.mts.map +0 -1
- package/tools/projects/create-projects.d.ts +0 -45
- package/tools/projects/create-projects.d.ts.map +0 -1
- package/tools/projects/create-projects.js +0 -53
- package/tools/projects/create-projects.js.map +0 -1
- package/tools/projects/create-projects.mjs +0 -49
- package/tools/projects/create-projects.mjs.map +0 -1
- package/tools/projects/list-projects.d.mts +0 -45
- package/tools/projects/list-projects.d.mts.map +0 -1
- package/tools/projects/list-projects.d.ts +0 -45
- package/tools/projects/list-projects.d.ts.map +0 -1
- package/tools/projects/list-projects.js +0 -56
- package/tools/projects/list-projects.js.map +0 -1
- package/tools/projects/list-projects.mjs +0 -52
- package/tools/projects/list-projects.mjs.map +0 -1
- package/tools/records/create-records.d.mts +0 -45
- package/tools/records/create-records.d.mts.map +0 -1
- package/tools/records/create-records.d.ts +0 -45
- package/tools/records/create-records.d.ts.map +0 -1
- package/tools/records/create-records.js +0 -67
- package/tools/records/create-records.js.map +0 -1
- package/tools/records/create-records.mjs +0 -63
- package/tools/records/create-records.mjs.map +0 -1
- package/tools/records/delete-records.d.mts +0 -45
- package/tools/records/delete-records.d.mts.map +0 -1
- package/tools/records/delete-records.d.ts +0 -45
- package/tools/records/delete-records.d.ts.map +0 -1
- package/tools/records/delete-records.js +0 -50
- package/tools/records/delete-records.js.map +0 -1
- package/tools/records/delete-records.mjs +0 -46
- package/tools/records/delete-records.mjs.map +0 -1
- package/tools/records/list-records.d.mts +0 -45
- package/tools/records/list-records.d.mts.map +0 -1
- package/tools/records/list-records.d.ts +0 -45
- package/tools/records/list-records.d.ts.map +0 -1
- package/tools/records/list-records.js +0 -59
- package/tools/records/list-records.js.map +0 -1
- package/tools/records/list-records.mjs +0 -55
- package/tools/records/list-records.mjs.map +0 -1
- package/tools/runs/create-runs.d.mts +0 -45
- package/tools/runs/create-runs.d.mts.map +0 -1
- package/tools/runs/create-runs.d.ts +0 -45
- package/tools/runs/create-runs.d.ts.map +0 -1
- package/tools/runs/create-runs.js +0 -63
- package/tools/runs/create-runs.js.map +0 -1
- package/tools/runs/create-runs.mjs +0 -59
- package/tools/runs/create-runs.mjs.map +0 -1
- package/tools/runs/get-runs.d.mts +0 -45
- package/tools/runs/get-runs.d.mts.map +0 -1
- package/tools/runs/get-runs.d.ts +0 -45
- package/tools/runs/get-runs.d.ts.map +0 -1
- package/tools/runs/get-runs.js +0 -50
- package/tools/runs/get-runs.js.map +0 -1
- package/tools/runs/get-runs.mjs +0 -46
- package/tools/runs/get-runs.mjs.map +0 -1
- package/tools/runs/list-runs.d.mts +0 -45
- package/tools/runs/list-runs.d.mts.map +0 -1
- package/tools/runs/list-runs.d.ts +0 -45
- package/tools/runs/list-runs.d.ts.map +0 -1
- package/tools/runs/list-runs.js +0 -59
- package/tools/runs/list-runs.js.map +0 -1
- package/tools/runs/list-runs.mjs +0 -55
- package/tools/runs/list-runs.mjs.map +0 -1
- package/tools/scores/upsert-scores.d.mts +0 -45
- package/tools/scores/upsert-scores.d.mts.map +0 -1
- package/tools/scores/upsert-scores.d.ts +0 -45
- package/tools/scores/upsert-scores.d.ts.map +0 -1
- package/tools/scores/upsert-scores.js +0 -58
- package/tools/scores/upsert-scores.js.map +0 -1
- package/tools/scores/upsert-scores.mjs +0 -54
- package/tools/scores/upsert-scores.mjs.map +0 -1
- package/tools/systems/delete-systems.d.mts +0 -45
- package/tools/systems/delete-systems.d.mts.map +0 -1
- package/tools/systems/delete-systems.d.ts +0 -45
- package/tools/systems/delete-systems.d.ts.map +0 -1
- package/tools/systems/delete-systems.js +0 -50
- package/tools/systems/delete-systems.js.map +0 -1
- package/tools/systems/delete-systems.mjs +0 -46
- package/tools/systems/delete-systems.mjs.map +0 -1
- package/tools/systems/get-systems.d.mts +0 -45
- package/tools/systems/get-systems.d.mts.map +0 -1
- package/tools/systems/get-systems.d.ts +0 -45
- package/tools/systems/get-systems.d.ts.map +0 -1
- package/tools/systems/get-systems.js +0 -50
- package/tools/systems/get-systems.js.map +0 -1
- package/tools/systems/get-systems.mjs +0 -46
- package/tools/systems/get-systems.mjs.map +0 -1
- package/tools/systems/list-systems.d.mts +0 -45
- package/tools/systems/list-systems.d.mts.map +0 -1
- package/tools/systems/list-systems.d.ts +0 -45
- package/tools/systems/list-systems.d.ts.map +0 -1
- package/tools/systems/list-systems.js +0 -59
- package/tools/systems/list-systems.js.map +0 -1
- package/tools/systems/list-systems.mjs +0 -55
- package/tools/systems/list-systems.mjs.map +0 -1
- package/tools/systems/update-systems.d.mts +0 -45
- package/tools/systems/update-systems.d.mts.map +0 -1
- package/tools/systems/update-systems.d.ts +0 -45
- package/tools/systems/update-systems.d.ts.map +0 -1
- package/tools/systems/update-systems.js +0 -60
- package/tools/systems/update-systems.js.map +0 -1
- package/tools/systems/update-systems.mjs +0 -56
- package/tools/systems/update-systems.mjs.map +0 -1
- package/tools/systems/upsert-systems.d.mts +0 -45
- package/tools/systems/upsert-systems.d.mts.map +0 -1
- package/tools/systems/upsert-systems.d.ts +0 -45
- package/tools/systems/upsert-systems.d.ts.map +0 -1
- package/tools/systems/upsert-systems.js +0 -61
- package/tools/systems/upsert-systems.js.map +0 -1
- package/tools/systems/upsert-systems.mjs +0 -57
- package/tools/systems/upsert-systems.mjs.map +0 -1
- package/tools/systems/versions/get-systems-versions.d.mts +0 -45
- package/tools/systems/versions/get-systems-versions.d.mts.map +0 -1
- package/tools/systems/versions/get-systems-versions.d.ts +0 -45
- package/tools/systems/versions/get-systems-versions.d.ts.map +0 -1
- package/tools/systems/versions/get-systems-versions.js +0 -50
- package/tools/systems/versions/get-systems-versions.js.map +0 -1
- package/tools/systems/versions/get-systems-versions.mjs +0 -46
- package/tools/systems/versions/get-systems-versions.mjs.map +0 -1
- package/tools/systems/versions/upsert-systems-versions.d.mts +0 -45
- package/tools/systems/versions/upsert-systems-versions.d.mts.map +0 -1
- package/tools/systems/versions/upsert-systems-versions.d.ts +0 -45
- package/tools/systems/versions/upsert-systems-versions.d.ts.map +0 -1
- package/tools/systems/versions/upsert-systems-versions.js +0 -57
- package/tools/systems/versions/upsert-systems-versions.js.map +0 -1
- package/tools/systems/versions/upsert-systems-versions.mjs +0 -53
- package/tools/systems/versions/upsert-systems-versions.mjs.map +0 -1
- package/tools/testcases/create-testcases.d.mts +0 -45
- package/tools/testcases/create-testcases.d.mts.map +0 -1
- package/tools/testcases/create-testcases.d.ts +0 -45
- package/tools/testcases/create-testcases.d.ts.map +0 -1
- package/tools/testcases/create-testcases.js +0 -63
- package/tools/testcases/create-testcases.js.map +0 -1
- package/tools/testcases/create-testcases.mjs +0 -59
- package/tools/testcases/create-testcases.mjs.map +0 -1
- package/tools/testcases/delete-testcases.d.mts +0 -45
- package/tools/testcases/delete-testcases.d.mts.map +0 -1
- package/tools/testcases/delete-testcases.d.ts +0 -45
- package/tools/testcases/delete-testcases.d.ts.map +0 -1
- package/tools/testcases/delete-testcases.js +0 -52
- package/tools/testcases/delete-testcases.js.map +0 -1
- package/tools/testcases/delete-testcases.mjs +0 -48
- package/tools/testcases/delete-testcases.mjs.map +0 -1
- package/tools/testcases/get-testcases.d.mts +0 -45
- package/tools/testcases/get-testcases.d.mts.map +0 -1
- package/tools/testcases/get-testcases.d.ts +0 -45
- package/tools/testcases/get-testcases.d.ts.map +0 -1
- package/tools/testcases/get-testcases.js +0 -50
- package/tools/testcases/get-testcases.js.map +0 -1
- package/tools/testcases/get-testcases.mjs +0 -46
- package/tools/testcases/get-testcases.mjs.map +0 -1
- package/tools/testcases/list-testcases.d.mts +0 -45
- package/tools/testcases/list-testcases.d.mts.map +0 -1
- package/tools/testcases/list-testcases.d.ts +0 -45
- package/tools/testcases/list-testcases.d.ts.map +0 -1
- package/tools/testcases/list-testcases.js +0 -59
- package/tools/testcases/list-testcases.js.map +0 -1
- package/tools/testcases/list-testcases.mjs +0 -55
- package/tools/testcases/list-testcases.mjs.map +0 -1
- package/tools/testcases/update-testcases.d.mts +0 -45
- package/tools/testcases/update-testcases.d.mts.map +0 -1
- package/tools/testcases/update-testcases.d.ts +0 -45
- package/tools/testcases/update-testcases.d.ts.map +0 -1
- package/tools/testcases/update-testcases.js +0 -55
- package/tools/testcases/update-testcases.js.map +0 -1
- package/tools/testcases/update-testcases.mjs +0 -51
- package/tools/testcases/update-testcases.mjs.map +0 -1
- package/tools/testsets/create-testsets.d.mts +0 -45
- package/tools/testsets/create-testsets.d.mts.map +0 -1
- package/tools/testsets/create-testsets.d.ts +0 -45
- package/tools/testsets/create-testsets.d.ts.map +0 -1
- package/tools/testsets/create-testsets.js +0 -89
- package/tools/testsets/create-testsets.js.map +0 -1
- package/tools/testsets/create-testsets.mjs +0 -85
- package/tools/testsets/create-testsets.mjs.map +0 -1
- package/tools/testsets/delete-testsets.d.mts +0 -45
- package/tools/testsets/delete-testsets.d.mts.map +0 -1
- package/tools/testsets/delete-testsets.d.ts +0 -45
- package/tools/testsets/delete-testsets.d.ts.map +0 -1
- package/tools/testsets/delete-testsets.js +0 -50
- package/tools/testsets/delete-testsets.js.map +0 -1
- package/tools/testsets/delete-testsets.mjs +0 -46
- package/tools/testsets/delete-testsets.mjs.map +0 -1
- package/tools/testsets/get-testsets.d.mts +0 -45
- package/tools/testsets/get-testsets.d.mts.map +0 -1
- package/tools/testsets/get-testsets.d.ts +0 -45
- package/tools/testsets/get-testsets.d.ts.map +0 -1
- package/tools/testsets/get-testsets.js +0 -50
- package/tools/testsets/get-testsets.js.map +0 -1
- package/tools/testsets/get-testsets.mjs +0 -46
- package/tools/testsets/get-testsets.mjs.map +0 -1
- package/tools/testsets/list-testsets.d.mts +0 -45
- package/tools/testsets/list-testsets.d.mts.map +0 -1
- package/tools/testsets/list-testsets.d.ts +0 -45
- package/tools/testsets/list-testsets.d.ts.map +0 -1
- package/tools/testsets/list-testsets.js +0 -59
- package/tools/testsets/list-testsets.js.map +0 -1
- package/tools/testsets/list-testsets.mjs +0 -55
- package/tools/testsets/list-testsets.mjs.map +0 -1
- package/tools/testsets/update-testsets.d.mts +0 -45
- package/tools/testsets/update-testsets.d.mts.map +0 -1
- package/tools/testsets/update-testsets.d.ts +0 -45
- package/tools/testsets/update-testsets.d.ts.map +0 -1
- package/tools/testsets/update-testsets.js +0 -89
- package/tools/testsets/update-testsets.js.map +0 -1
- package/tools/testsets/update-testsets.mjs +0 -85
- 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,376 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { Metadata, asTextContentResult } from 'scorecard-ai-mcp/tools/types';
|
|
4
|
-
|
|
5
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
6
|
-
import Scorecard from 'scorecard-ai';
|
|
7
|
-
|
|
8
|
-
export const metadata: Metadata = {
|
|
9
|
-
resource: 'metrics',
|
|
10
|
-
operation: 'write',
|
|
11
|
-
tags: [],
|
|
12
|
-
httpMethod: 'patch',
|
|
13
|
-
httpPath: '/metrics/{metricId}',
|
|
14
|
-
operationId: 'updateMetric',
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const tool: Tool = {
|
|
18
|
-
name: 'update_metrics',
|
|
19
|
-
description:
|
|
20
|
-
'Update an existing Metric. You must specify the evalType and outputType of the metric. The structure of a metric depends on the evalType and outputType of the metric.',
|
|
21
|
-
inputSchema: {
|
|
22
|
-
type: 'object',
|
|
23
|
-
anyOf: [
|
|
24
|
-
{
|
|
25
|
-
type: 'object',
|
|
26
|
-
properties: {
|
|
27
|
-
metricId: {
|
|
28
|
-
type: 'string',
|
|
29
|
-
},
|
|
30
|
-
evalType: {
|
|
31
|
-
type: 'string',
|
|
32
|
-
description: 'AI-based evaluation type.',
|
|
33
|
-
enum: ['ai'],
|
|
34
|
-
},
|
|
35
|
-
outputType: {
|
|
36
|
-
type: 'string',
|
|
37
|
-
description: 'Integer output type.',
|
|
38
|
-
enum: ['int'],
|
|
39
|
-
},
|
|
40
|
-
description: {
|
|
41
|
-
type: 'string',
|
|
42
|
-
description: 'The description of the Metric.',
|
|
43
|
-
},
|
|
44
|
-
evalModelName: {
|
|
45
|
-
type: 'string',
|
|
46
|
-
description: 'The AI model to use for evaluation.',
|
|
47
|
-
},
|
|
48
|
-
guidelines: {
|
|
49
|
-
type: 'string',
|
|
50
|
-
description: 'Guidelines for AI evaluation on how to score the metric.',
|
|
51
|
-
},
|
|
52
|
-
name: {
|
|
53
|
-
type: 'string',
|
|
54
|
-
description: 'The name of the Metric.',
|
|
55
|
-
},
|
|
56
|
-
passingThreshold: {
|
|
57
|
-
type: 'integer',
|
|
58
|
-
description: 'The threshold for determining pass/fail from integer scores (1-5).',
|
|
59
|
-
},
|
|
60
|
-
promptTemplate: {
|
|
61
|
-
type: 'string',
|
|
62
|
-
description:
|
|
63
|
-
'The complete prompt template for AI evaluation. Should include placeholders for dynamic content.',
|
|
64
|
-
},
|
|
65
|
-
temperature: {
|
|
66
|
-
type: 'number',
|
|
67
|
-
description: 'The temperature for AI evaluation (0-2).',
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
required: ['metricId', 'evalType', 'outputType'],
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
type: 'object',
|
|
74
|
-
properties: {
|
|
75
|
-
metricId: {
|
|
76
|
-
type: 'string',
|
|
77
|
-
},
|
|
78
|
-
evalType: {
|
|
79
|
-
type: 'string',
|
|
80
|
-
description: 'Human-based evaluation type.',
|
|
81
|
-
enum: ['human'],
|
|
82
|
-
},
|
|
83
|
-
outputType: {
|
|
84
|
-
type: 'string',
|
|
85
|
-
description: 'Integer output type.',
|
|
86
|
-
enum: ['int'],
|
|
87
|
-
},
|
|
88
|
-
description: {
|
|
89
|
-
type: 'string',
|
|
90
|
-
description: 'The description of the Metric.',
|
|
91
|
-
},
|
|
92
|
-
guidelines: {
|
|
93
|
-
type: 'string',
|
|
94
|
-
description: 'Guidelines for human evaluators.',
|
|
95
|
-
},
|
|
96
|
-
name: {
|
|
97
|
-
type: 'string',
|
|
98
|
-
description: 'The name of the Metric.',
|
|
99
|
-
},
|
|
100
|
-
passingThreshold: {
|
|
101
|
-
type: 'integer',
|
|
102
|
-
description: 'The threshold for determining pass/fail from integer scores (1-5).',
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
required: ['metricId', 'evalType', 'outputType'],
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
type: 'object',
|
|
109
|
-
properties: {
|
|
110
|
-
metricId: {
|
|
111
|
-
type: 'string',
|
|
112
|
-
},
|
|
113
|
-
evalType: {
|
|
114
|
-
type: 'string',
|
|
115
|
-
description: 'Heuristic-based evaluation type.',
|
|
116
|
-
enum: ['heuristic'],
|
|
117
|
-
},
|
|
118
|
-
outputType: {
|
|
119
|
-
type: 'string',
|
|
120
|
-
description: 'Integer output type.',
|
|
121
|
-
enum: ['int'],
|
|
122
|
-
},
|
|
123
|
-
description: {
|
|
124
|
-
type: 'string',
|
|
125
|
-
description: 'The description of the Metric.',
|
|
126
|
-
},
|
|
127
|
-
guidelines: {
|
|
128
|
-
type: 'string',
|
|
129
|
-
description: 'Guidelines for heuristic evaluation logic.',
|
|
130
|
-
},
|
|
131
|
-
name: {
|
|
132
|
-
type: 'string',
|
|
133
|
-
description: 'The name of the Metric.',
|
|
134
|
-
},
|
|
135
|
-
passingThreshold: {
|
|
136
|
-
type: 'integer',
|
|
137
|
-
description: 'The threshold for determining pass/fail from integer scores (1-5).',
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
required: ['metricId', 'evalType', 'outputType'],
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
type: 'object',
|
|
144
|
-
properties: {
|
|
145
|
-
metricId: {
|
|
146
|
-
type: 'string',
|
|
147
|
-
},
|
|
148
|
-
evalType: {
|
|
149
|
-
type: 'string',
|
|
150
|
-
description: 'AI-based evaluation type.',
|
|
151
|
-
enum: ['ai'],
|
|
152
|
-
},
|
|
153
|
-
outputType: {
|
|
154
|
-
type: 'string',
|
|
155
|
-
description: 'Float output type (0-1).',
|
|
156
|
-
enum: ['float'],
|
|
157
|
-
},
|
|
158
|
-
description: {
|
|
159
|
-
type: 'string',
|
|
160
|
-
description: 'The description of the Metric.',
|
|
161
|
-
},
|
|
162
|
-
evalModelName: {
|
|
163
|
-
type: 'string',
|
|
164
|
-
description: 'The AI model to use for evaluation.',
|
|
165
|
-
},
|
|
166
|
-
guidelines: {
|
|
167
|
-
type: 'string',
|
|
168
|
-
description: 'Guidelines for AI evaluation on how to score the metric.',
|
|
169
|
-
},
|
|
170
|
-
name: {
|
|
171
|
-
type: 'string',
|
|
172
|
-
description: 'The name of the Metric.',
|
|
173
|
-
},
|
|
174
|
-
passingThreshold: {
|
|
175
|
-
type: 'number',
|
|
176
|
-
description: 'Threshold for determining pass/fail from float scores (0.0-1.0).',
|
|
177
|
-
},
|
|
178
|
-
promptTemplate: {
|
|
179
|
-
type: 'string',
|
|
180
|
-
description:
|
|
181
|
-
'The complete prompt template for AI evaluation. Should include placeholders for dynamic content.',
|
|
182
|
-
},
|
|
183
|
-
temperature: {
|
|
184
|
-
type: 'number',
|
|
185
|
-
description: 'The temperature for AI evaluation (0-2).',
|
|
186
|
-
},
|
|
187
|
-
},
|
|
188
|
-
required: ['metricId', 'evalType', 'outputType'],
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
type: 'object',
|
|
192
|
-
properties: {
|
|
193
|
-
metricId: {
|
|
194
|
-
type: 'string',
|
|
195
|
-
},
|
|
196
|
-
evalType: {
|
|
197
|
-
type: 'string',
|
|
198
|
-
description: 'Human-based evaluation type.',
|
|
199
|
-
enum: ['human'],
|
|
200
|
-
},
|
|
201
|
-
outputType: {
|
|
202
|
-
type: 'string',
|
|
203
|
-
description: 'Float output type (0-1).',
|
|
204
|
-
enum: ['float'],
|
|
205
|
-
},
|
|
206
|
-
description: {
|
|
207
|
-
type: 'string',
|
|
208
|
-
description: 'The description of the Metric.',
|
|
209
|
-
},
|
|
210
|
-
guidelines: {
|
|
211
|
-
type: 'string',
|
|
212
|
-
description: 'Guidelines for human evaluators.',
|
|
213
|
-
},
|
|
214
|
-
name: {
|
|
215
|
-
type: 'string',
|
|
216
|
-
description: 'The name of the Metric.',
|
|
217
|
-
},
|
|
218
|
-
passingThreshold: {
|
|
219
|
-
type: 'number',
|
|
220
|
-
description: 'Threshold for determining pass/fail from float scores (0.0-1.0).',
|
|
221
|
-
},
|
|
222
|
-
},
|
|
223
|
-
required: ['metricId', 'evalType', 'outputType'],
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
type: 'object',
|
|
227
|
-
properties: {
|
|
228
|
-
metricId: {
|
|
229
|
-
type: 'string',
|
|
230
|
-
},
|
|
231
|
-
evalType: {
|
|
232
|
-
type: 'string',
|
|
233
|
-
description: 'Heuristic-based evaluation type.',
|
|
234
|
-
enum: ['heuristic'],
|
|
235
|
-
},
|
|
236
|
-
outputType: {
|
|
237
|
-
type: 'string',
|
|
238
|
-
description: 'Float output type (0-1).',
|
|
239
|
-
enum: ['float'],
|
|
240
|
-
},
|
|
241
|
-
description: {
|
|
242
|
-
type: 'string',
|
|
243
|
-
description: 'The description of the Metric.',
|
|
244
|
-
},
|
|
245
|
-
guidelines: {
|
|
246
|
-
type: 'string',
|
|
247
|
-
description: 'Guidelines for heuristic evaluation logic.',
|
|
248
|
-
},
|
|
249
|
-
name: {
|
|
250
|
-
type: 'string',
|
|
251
|
-
description: 'The name of the Metric.',
|
|
252
|
-
},
|
|
253
|
-
passingThreshold: {
|
|
254
|
-
type: 'number',
|
|
255
|
-
description: 'Threshold for determining pass/fail from float scores (0.0-1.0).',
|
|
256
|
-
},
|
|
257
|
-
},
|
|
258
|
-
required: ['metricId', 'evalType', 'outputType'],
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
type: 'object',
|
|
262
|
-
properties: {
|
|
263
|
-
metricId: {
|
|
264
|
-
type: 'string',
|
|
265
|
-
},
|
|
266
|
-
evalType: {
|
|
267
|
-
type: 'string',
|
|
268
|
-
description: 'AI-based evaluation type.',
|
|
269
|
-
enum: ['ai'],
|
|
270
|
-
},
|
|
271
|
-
outputType: {
|
|
272
|
-
type: 'string',
|
|
273
|
-
description: 'Boolean output type.',
|
|
274
|
-
enum: ['boolean'],
|
|
275
|
-
},
|
|
276
|
-
description: {
|
|
277
|
-
type: 'string',
|
|
278
|
-
description: 'The description of the Metric.',
|
|
279
|
-
},
|
|
280
|
-
evalModelName: {
|
|
281
|
-
type: 'string',
|
|
282
|
-
description: 'The AI model to use for evaluation.',
|
|
283
|
-
},
|
|
284
|
-
guidelines: {
|
|
285
|
-
type: 'string',
|
|
286
|
-
description: 'Guidelines for AI evaluation on how to score the metric.',
|
|
287
|
-
},
|
|
288
|
-
name: {
|
|
289
|
-
type: 'string',
|
|
290
|
-
description: 'The name of the Metric.',
|
|
291
|
-
},
|
|
292
|
-
promptTemplate: {
|
|
293
|
-
type: 'string',
|
|
294
|
-
description:
|
|
295
|
-
'The complete prompt template for AI evaluation. Should include placeholders for dynamic content.',
|
|
296
|
-
},
|
|
297
|
-
temperature: {
|
|
298
|
-
type: 'number',
|
|
299
|
-
description: 'The temperature for AI evaluation (0-2).',
|
|
300
|
-
},
|
|
301
|
-
},
|
|
302
|
-
required: ['metricId', 'evalType', 'outputType'],
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
type: 'object',
|
|
306
|
-
properties: {
|
|
307
|
-
metricId: {
|
|
308
|
-
type: 'string',
|
|
309
|
-
},
|
|
310
|
-
evalType: {
|
|
311
|
-
type: 'string',
|
|
312
|
-
description: 'Human-based evaluation type.',
|
|
313
|
-
enum: ['human'],
|
|
314
|
-
},
|
|
315
|
-
outputType: {
|
|
316
|
-
type: 'string',
|
|
317
|
-
description: 'Boolean output type.',
|
|
318
|
-
enum: ['boolean'],
|
|
319
|
-
},
|
|
320
|
-
description: {
|
|
321
|
-
type: 'string',
|
|
322
|
-
description: 'The description of the Metric.',
|
|
323
|
-
},
|
|
324
|
-
guidelines: {
|
|
325
|
-
type: 'string',
|
|
326
|
-
description: 'Guidelines for human evaluators.',
|
|
327
|
-
},
|
|
328
|
-
name: {
|
|
329
|
-
type: 'string',
|
|
330
|
-
description: 'The name of the Metric.',
|
|
331
|
-
},
|
|
332
|
-
},
|
|
333
|
-
required: ['metricId', 'evalType', 'outputType'],
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
type: 'object',
|
|
337
|
-
properties: {
|
|
338
|
-
metricId: {
|
|
339
|
-
type: 'string',
|
|
340
|
-
},
|
|
341
|
-
evalType: {
|
|
342
|
-
type: 'string',
|
|
343
|
-
description: 'Heuristic-based evaluation type.',
|
|
344
|
-
enum: ['heuristic'],
|
|
345
|
-
},
|
|
346
|
-
outputType: {
|
|
347
|
-
type: 'string',
|
|
348
|
-
description: 'Boolean output type.',
|
|
349
|
-
enum: ['boolean'],
|
|
350
|
-
},
|
|
351
|
-
description: {
|
|
352
|
-
type: 'string',
|
|
353
|
-
description: 'The description of the Metric.',
|
|
354
|
-
},
|
|
355
|
-
guidelines: {
|
|
356
|
-
type: 'string',
|
|
357
|
-
description: 'Guidelines for heuristic evaluation logic.',
|
|
358
|
-
},
|
|
359
|
-
name: {
|
|
360
|
-
type: 'string',
|
|
361
|
-
description: 'The name of the Metric.',
|
|
362
|
-
},
|
|
363
|
-
},
|
|
364
|
-
required: ['metricId', 'evalType', 'outputType'],
|
|
365
|
-
},
|
|
366
|
-
],
|
|
367
|
-
},
|
|
368
|
-
annotations: {},
|
|
369
|
-
};
|
|
370
|
-
|
|
371
|
-
export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
|
|
372
|
-
const { metricId, ...body } = args as any;
|
|
373
|
-
return asTextContentResult(await client.metrics.update(metricId, body));
|
|
374
|
-
};
|
|
375
|
-
|
|
376
|
-
export default { metadata, tool, handler };
|
|
@@ -1,57 +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: 'projects',
|
|
11
|
-
operation: 'write',
|
|
12
|
-
tags: [],
|
|
13
|
-
httpMethod: 'post',
|
|
14
|
-
httpPath: '/projects',
|
|
15
|
-
operationId: 'createProject',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const tool: Tool = {
|
|
19
|
-
name: 'create_projects',
|
|
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 Project.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/project',\n $defs: {\n project: {\n type: 'object',\n description: 'A Project in the Scorecard system.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the Project.'\n },\n description: {\n type: 'string',\n description: 'The description of the Project.'\n },\n name: {\n type: 'string',\n description: 'The name of the Project.'\n }\n },\n required: [ 'id',\n 'description',\n 'name'\n ]\n }\n }\n}\n```",
|
|
22
|
-
inputSchema: {
|
|
23
|
-
type: 'object',
|
|
24
|
-
properties: {
|
|
25
|
-
description: {
|
|
26
|
-
type: 'string',
|
|
27
|
-
description: 'The description of the Project.',
|
|
28
|
-
},
|
|
29
|
-
name: {
|
|
30
|
-
type: 'string',
|
|
31
|
-
description: 'The name of the Project.',
|
|
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: ['description', 'name'],
|
|
41
|
-
},
|
|
42
|
-
annotations: {},
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
|
|
46
|
-
const { jq_filter, ...body } = args as any;
|
|
47
|
-
try {
|
|
48
|
-
return asTextContentResult(await maybeFilter(jq_filter, await client.projects.create(body)));
|
|
49
|
-
} catch (error) {
|
|
50
|
-
if (isJqError(error)) {
|
|
51
|
-
return asErrorResult(error.message);
|
|
52
|
-
}
|
|
53
|
-
throw error;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export default { metadata, tool, handler };
|
|
@@ -1,62 +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: 'projects',
|
|
11
|
-
operation: 'read',
|
|
12
|
-
tags: [],
|
|
13
|
-
httpMethod: 'get',
|
|
14
|
-
httpPath: '/projects',
|
|
15
|
-
operationId: 'listProjects',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const tool: Tool = {
|
|
19
|
-
name: 'list_projects',
|
|
20
|
-
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve a paginated list of all Projects. Projects are ordered by creation date, with oldest Projects first.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/project'\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 project: {\n type: 'object',\n description: 'A Project in the Scorecard system.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the Project.'\n },\n description: {\n type: 'string',\n description: 'The description of the Project.'\n },\n name: {\n type: 'string',\n description: 'The name of the Project.'\n }\n },\n required: [ 'id',\n 'description',\n 'name'\n ]\n }\n }\n}\n```",
|
|
22
|
-
inputSchema: {
|
|
23
|
-
type: 'object',
|
|
24
|
-
properties: {
|
|
25
|
-
cursor: {
|
|
26
|
-
type: 'string',
|
|
27
|
-
description:
|
|
28
|
-
'Cursor for pagination. Pass the `nextCursor` from the previous response to get the next page of results.',
|
|
29
|
-
},
|
|
30
|
-
limit: {
|
|
31
|
-
type: 'integer',
|
|
32
|
-
description:
|
|
33
|
-
'Maximum number of items to return (1-100). Use with `cursor` for pagination through large sets.',
|
|
34
|
-
},
|
|
35
|
-
jq_filter: {
|
|
36
|
-
type: 'string',
|
|
37
|
-
title: 'jq Filter',
|
|
38
|
-
description:
|
|
39
|
-
'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
|
-
},
|
|
41
|
-
},
|
|
42
|
-
required: [],
|
|
43
|
-
},
|
|
44
|
-
annotations: {
|
|
45
|
-
readOnlyHint: true,
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
|
|
50
|
-
const { jq_filter, ...body } = args as any;
|
|
51
|
-
const response = await client.projects.list(body).asResponse();
|
|
52
|
-
try {
|
|
53
|
-
return asTextContentResult(await maybeFilter(jq_filter, await response.json()));
|
|
54
|
-
} catch (error) {
|
|
55
|
-
if (isJqError(error)) {
|
|
56
|
-
return asErrorResult(error.message);
|
|
57
|
-
}
|
|
58
|
-
throw error;
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export default { metadata, tool, handler };
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { isJqError, maybeFilter } from 'scorecard-ai-mcp/filtering';
|
|
4
|
-
import { Metadata, asErrorResult, asTextContentResult } from 'scorecard-ai-mcp/tools/types';
|
|
5
|
-
|
|
6
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
-
import Scorecard from 'scorecard-ai';
|
|
8
|
-
|
|
9
|
-
export const metadata: Metadata = {
|
|
10
|
-
resource: 'records',
|
|
11
|
-
operation: 'write',
|
|
12
|
-
tags: [],
|
|
13
|
-
httpMethod: 'post',
|
|
14
|
-
httpPath: '/runs/{runId}/records',
|
|
15
|
-
operationId: 'createRecord',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const tool: Tool = {
|
|
19
|
-
name: 'create_records',
|
|
20
|
-
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate a new Record in a Run.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/record',\n $defs: {\n record: {\n type: 'object',\n description: 'A record of a system execution in the Scorecard system.',\n properties: {\n id: {\n type: 'string',\n description: 'The ID of the Record.'\n },\n expected: {\n type: 'object',\n description: 'The expected outputs for the Testcase.',\n additionalProperties: true\n },\n inputs: {\n type: 'object',\n description: 'The actual inputs sent to the system, which should match the system\\'s input schema.',\n additionalProperties: true\n },\n outputs: {\n type: 'object',\n description: 'The actual outputs from the system.',\n additionalProperties: true\n },\n runId: {\n type: 'string',\n description: 'The ID of the Run containing this Record.'\n },\n testcaseId: {\n type: 'string',\n description: 'The ID of the Testcase.'\n }\n },\n required: [ 'id',\n 'expected',\n 'inputs',\n 'outputs',\n 'runId'\n ]\n }\n }\n}\n```",
|
|
22
|
-
inputSchema: {
|
|
23
|
-
type: 'object',
|
|
24
|
-
properties: {
|
|
25
|
-
runId: {
|
|
26
|
-
type: 'string',
|
|
27
|
-
},
|
|
28
|
-
expected: {
|
|
29
|
-
type: 'object',
|
|
30
|
-
description: 'The expected outputs for the Testcase.',
|
|
31
|
-
additionalProperties: true,
|
|
32
|
-
},
|
|
33
|
-
inputs: {
|
|
34
|
-
type: 'object',
|
|
35
|
-
description: "The actual inputs sent to the system, which should match the system's input schema.",
|
|
36
|
-
additionalProperties: true,
|
|
37
|
-
},
|
|
38
|
-
outputs: {
|
|
39
|
-
type: 'object',
|
|
40
|
-
description: 'The actual outputs from the system.',
|
|
41
|
-
additionalProperties: true,
|
|
42
|
-
},
|
|
43
|
-
testcaseId: {
|
|
44
|
-
type: 'string',
|
|
45
|
-
description: 'The ID of the Testcase.',
|
|
46
|
-
},
|
|
47
|
-
jq_filter: {
|
|
48
|
-
type: 'string',
|
|
49
|
-
title: 'jq Filter',
|
|
50
|
-
description:
|
|
51
|
-
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
required: ['runId', 'expected', 'inputs', 'outputs'],
|
|
55
|
-
},
|
|
56
|
-
annotations: {},
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
|
|
60
|
-
const { runId, jq_filter, ...body } = args as any;
|
|
61
|
-
try {
|
|
62
|
-
return asTextContentResult(await maybeFilter(jq_filter, await client.records.create(runId, body)));
|
|
63
|
-
} catch (error) {
|
|
64
|
-
if (isJqError(error)) {
|
|
65
|
-
return asErrorResult(error.message);
|
|
66
|
-
}
|
|
67
|
-
throw error;
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export default { metadata, tool, handler };
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { isJqError, maybeFilter } from 'scorecard-ai-mcp/filtering';
|
|
4
|
-
import { Metadata, asErrorResult, asTextContentResult } from 'scorecard-ai-mcp/tools/types';
|
|
5
|
-
|
|
6
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
-
import Scorecard from 'scorecard-ai';
|
|
8
|
-
|
|
9
|
-
export const metadata: Metadata = {
|
|
10
|
-
resource: 'records',
|
|
11
|
-
operation: 'write',
|
|
12
|
-
tags: [],
|
|
13
|
-
httpMethod: 'delete',
|
|
14
|
-
httpPath: '/records/{recordId}',
|
|
15
|
-
operationId: 'deleteRecord',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const tool: Tool = {
|
|
19
|
-
name: 'delete_records',
|
|
20
|
-
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nDelete a specific Record by ID.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/record_delete_response',\n $defs: {\n record_delete_response: {\n type: 'object',\n properties: {\n success: {\n type: 'boolean',\n description: 'Whether the deletion was successful.'\n }\n },\n required: [ 'success'\n ]\n }\n }\n}\n```",
|
|
22
|
-
inputSchema: {
|
|
23
|
-
type: 'object',
|
|
24
|
-
properties: {
|
|
25
|
-
recordId: {
|
|
26
|
-
type: 'string',
|
|
27
|
-
},
|
|
28
|
-
jq_filter: {
|
|
29
|
-
type: 'string',
|
|
30
|
-
title: 'jq Filter',
|
|
31
|
-
description:
|
|
32
|
-
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
required: ['recordId'],
|
|
36
|
-
},
|
|
37
|
-
annotations: {
|
|
38
|
-
idempotentHint: true,
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export const handler = async (client: Scorecard, args: Record<string, unknown> | undefined) => {
|
|
43
|
-
const { recordId, jq_filter, ...body } = args as any;
|
|
44
|
-
try {
|
|
45
|
-
return asTextContentResult(await maybeFilter(jq_filter, await client.records.delete(recordId)));
|
|
46
|
-
} catch (error) {
|
|
47
|
-
if (isJqError(error)) {
|
|
48
|
-
return asErrorResult(error.message);
|
|
49
|
-
}
|
|
50
|
-
throw error;
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export default { metadata, tool, handler };
|