@langwatch/mcp-server 0.7.0 → 0.9.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/.release-please-shim +1 -0
- package/CHANGELOG.md +87 -0
- package/LICENSE +7 -0
- package/dist/archive-project-HZBRPR2S.js +19 -0
- package/dist/{archive-scenario-WJ2A7ETN.js → archive-scenario-P5RRITRM.js} +4 -4
- package/dist/{archive-suite-4JOM4SSL.js → archive-suite-NUUFD2EM.js} +4 -4
- package/dist/{assign-prompt-tag-GL7EAAF3.js → assign-prompt-tag-FKCCZPML.js} +3 -3
- package/dist/{chunk-2WPLXEKF.js → chunk-42ZHHHIJ.js} +20 -5
- package/dist/chunk-ADSJ2FDA.js +44 -0
- package/dist/{chunk-IE4M5OGE.js → chunk-BB7EOKHR.js} +2 -2
- package/dist/chunk-BBJ5WAJB.js +24 -0
- package/dist/{chunk-EGH5RPXM.js → chunk-BYWYM2RP.js} +2 -2
- package/dist/{chunk-2GT7IFWK.js → chunk-CCM4ZFGF.js} +2 -2
- package/dist/{chunk-LUMEZEHL.js → chunk-CHKCEZBP.js} +2 -2
- package/dist/{chunk-ZVS4UKN2.js → chunk-HKY3GW45.js} +2 -2
- package/dist/{chunk-EUQDVOSU.js → chunk-JHOSVOHT.js} +2 -2
- package/dist/{chunk-E5JYYU3J.js → chunk-JVLJKQJG.js} +669 -94
- package/dist/{chunk-BWWY5KEF.js → chunk-KOO5733S.js} +3 -2
- package/dist/{chunk-HYMIWO3U.js → chunk-R7C7OUVG.js} +2 -2
- package/dist/{chunk-WQG2DFHX.js → chunk-TROIWSEQ.js} +2 -2
- package/dist/{chunk-CCWCIJJ3.js → chunk-X2SEURT2.js} +2 -2
- package/dist/{chunk-4AUB2BIA.js → chunk-XC62KJIT.js} +3 -3
- package/dist/config.js +1 -1
- package/dist/{create-agent-MBOOT3XK.js → create-agent-K5Q7BFGZ.js} +4 -4
- package/dist/{create-annotation-XMV6A7ED.js → create-annotation-KN3GE3DK.js} +4 -4
- package/dist/create-api-key-OQI5PUNQ.js +26 -0
- package/dist/{create-dashboard-VRKLFVZJ.js → create-dashboard-G4QA5AXP.js} +4 -4
- package/dist/{create-dataset-7HQPZCRE.js → create-dataset-WQSC37N7.js} +4 -4
- package/dist/{create-dataset-records-2NIVFYTV.js → create-dataset-records-B4RL3FLC.js} +4 -4
- package/dist/{create-evaluator-WYFRFLRC.js → create-evaluator-YFFQIR7E.js} +4 -4
- package/dist/create-mcp-server.js +3 -2
- package/dist/create-project-CUVQ67VN.js +44 -0
- package/dist/{create-prompt-IEN7O6JT.js → create-prompt-NGXKSP4X.js} +3 -3
- package/dist/{create-prompt-tag-CAEZ45VO.js → create-prompt-tag-IUKYPVHH.js} +3 -3
- package/dist/{create-scenario-6YHSMGLP.js → create-scenario-FNBXALH3.js} +4 -4
- package/dist/{create-suite-H5XOFDE5.js → create-suite-DJEPD4ZB.js} +4 -4
- package/dist/{delete-agent-JKTNBWAA.js → delete-agent-TJI5XBBM.js} +4 -4
- package/dist/{delete-annotation-ACMDV6QO.js → delete-annotation-KRP53TUU.js} +4 -4
- package/dist/{delete-dashboard-VJSR7CRU.js → delete-dashboard-N5SZJIR3.js} +4 -4
- package/dist/{delete-dataset-RTTTWP4D.js → delete-dataset-KDUOHL2P.js} +4 -4
- package/dist/{delete-dataset-records-KNQTIPQK.js → delete-dataset-records-DM4W3PAW.js} +4 -4
- package/dist/{delete-evaluator-7FVC5WM4.js → delete-evaluator-7ZATLJOA.js} +4 -4
- package/dist/{delete-prompt-tag-ZMZUAGFW.js → delete-prompt-tag-I6HNMSVJ.js} +3 -3
- package/dist/{delete-workflow-EYQ3T4RQ.js → delete-workflow-QEO74JQR.js} +4 -4
- package/dist/{get-agent-E3QSTVKG.js → get-agent-3KDWCP5N.js} +4 -4
- package/dist/{get-analytics-2OHV763I.js → get-analytics-GPVJX7SF.js} +3 -3
- package/dist/{get-dashboard-PC7JDHH6.js → get-dashboard-YPTIE5YY.js} +4 -4
- package/dist/{get-dataset-H5IK5FVU.js → get-dataset-6DQFYITM.js} +4 -4
- package/dist/{get-evaluator-UWVUPYTM.js → get-evaluator-PCM6XQAU.js} +4 -4
- package/dist/get-project-JCMWXVLU.js +26 -0
- package/dist/{get-prompt-WZUOLLQC.js → get-prompt-5XAGWWBG.js} +3 -3
- package/dist/{get-scenario-Q6LCNUYN.js → get-scenario-7XBCDZWX.js} +4 -4
- package/dist/{get-simulation-run-Z2XKO256.js → get-simulation-run-AV24FJWI.js} +4 -4
- package/dist/{get-suite-BXK5TN7P.js → get-suite-4DBVHFEM.js} +4 -4
- package/dist/{get-trace-4EJAYVBG.js → get-trace-MRBDS3HJ.js} +3 -3
- package/dist/{get-workflow-O34QJLHD.js → get-workflow-UR4Y6UFX.js} +4 -4
- package/dist/{http-server-ISHF7NJX.js → http-server-DEGNV5EP.js} +4 -3
- package/dist/index.js +1453 -431
- package/dist/{langwatch-api-annotations-ERBG27RF.js → langwatch-api-annotations-ZJDRB4JH.js} +4 -4
- package/dist/{langwatch-api-dashboards-G6TR7VVO.js → langwatch-api-dashboards-WARLI6NF.js} +4 -4
- package/dist/{langwatch-api-monitors-WSXZLS2B.js → langwatch-api-monitors-4XKXHYCG.js} +3 -3
- package/dist/{langwatch-api-secrets-RR5DKG2X.js → langwatch-api-secrets-6SHK5G7Q.js} +3 -3
- package/dist/{langwatch-api-triggers-2RTNSWQY.js → langwatch-api-triggers-5SX6R2WU.js} +3 -3
- package/dist/langwatch-api-workflows-NLJENNXE.js +15 -0
- package/dist/{list-agents-AW3P6FJV.js → list-agents-NECO7MPI.js} +4 -4
- package/dist/{list-annotations-QNCGWPQ3.js → list-annotations-3OJEO774.js} +4 -4
- package/dist/list-api-keys-AWW7ROLB.js +37 -0
- package/dist/{list-dashboards-R7RK2IXL.js → list-dashboards-DVPVVVKW.js} +4 -4
- package/dist/{list-dataset-records-WVCSQP7P.js → list-dataset-records-I4BYORF5.js} +4 -4
- package/dist/{list-datasets-KEXRLDEU.js → list-datasets-WUAE5HGX.js} +4 -4
- package/dist/{list-evaluators-7R2LB4JH.js → list-evaluators-B6OSVAM2.js} +4 -4
- package/dist/{list-model-providers-OBYJCKBX.js → list-model-providers-NL6IP4UZ.js} +4 -4
- package/dist/list-projects-5FHMJ4PQ.js +42 -0
- package/dist/{list-prompt-tags-6LY3ZPYI.js → list-prompt-tags-Z2DD6FLQ.js} +3 -3
- package/dist/{list-prompts-VWEZ4CDE.js → list-prompts-VNXKHK7T.js} +3 -3
- package/dist/{list-scenarios-TXD4W2ZJ.js → list-scenarios-CFZHXL76.js} +4 -4
- package/dist/{list-simulation-runs-RHPOLMFI.js → list-simulation-runs-AM2BXLBW.js} +4 -4
- package/dist/{list-suites-FSGBX27Z.js → list-suites-ZDOHAAXF.js} +4 -4
- package/dist/{list-workflows-VRGEZ3EN.js → list-workflows-WBRBKLIT.js} +4 -4
- package/dist/{rename-prompt-tag-VOJJLX4M.js → rename-prompt-tag-A4RJUK7Z.js} +3 -3
- package/dist/revoke-api-key-ZSPSPF5G.js +15 -0
- package/dist/{run-agent-KTCC7TB7.js → run-agent-JFNDY7MR.js} +4 -4
- package/dist/{run-suite-BTMHGI2D.js → run-suite-TH7LO5TJ.js} +4 -4
- package/dist/{run-workflow-IGAYGKJL.js → run-workflow-CK3JP5U2.js} +4 -4
- package/dist/{search-traces-VYFUIMXH.js → search-traces-3BBVYPC3.js} +3 -3
- package/dist/{set-model-provider-W5IUI326.js → set-model-provider-WOC5FNMV.js} +4 -4
- package/dist/{update-agent-4BB7EYLR.js → update-agent-YMEV5MTL.js} +4 -4
- package/dist/{update-dataset-CXBKZ4W3.js → update-dataset-EYT5POFM.js} +4 -4
- package/dist/{update-dataset-record-HOHAMHXG.js → update-dataset-record-VFF5JTX4.js} +4 -4
- package/dist/{update-evaluator-IVOR6FTR.js → update-evaluator-6IJHFG2E.js} +4 -4
- package/dist/update-project-OIT4WPFI.js +24 -0
- package/dist/{update-prompt-OWQAKE7K.js → update-prompt-ZU2DD6KM.js} +3 -3
- package/dist/{update-scenario-GDFVILPN.js → update-scenario-3VUTPDRU.js} +4 -4
- package/dist/{update-suite-BXYUYSPT.js → update-suite-C6JFDQHL.js} +4 -4
- package/package.json +7 -7
- package/pnpm-workspace.yaml +2 -0
- package/pyproject.toml +3 -0
- package/src/__tests__/all-tools.integration.test.ts +9 -0
- package/src/__tests__/datasets.integration.test.ts +17 -0
- package/src/__tests__/datasets.unit.test.ts +4 -0
- package/src/__tests__/experiment-list-tools.unit.test.ts +157 -0
- package/src/__tests__/get-experiment-results.unit.test.ts +222 -0
- package/src/__tests__/project-api-key-tools.unit.test.ts +451 -0
- package/src/__tests__/scenario-tools.unit.test.ts +3 -0
- package/src/config.ts +2 -0
- package/src/create-mcp-server.ts +257 -13
- package/src/langwatch-api-api-keys.ts +54 -0
- package/src/langwatch-api-projects.ts +82 -0
- package/src/langwatch-api.ts +22 -4
- package/src/tools/archive-project.ts +14 -0
- package/src/tools/create-api-key.ts +29 -0
- package/src/tools/create-project.ts +45 -0
- package/src/tools/get-experiment-results.ts +273 -0
- package/src/tools/get-project.ts +20 -0
- package/src/tools/list-api-keys.ts +33 -0
- package/src/tools/list-experiment-runs.ts +142 -0
- package/src/tools/list-experiments.ts +95 -0
- package/src/tools/list-projects.ts +41 -0
- package/src/tools/revoke-api-key.ts +9 -0
- package/src/tools/{run-evaluation.ts → run-experiment.ts} +5 -5
- package/src/tools/update-project.ts +22 -0
- package/uv.lock +192 -530
- package/Dockerfile +0 -22
- package/build.js +0 -12
- package/dist/archive-scenario-WJ2A7ETN.js.map +0 -1
- package/dist/archive-suite-4JOM4SSL.js.map +0 -1
- package/dist/assign-prompt-tag-GL7EAAF3.js.map +0 -1
- package/dist/chunk-2GT7IFWK.js.map +0 -1
- package/dist/chunk-2WPLXEKF.js.map +0 -1
- package/dist/chunk-4AUB2BIA.js.map +0 -1
- package/dist/chunk-BWWY5KEF.js.map +0 -1
- package/dist/chunk-CCWCIJJ3.js.map +0 -1
- package/dist/chunk-E5JYYU3J.js.map +0 -1
- package/dist/chunk-EGH5RPXM.js.map +0 -1
- package/dist/chunk-EUQDVOSU.js.map +0 -1
- package/dist/chunk-HYMIWO3U.js.map +0 -1
- package/dist/chunk-IE4M5OGE.js.map +0 -1
- package/dist/chunk-LUMEZEHL.js.map +0 -1
- package/dist/chunk-NUFPTHKU.js.map +0 -1
- package/dist/chunk-WQG2DFHX.js.map +0 -1
- package/dist/chunk-WVI5CJ6S.js.map +0 -1
- package/dist/chunk-ZVS4UKN2.js.map +0 -1
- package/dist/chunk-ZXKLPC2E.js.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/create-agent-MBOOT3XK.js.map +0 -1
- package/dist/create-annotation-XMV6A7ED.js.map +0 -1
- package/dist/create-dashboard-VRKLFVZJ.js.map +0 -1
- package/dist/create-dataset-7HQPZCRE.js.map +0 -1
- package/dist/create-dataset-records-2NIVFYTV.js.map +0 -1
- package/dist/create-evaluator-WYFRFLRC.js.map +0 -1
- package/dist/create-mcp-server.js.map +0 -1
- package/dist/create-prompt-IEN7O6JT.js.map +0 -1
- package/dist/create-prompt-tag-CAEZ45VO.js.map +0 -1
- package/dist/create-scenario-6YHSMGLP.js.map +0 -1
- package/dist/create-suite-H5XOFDE5.js.map +0 -1
- package/dist/delete-agent-JKTNBWAA.js.map +0 -1
- package/dist/delete-annotation-ACMDV6QO.js.map +0 -1
- package/dist/delete-dashboard-VJSR7CRU.js.map +0 -1
- package/dist/delete-dataset-RTTTWP4D.js.map +0 -1
- package/dist/delete-dataset-records-KNQTIPQK.js.map +0 -1
- package/dist/delete-evaluator-7FVC5WM4.js.map +0 -1
- package/dist/delete-prompt-tag-ZMZUAGFW.js.map +0 -1
- package/dist/delete-workflow-EYQ3T4RQ.js.map +0 -1
- package/dist/discover-evaluator-schema-H23XCLNE.js.map +0 -1
- package/dist/discover-scenario-schema-MEEEVND7.js.map +0 -1
- package/dist/discover-schema-3T52ORPB.js.map +0 -1
- package/dist/get-agent-E3QSTVKG.js.map +0 -1
- package/dist/get-analytics-2OHV763I.js.map +0 -1
- package/dist/get-dashboard-PC7JDHH6.js.map +0 -1
- package/dist/get-dataset-H5IK5FVU.js.map +0 -1
- package/dist/get-evaluator-UWVUPYTM.js.map +0 -1
- package/dist/get-prompt-WZUOLLQC.js.map +0 -1
- package/dist/get-scenario-Q6LCNUYN.js.map +0 -1
- package/dist/get-simulation-run-Z2XKO256.js.map +0 -1
- package/dist/get-suite-BXK5TN7P.js.map +0 -1
- package/dist/get-trace-4EJAYVBG.js.map +0 -1
- package/dist/get-workflow-O34QJLHD.js.map +0 -1
- package/dist/http-server-ISHF7NJX.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/langwatch-api-annotations-ERBG27RF.js.map +0 -1
- package/dist/langwatch-api-dashboards-G6TR7VVO.js.map +0 -1
- package/dist/langwatch-api-monitors-WSXZLS2B.js.map +0 -1
- package/dist/langwatch-api-secrets-RR5DKG2X.js.map +0 -1
- package/dist/langwatch-api-triggers-2RTNSWQY.js.map +0 -1
- package/dist/langwatch-api-workflows-VJRIIDZ7.js +0 -15
- package/dist/langwatch-api-workflows-VJRIIDZ7.js.map +0 -1
- package/dist/list-agents-AW3P6FJV.js.map +0 -1
- package/dist/list-annotations-QNCGWPQ3.js.map +0 -1
- package/dist/list-dashboards-R7RK2IXL.js.map +0 -1
- package/dist/list-dataset-records-WVCSQP7P.js.map +0 -1
- package/dist/list-datasets-KEXRLDEU.js.map +0 -1
- package/dist/list-evaluators-7R2LB4JH.js.map +0 -1
- package/dist/list-model-providers-OBYJCKBX.js.map +0 -1
- package/dist/list-prompt-tags-6LY3ZPYI.js.map +0 -1
- package/dist/list-prompts-VWEZ4CDE.js.map +0 -1
- package/dist/list-scenarios-TXD4W2ZJ.js.map +0 -1
- package/dist/list-simulation-runs-RHPOLMFI.js.map +0 -1
- package/dist/list-suites-FSGBX27Z.js.map +0 -1
- package/dist/list-workflows-VRGEZ3EN.js.map +0 -1
- package/dist/rename-prompt-tag-VOJJLX4M.js.map +0 -1
- package/dist/run-agent-KTCC7TB7.js.map +0 -1
- package/dist/run-evaluation-2X3V3Q6L.js +0 -64
- package/dist/run-evaluation-2X3V3Q6L.js.map +0 -1
- package/dist/run-suite-BTMHGI2D.js.map +0 -1
- package/dist/run-workflow-IGAYGKJL.js.map +0 -1
- package/dist/search-traces-VYFUIMXH.js.map +0 -1
- package/dist/set-model-provider-W5IUI326.js.map +0 -1
- package/dist/update-agent-4BB7EYLR.js.map +0 -1
- package/dist/update-dataset-CXBKZ4W3.js.map +0 -1
- package/dist/update-dataset-record-HOHAMHXG.js.map +0 -1
- package/dist/update-evaluator-IVOR6FTR.js.map +0 -1
- package/dist/update-prompt-OWQAKE7K.js.map +0 -1
- package/dist/update-scenario-GDFVILPN.js.map +0 -1
- package/dist/update-suite-BXYUYSPT.js.map +0 -1
- package/tests/evaluations.ipynb +0 -649
- package/tests/fixtures/azure/azure_openai_stream_bot_expected.py +0 -102
- package/tests/fixtures/azure/azure_openai_stream_bot_input.py +0 -78
- package/tests/fixtures/dspy/dspy_bot_expected.py +0 -61
- package/tests/fixtures/dspy/dspy_bot_input.py +0 -53
- package/tests/fixtures/fastapi/fastapi_app_expected.py +0 -68
- package/tests/fixtures/fastapi/fastapi_app_input.py +0 -60
- package/tests/fixtures/fastapi/prompt_management_fastapi_expected.py +0 -114
- package/tests/fixtures/fastapi/prompt_management_fastapi_input.py +0 -88
- package/tests/fixtures/haystack/haystack_bot_expected.py +0 -141
- package/tests/fixtures/haystack/haystack_bot_input.py +0 -69
- package/tests/fixtures/langchain/langchain_bot_expected.py +0 -53
- package/tests/fixtures/langchain/langchain_bot_input.py +0 -45
- package/tests/fixtures/langchain/langchain_bot_with_memory_expected.py +0 -69
- package/tests/fixtures/langchain/langchain_bot_with_memory_input.py +0 -61
- package/tests/fixtures/langchain/langchain_rag_bot_expected.py +0 -97
- package/tests/fixtures/langchain/langchain_rag_bot_input.py +0 -77
- package/tests/fixtures/langchain/langchain_rag_bot_vertex_ai_expected.py +0 -116
- package/tests/fixtures/langchain/langchain_rag_bot_vertex_ai_input.py +0 -81
- package/tests/fixtures/langchain/langgraph_rag_bot_with_threads_expected.py +0 -331
- package/tests/fixtures/langchain/langgraph_rag_bot_with_threads_input.py +0 -106
- package/tests/fixtures/litellm/litellm_bot_expected.py +0 -40
- package/tests/fixtures/litellm/litellm_bot_input.py +0 -35
- package/tests/fixtures/openai/openai_bot_expected.py +0 -43
- package/tests/fixtures/openai/openai_bot_function_call_expected.py +0 -91
- package/tests/fixtures/openai/openai_bot_function_call_input.py +0 -82
- package/tests/fixtures/openai/openai_bot_input.py +0 -36
- package/tests/fixtures/openai/openai_bot_rag_expected.py +0 -73
- package/tests/fixtures/openai/openai_bot_rag_input.py +0 -51
- package/tests/fixtures/opentelemetry/openinference_dspy_bot_expected.py +0 -63
- package/tests/fixtures/opentelemetry/openinference_dspy_bot_input.py +0 -58
- package/tests/fixtures/opentelemetry/openinference_langchain_bot_expected.py +0 -53
- package/tests/fixtures/opentelemetry/openinference_langchain_bot_input.py +0 -52
- package/tests/fixtures/opentelemetry/openinference_openai_bot_expected.py +0 -49
- package/tests/fixtures/opentelemetry/openinference_openai_bot_input.py +0 -41
- package/tests/fixtures/opentelemetry/openllmetry_openai_bot_expected.py +0 -44
- package/tests/fixtures/opentelemetry/openllmetry_openai_bot_input.py +0 -40
- package/tests/fixtures/strands/strands_bot_expected.py +0 -84
- package/tests/fixtures/strands/strands_bot_input.py +0 -52
- package/tests/scenario-openai.test.ts +0 -160
- package/tsup.config.ts +0 -14
- package/vitest.config.js +0 -7
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
LangWatchApiError,
|
|
3
|
+
makeRequest
|
|
4
|
+
} from "./chunk-42ZHHHIJ.js";
|
|
1
5
|
import {
|
|
2
6
|
requireApiKey
|
|
3
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KOO5733S.js";
|
|
4
8
|
|
|
5
9
|
// src/create-mcp-server.ts
|
|
6
10
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
@@ -9,7 +13,7 @@ import { z as z2 } from "zod";
|
|
|
9
13
|
// package.json
|
|
10
14
|
var package_default = {
|
|
11
15
|
name: "@langwatch/mcp-server",
|
|
12
|
-
version: "0.
|
|
16
|
+
version: "0.9.0",
|
|
13
17
|
description: "An MCP server for Langwatch.",
|
|
14
18
|
type: "module",
|
|
15
19
|
main: "./dist/index.js",
|
|
@@ -51,19 +55,19 @@ var package_default = {
|
|
|
51
55
|
},
|
|
52
56
|
devDependencies: {
|
|
53
57
|
"@ai-sdk/anthropic": "^3.0.44",
|
|
54
|
-
"@anthropic-ai/claude-code": "^2.1.
|
|
55
|
-
"@eslint/js": "^
|
|
58
|
+
"@anthropic-ai/claude-code": "^2.1.119",
|
|
59
|
+
"@eslint/js": "^10.0.1",
|
|
56
60
|
"@langwatch/scenario": "^0.4.6",
|
|
57
61
|
"@types/debug": "^4.1.12",
|
|
58
62
|
"@types/eslint__js": "^8.42.3",
|
|
59
63
|
"@types/express": "^5.0.6",
|
|
60
|
-
"@types/node": "^
|
|
64
|
+
"@types/node": "^25.6.0",
|
|
61
65
|
"@types/yargs": "^17.0.33",
|
|
62
66
|
"@typescript/native-preview": "7.0.0-dev.20250911.1",
|
|
63
|
-
ai: "^6.0.
|
|
67
|
+
ai: "^6.0.161",
|
|
64
68
|
dotenv: "^17.2.2",
|
|
65
69
|
esbuild: "^0.25.0",
|
|
66
|
-
eslint: "^
|
|
70
|
+
eslint: "^10.2.1",
|
|
67
71
|
tsup: "^8.1.0",
|
|
68
72
|
tsx: "^4.20.5",
|
|
69
73
|
typescript: "^5.0.0",
|
|
@@ -72,7 +76,7 @@ var package_default = {
|
|
|
72
76
|
dependencies: {
|
|
73
77
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
74
78
|
"@opentelemetry/context-async-hooks": "^2.1.0",
|
|
75
|
-
"@opentelemetry/sdk-node": "^0.
|
|
79
|
+
"@opentelemetry/sdk-node": "^0.217.0",
|
|
76
80
|
chalk: "^5.6.2",
|
|
77
81
|
"date-fns": "^4.1.0",
|
|
78
82
|
express: "^5.2.1",
|
|
@@ -84,6 +88,13 @@ var package_default = {
|
|
|
84
88
|
},
|
|
85
89
|
bin: {
|
|
86
90
|
"langwatch-mcp-server": "./dist/index.js"
|
|
91
|
+
},
|
|
92
|
+
pnpm: {
|
|
93
|
+
overrides: {
|
|
94
|
+
protobufjs: ">=7.5.6 <8.0.0 || >=8.0.2",
|
|
95
|
+
"langsmith@<0.6.0": "0.6.0",
|
|
96
|
+
"fast-uri@<3.1.2": "3.1.2"
|
|
97
|
+
}
|
|
87
98
|
}
|
|
88
99
|
};
|
|
89
100
|
|
|
@@ -113,6 +124,379 @@ var createDatasetSchema = z.object({
|
|
|
113
124
|
columnTypes: z.array(datasetColumnDefinitionSchema).optional().describe("Column definitions for the dataset")
|
|
114
125
|
});
|
|
115
126
|
|
|
127
|
+
// src/tools/get-experiment-results.ts
|
|
128
|
+
var DEFAULT_ROW_CAP = 50;
|
|
129
|
+
var rowKey = (index, targetId) => `${index}:${targetId ?? ""}`;
|
|
130
|
+
var summarizeEntry = (entry) => {
|
|
131
|
+
const candidates = ["input", "question", "query", "prompt", "user"];
|
|
132
|
+
for (const key of candidates) {
|
|
133
|
+
const value = entry[key];
|
|
134
|
+
if (typeof value === "string" && value.length > 0) {
|
|
135
|
+
return value.length > 80 ? `${value.slice(0, 77)}...` : value;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return "";
|
|
139
|
+
};
|
|
140
|
+
var isFailedEvaluation = (e) => e.status === "error" || e.passed === false;
|
|
141
|
+
var isFailedRow = ({
|
|
142
|
+
entry,
|
|
143
|
+
evaluations
|
|
144
|
+
}) => Boolean(entry.error) || evaluations.some(isFailedEvaluation);
|
|
145
|
+
async function handleExperimentResults(params) {
|
|
146
|
+
const filter = params.filter ?? "all";
|
|
147
|
+
const evaluatorFilter = params.evaluator?.trim();
|
|
148
|
+
const limit = typeof params.limit === "number" && params.limit > 0 ? Math.min(params.limit, DEFAULT_ROW_CAP) : DEFAULT_ROW_CAP;
|
|
149
|
+
const search = new URLSearchParams();
|
|
150
|
+
if (params.experimentSlug) search.set("experimentSlug", params.experimentSlug);
|
|
151
|
+
const qs = search.toString() ? `?${search.toString()}` : "";
|
|
152
|
+
let results;
|
|
153
|
+
try {
|
|
154
|
+
results = await makeRequest(
|
|
155
|
+
"GET",
|
|
156
|
+
`/api/experiments/runs/${encodeURIComponent(params.runId)}/results${qs}`
|
|
157
|
+
);
|
|
158
|
+
} catch (error) {
|
|
159
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
160
|
+
const status = error instanceof LangWatchApiError ? error.status : error && typeof error === "object" && "status" in error && typeof error.status === "number" ? error.status : void 0;
|
|
161
|
+
if (status === 404 || status === void 0 && /404|not found/i.test(message)) {
|
|
162
|
+
return [
|
|
163
|
+
`# Evaluation Results: ${params.runId}`,
|
|
164
|
+
"",
|
|
165
|
+
"**Status**: not found",
|
|
166
|
+
"",
|
|
167
|
+
`Could not load results for run \`${params.runId}\`. The run may still be in progress, or the id may be incorrect.`,
|
|
168
|
+
"",
|
|
169
|
+
"> Try `platform_experiment_status` first to confirm the run id and that it is completed."
|
|
170
|
+
].join("\n");
|
|
171
|
+
}
|
|
172
|
+
throw error;
|
|
173
|
+
}
|
|
174
|
+
if (!results || results.timestamps.finishedAt == null && results.timestamps.stoppedAt == null) {
|
|
175
|
+
return [
|
|
176
|
+
`# Evaluation Results: ${params.runId}`,
|
|
177
|
+
"",
|
|
178
|
+
"**Status**: results are not yet available",
|
|
179
|
+
"",
|
|
180
|
+
`Results for run \`${params.runId}\` are not ready yet.`,
|
|
181
|
+
"",
|
|
182
|
+
"> Try `platform_experiment_status` first to confirm the run id and that it is completed."
|
|
183
|
+
].join("\n");
|
|
184
|
+
}
|
|
185
|
+
const evaluationsByRow = /* @__PURE__ */ new Map();
|
|
186
|
+
for (const evaluation of results.evaluations) {
|
|
187
|
+
if (evaluatorFilter && evaluation.evaluator !== evaluatorFilter) continue;
|
|
188
|
+
const key = rowKey(evaluation.index, evaluation.targetId);
|
|
189
|
+
const list = evaluationsByRow.get(key) ?? [];
|
|
190
|
+
list.push(evaluation);
|
|
191
|
+
evaluationsByRow.set(key, list);
|
|
192
|
+
}
|
|
193
|
+
const evaluatorNames = Array.from(
|
|
194
|
+
new Set(
|
|
195
|
+
(evaluatorFilter ? results.evaluations.filter((e) => e.evaluator === evaluatorFilter) : results.evaluations).map((e) => e.evaluator)
|
|
196
|
+
)
|
|
197
|
+
);
|
|
198
|
+
let rows = results.dataset.map((entry) => ({
|
|
199
|
+
entry,
|
|
200
|
+
evaluations: evaluationsByRow.get(rowKey(entry.index, entry.targetId)) ?? []
|
|
201
|
+
}));
|
|
202
|
+
if (filter === "failed") {
|
|
203
|
+
rows = rows.filter(
|
|
204
|
+
(r) => isFailedRow({ entry: r.entry, evaluations: r.evaluations })
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
const totalMatching = rows.length;
|
|
208
|
+
const rowsForSummary = rows;
|
|
209
|
+
const truncated = rows.length > limit;
|
|
210
|
+
rows = rows.slice(0, limit);
|
|
211
|
+
const evaluatorAverages = /* @__PURE__ */ new Map();
|
|
212
|
+
for (const r of rowsForSummary) {
|
|
213
|
+
for (const e of r.evaluations) {
|
|
214
|
+
const stats = evaluatorAverages.get(e.evaluator) ?? {
|
|
215
|
+
sum: 0,
|
|
216
|
+
count: 0,
|
|
217
|
+
passed: 0,
|
|
218
|
+
failed: 0,
|
|
219
|
+
errored: 0
|
|
220
|
+
};
|
|
221
|
+
if (typeof e.score === "number") {
|
|
222
|
+
stats.sum += e.score;
|
|
223
|
+
stats.count += 1;
|
|
224
|
+
}
|
|
225
|
+
if (e.status === "error") stats.errored += 1;
|
|
226
|
+
else if (e.passed === true) stats.passed += 1;
|
|
227
|
+
else if (e.passed === false) stats.failed += 1;
|
|
228
|
+
evaluatorAverages.set(e.evaluator, stats);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
const lines = [];
|
|
232
|
+
lines.push(`# Evaluation Results: ${results.runId}`);
|
|
233
|
+
lines.push("");
|
|
234
|
+
lines.push(`**Experiment**: ${results.experimentId}`);
|
|
235
|
+
lines.push(`**Total rows**: ${results.dataset.length}`);
|
|
236
|
+
lines.push(`**Total evaluations**: ${results.evaluations.length}`);
|
|
237
|
+
if (filter === "failed") {
|
|
238
|
+
lines.push(`**Filter**: failed only`);
|
|
239
|
+
}
|
|
240
|
+
if (evaluatorFilter) {
|
|
241
|
+
lines.push(`**Evaluator filter**: ${evaluatorFilter}`);
|
|
242
|
+
}
|
|
243
|
+
lines.push("");
|
|
244
|
+
if (evaluatorAverages.size > 0) {
|
|
245
|
+
lines.push("## Evaluator Summary");
|
|
246
|
+
lines.push("");
|
|
247
|
+
lines.push("| Evaluator | Avg Score | Passed | Failed | Errored |");
|
|
248
|
+
lines.push("| --- | --- | --- | --- | --- |");
|
|
249
|
+
for (const [name, stats] of evaluatorAverages) {
|
|
250
|
+
const avg = stats.count > 0 ? (stats.sum / stats.count).toFixed(3) : "\u2014";
|
|
251
|
+
lines.push(
|
|
252
|
+
`| ${name} | ${avg} | ${stats.passed} | ${stats.failed} | ${stats.errored} |`
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
lines.push("");
|
|
256
|
+
}
|
|
257
|
+
if (rows.length === 0) {
|
|
258
|
+
lines.push("_No rows matched the filter._");
|
|
259
|
+
return lines.join("\n");
|
|
260
|
+
}
|
|
261
|
+
lines.push(
|
|
262
|
+
`## Rows (${rows.length}${truncated ? ` of ${totalMatching}` : ""})`
|
|
263
|
+
);
|
|
264
|
+
lines.push("");
|
|
265
|
+
for (const { entry, evaluations } of rows) {
|
|
266
|
+
const summary = summarizeEntry(entry.entry);
|
|
267
|
+
lines.push(`### Row #${entry.index}${summary ? ` \u2014 ${summary}` : ""}`);
|
|
268
|
+
if (entry.error) {
|
|
269
|
+
lines.push(`- **Error**: ${entry.error}`);
|
|
270
|
+
}
|
|
271
|
+
if (entry.traceId) {
|
|
272
|
+
lines.push(`- **Trace ID**: \`${entry.traceId}\``);
|
|
273
|
+
}
|
|
274
|
+
if (evaluations.length === 0) {
|
|
275
|
+
lines.push(
|
|
276
|
+
evaluatorNames.length === 0 ? "- _No evaluations recorded_" : "- _No evaluations recorded for this row_"
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
for (const e of evaluations) {
|
|
280
|
+
const parts = [`**${e.evaluator}**`];
|
|
281
|
+
if (e.status === "error") parts.push("status=error");
|
|
282
|
+
else if (typeof e.score === "number") parts.push(`score=${e.score.toFixed(3)}`);
|
|
283
|
+
if (typeof e.passed === "boolean") {
|
|
284
|
+
parts.push(`passed=${e.passed ? "yes" : "no"}`);
|
|
285
|
+
}
|
|
286
|
+
if (e.label) parts.push(`label=${e.label}`);
|
|
287
|
+
lines.push(`- ${parts.join(" \xB7 ")}`);
|
|
288
|
+
if (e.details) {
|
|
289
|
+
lines.push(` - details: ${e.details}`);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
lines.push("");
|
|
293
|
+
}
|
|
294
|
+
if (truncated) {
|
|
295
|
+
lines.push(
|
|
296
|
+
`> Output truncated to ${limit} rows of ${totalMatching} matching to protect the agent's context window. Pass \`limit\` to expand or filter further.`
|
|
297
|
+
);
|
|
298
|
+
}
|
|
299
|
+
return lines.join("\n");
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// src/tools/list-experiment-runs.ts
|
|
303
|
+
var DEFAULT_LIMIT = 25;
|
|
304
|
+
var MAX_LIMIT = 100;
|
|
305
|
+
var formatEpoch = (epoch) => {
|
|
306
|
+
if (!epoch || !Number.isFinite(epoch)) return "\u2014";
|
|
307
|
+
return new Date(epoch).toISOString().replace("T", " ").slice(0, 19) + " UTC";
|
|
308
|
+
};
|
|
309
|
+
var passRate = (evaluations) => {
|
|
310
|
+
const entries = Object.values(evaluations ?? {});
|
|
311
|
+
if (entries.length === 0) return "\u2014";
|
|
312
|
+
const passed = entries.filter((e) => typeof e.averagePassed === "number");
|
|
313
|
+
if (passed.length === 0) {
|
|
314
|
+
const scored = entries.filter((e) => typeof e.averageScore === "number");
|
|
315
|
+
if (scored.length === 0) return "\u2014";
|
|
316
|
+
const avg2 = scored.reduce((sum, e) => sum + (e.averageScore ?? 0), 0) / scored.length;
|
|
317
|
+
return `${avg2.toFixed(2)} avg`;
|
|
318
|
+
}
|
|
319
|
+
const avg = passed.reduce((sum, e) => sum + (e.averagePassed ?? 0), 0) / passed.length;
|
|
320
|
+
return `${(avg * 100).toFixed(0)}% pass`;
|
|
321
|
+
};
|
|
322
|
+
var runStatus = (run) => {
|
|
323
|
+
if (run.timestamps.stoppedAt) return "stopped";
|
|
324
|
+
if (run.timestamps.finishedAt) return "completed";
|
|
325
|
+
return "running";
|
|
326
|
+
};
|
|
327
|
+
async function handleExperimentListRuns(params) {
|
|
328
|
+
const requested = typeof params.limit === "number" && params.limit > 0 ? params.limit : DEFAULT_LIMIT;
|
|
329
|
+
const effectiveLimit = Math.min(requested, MAX_LIMIT);
|
|
330
|
+
const search = new URLSearchParams();
|
|
331
|
+
search.set("experimentSlug", params.experimentSlug);
|
|
332
|
+
search.set("pageSize", String(effectiveLimit));
|
|
333
|
+
let result;
|
|
334
|
+
try {
|
|
335
|
+
result = await makeRequest(
|
|
336
|
+
"GET",
|
|
337
|
+
`/api/experiments/runs?${search.toString()}`
|
|
338
|
+
);
|
|
339
|
+
} catch (error) {
|
|
340
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
341
|
+
if (/404|not found/i.test(message)) {
|
|
342
|
+
return [
|
|
343
|
+
`# Evaluation Runs: ${params.experimentSlug}`,
|
|
344
|
+
"",
|
|
345
|
+
"**Status**: experiment not found",
|
|
346
|
+
"",
|
|
347
|
+
`No experiment with slug \`${params.experimentSlug}\` exists in this project.`,
|
|
348
|
+
"",
|
|
349
|
+
"> Run `platform_experiment_list` to discover available experiment slugs."
|
|
350
|
+
].join("\n");
|
|
351
|
+
}
|
|
352
|
+
throw error;
|
|
353
|
+
}
|
|
354
|
+
if (result.runs.length === 0) {
|
|
355
|
+
return [
|
|
356
|
+
`# Evaluation Runs: ${result.experimentSlug}`,
|
|
357
|
+
"",
|
|
358
|
+
"_This experiment has no runs yet._",
|
|
359
|
+
"",
|
|
360
|
+
`> Trigger a run with \`platform_run_experiment\` (slug: \`${result.experimentSlug}\`) to populate this list.`
|
|
361
|
+
].join("\n");
|
|
362
|
+
}
|
|
363
|
+
const lines = [];
|
|
364
|
+
lines.push(`# Evaluation Runs: ${result.experimentSlug}`);
|
|
365
|
+
lines.push("");
|
|
366
|
+
lines.push(
|
|
367
|
+
`Showing ${result.runs.length} of ${result.pagination.totalHits} run${result.pagination.totalHits === 1 ? "" : "s"}.`
|
|
368
|
+
);
|
|
369
|
+
if (result.pagination.hasMore) {
|
|
370
|
+
lines.push(
|
|
371
|
+
`> More runs exist beyond this limit. Re-run with a higher \`limit\` (max ${MAX_LIMIT}) if needed.`
|
|
372
|
+
);
|
|
373
|
+
}
|
|
374
|
+
lines.push("");
|
|
375
|
+
lines.push("| Run ID | Status | Started | Finished | Result |");
|
|
376
|
+
lines.push("|--------|--------|---------|----------|--------|");
|
|
377
|
+
for (const run of result.runs) {
|
|
378
|
+
lines.push(
|
|
379
|
+
`| \`${run.runId}\` | ${runStatus(run)} | ${formatEpoch(run.timestamps.createdAt)} | ${formatEpoch(run.timestamps.finishedAt ?? null)} | ${passRate(run.summary?.evaluations ?? {})} |`
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
lines.push("");
|
|
383
|
+
lines.push(
|
|
384
|
+
"> Use `platform_experiment_status <runId>` for live progress, or `platform_experiment_results <runId>` for per-row results."
|
|
385
|
+
);
|
|
386
|
+
return lines.join("\n");
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
// src/tools/list-experiments.ts
|
|
390
|
+
var DEFAULT_LIMIT2 = 25;
|
|
391
|
+
var MAX_LIMIT2 = 100;
|
|
392
|
+
var formatTimestamp = (iso) => {
|
|
393
|
+
if (!iso) return "\u2014";
|
|
394
|
+
const d = new Date(iso);
|
|
395
|
+
if (Number.isNaN(d.getTime())) return iso;
|
|
396
|
+
return d.toISOString().replace("T", " ").slice(0, 19) + " UTC";
|
|
397
|
+
};
|
|
398
|
+
var escapeMarkdownTableCell = (value) => value.replace(/[\\|]/g, (c) => `\\${c}`).replace(/\n/g, " ");
|
|
399
|
+
var formatInlineCode = (value) => `\`${value.replace(/[\\`|]/g, (c) => `\\${c}`).replace(/\n/g, " ")}\``;
|
|
400
|
+
async function handleExperimentList(params) {
|
|
401
|
+
const requested = typeof params.limit === "number" && params.limit > 0 ? params.limit : DEFAULT_LIMIT2;
|
|
402
|
+
const effectiveLimit = Math.min(requested, MAX_LIMIT2);
|
|
403
|
+
const search = new URLSearchParams();
|
|
404
|
+
search.set("pageSize", String(effectiveLimit));
|
|
405
|
+
const result = await makeRequest(
|
|
406
|
+
"GET",
|
|
407
|
+
`/api/experiments?${search.toString()}`
|
|
408
|
+
);
|
|
409
|
+
if (result.experiments.length === 0) {
|
|
410
|
+
return [
|
|
411
|
+
"# Experiments",
|
|
412
|
+
"",
|
|
413
|
+
"_No experiments found in this project._",
|
|
414
|
+
"",
|
|
415
|
+
"> Create an experiment in the LangWatch dashboard, then re-run this tool to discover its slug."
|
|
416
|
+
].join("\n");
|
|
417
|
+
}
|
|
418
|
+
const lines = [];
|
|
419
|
+
lines.push("# Experiments");
|
|
420
|
+
lines.push("");
|
|
421
|
+
lines.push(
|
|
422
|
+
`Showing ${result.experiments.length} of ${result.pagination.totalHits} experiment${result.pagination.totalHits === 1 ? "" : "s"}.`
|
|
423
|
+
);
|
|
424
|
+
if (result.pagination.hasMore) {
|
|
425
|
+
lines.push(
|
|
426
|
+
`> More experiments exist beyond this limit. Re-run with a higher \`limit\` (max ${MAX_LIMIT2}) if needed.`
|
|
427
|
+
);
|
|
428
|
+
}
|
|
429
|
+
lines.push("");
|
|
430
|
+
lines.push("| Slug | Name | Runs | Last Run |");
|
|
431
|
+
lines.push("|------|------|------|----------|");
|
|
432
|
+
for (const exp of result.experiments) {
|
|
433
|
+
const name = escapeMarkdownTableCell(exp.name ?? exp.slug);
|
|
434
|
+
lines.push(
|
|
435
|
+
`| ${formatInlineCode(exp.slug)} | ${name} | ${exp.runsCount} | ${formatTimestamp(exp.lastRunAt)} |`
|
|
436
|
+
);
|
|
437
|
+
}
|
|
438
|
+
lines.push("");
|
|
439
|
+
lines.push(
|
|
440
|
+
"> Use `platform_experiment_list_runs` with one of these slugs to see its runs."
|
|
441
|
+
);
|
|
442
|
+
return lines.join("\n");
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
// src/tools/run-experiment.ts
|
|
446
|
+
async function handleRunExperiment(params) {
|
|
447
|
+
const result = await makeRequest(
|
|
448
|
+
"POST",
|
|
449
|
+
`/api/experiments/${encodeURIComponent(params.slug)}/run`
|
|
450
|
+
);
|
|
451
|
+
const lines = [];
|
|
452
|
+
lines.push(`Evaluation started!
|
|
453
|
+
`);
|
|
454
|
+
lines.push(`**Run ID**: ${result.runId}`);
|
|
455
|
+
lines.push(`**Status**: ${result.status}`);
|
|
456
|
+
lines.push(`**Total cells**: ${result.total}`);
|
|
457
|
+
if (result.runUrl) lines.push(`**View at**: ${result.runUrl}`);
|
|
458
|
+
lines.push("");
|
|
459
|
+
lines.push(
|
|
460
|
+
`> Use \`platform_experiment_status\` with run ID "${result.runId}" to check progress.`
|
|
461
|
+
);
|
|
462
|
+
return lines.join("\n");
|
|
463
|
+
}
|
|
464
|
+
async function handleExperimentStatus(params) {
|
|
465
|
+
const status = await makeRequest(
|
|
466
|
+
"GET",
|
|
467
|
+
`/api/experiments/runs/${encodeURIComponent(params.runId)}`
|
|
468
|
+
);
|
|
469
|
+
const lines = [];
|
|
470
|
+
lines.push(`# Evaluation Run ${status.runId}
|
|
471
|
+
`);
|
|
472
|
+
lines.push(`**Status**: ${status.status}`);
|
|
473
|
+
lines.push(`**Progress**: ${status.progress}/${status.total} cells`);
|
|
474
|
+
if (status.startedAt) {
|
|
475
|
+
lines.push(`**Started**: ${new Date(status.startedAt).toISOString()}`);
|
|
476
|
+
}
|
|
477
|
+
if (status.finishedAt) {
|
|
478
|
+
lines.push(`**Finished**: ${new Date(status.finishedAt).toISOString()}`);
|
|
479
|
+
}
|
|
480
|
+
if (status.summary) {
|
|
481
|
+
lines.push("\n## Summary\n");
|
|
482
|
+
if (status.summary.completedCells !== void 0) {
|
|
483
|
+
lines.push(`**Completed**: ${status.summary.completedCells}`);
|
|
484
|
+
}
|
|
485
|
+
if (status.summary.failedCells) {
|
|
486
|
+
lines.push(`**Failed**: ${status.summary.failedCells}`);
|
|
487
|
+
}
|
|
488
|
+
if (status.summary.duration) {
|
|
489
|
+
lines.push(
|
|
490
|
+
`**Duration**: ${(status.summary.duration / 1e3).toFixed(1)}s`
|
|
491
|
+
);
|
|
492
|
+
}
|
|
493
|
+
if (status.summary.runUrl) {
|
|
494
|
+
lines.push(`**View results**: ${status.summary.runUrl}`);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
return lines.join("\n");
|
|
498
|
+
}
|
|
499
|
+
|
|
116
500
|
// src/create-mcp-server.ts
|
|
117
501
|
var modelSchema = z2.string().describe(
|
|
118
502
|
'Model in "provider/model-name" format, e.g., "openai/gpt-4o", "anthropic/claude-sonnet-4-5-20250929"'
|
|
@@ -253,7 +637,7 @@ function registerTools(server) {
|
|
|
253
637
|
},
|
|
254
638
|
withToolLogging("search_traces", async (params) => {
|
|
255
639
|
requireApiKey();
|
|
256
|
-
const { handleSearchTraces } = await import("./search-traces-
|
|
640
|
+
const { handleSearchTraces } = await import("./search-traces-3BBVYPC3.js");
|
|
257
641
|
return {
|
|
258
642
|
content: [{ type: "text", text: await handleSearchTraces(params) }]
|
|
259
643
|
};
|
|
@@ -270,7 +654,7 @@ function registerTools(server) {
|
|
|
270
654
|
},
|
|
271
655
|
withToolLogging("get_trace", async (params) => {
|
|
272
656
|
requireApiKey();
|
|
273
|
-
const { handleGetTrace } = await import("./get-trace-
|
|
657
|
+
const { handleGetTrace } = await import("./get-trace-MRBDS3HJ.js");
|
|
274
658
|
return {
|
|
275
659
|
content: [{ type: "text", text: await handleGetTrace(params) }]
|
|
276
660
|
};
|
|
@@ -296,7 +680,7 @@ function registerTools(server) {
|
|
|
296
680
|
},
|
|
297
681
|
withToolLogging("get_analytics", async (params) => {
|
|
298
682
|
requireApiKey();
|
|
299
|
-
const { handleGetAnalytics } = await import("./get-analytics-
|
|
683
|
+
const { handleGetAnalytics } = await import("./get-analytics-GPVJX7SF.js");
|
|
300
684
|
return {
|
|
301
685
|
content: [{ type: "text", text: await handleGetAnalytics(params) }]
|
|
302
686
|
};
|
|
@@ -330,7 +714,7 @@ NOTE: Prompts can be managed two ways. Determine which approach the user needs:
|
|
|
330
714
|
},
|
|
331
715
|
withToolLogging("platform_create_prompt", async (params) => {
|
|
332
716
|
requireApiKey();
|
|
333
|
-
const { handleCreatePrompt } = await import("./create-prompt-
|
|
717
|
+
const { handleCreatePrompt } = await import("./create-prompt-NGXKSP4X.js");
|
|
334
718
|
return {
|
|
335
719
|
content: [{ type: "text", text: await handleCreatePrompt(params) }]
|
|
336
720
|
};
|
|
@@ -342,7 +726,7 @@ NOTE: Prompts can be managed two ways. Determine which approach the user needs:
|
|
|
342
726
|
{},
|
|
343
727
|
withToolLogging("platform_list_prompts", async () => {
|
|
344
728
|
requireApiKey();
|
|
345
|
-
const { handleListPrompts } = await import("./list-prompts-
|
|
729
|
+
const { handleListPrompts } = await import("./list-prompts-VNXKHK7T.js");
|
|
346
730
|
return {
|
|
347
731
|
content: [{ type: "text", text: await handleListPrompts() }]
|
|
348
732
|
};
|
|
@@ -366,7 +750,7 @@ NOTE: Prompts can be managed two ways. Determine which approach the user needs:
|
|
|
366
750
|
};
|
|
367
751
|
}
|
|
368
752
|
requireApiKey();
|
|
369
|
-
const { handleGetPrompt } = await import("./get-prompt-
|
|
753
|
+
const { handleGetPrompt } = await import("./get-prompt-5XAGWWBG.js");
|
|
370
754
|
return {
|
|
371
755
|
content: [{ type: "text", text: await handleGetPrompt(params) }]
|
|
372
756
|
};
|
|
@@ -391,7 +775,7 @@ NOTE: Prompts can be managed two ways. Determine which approach the user needs:
|
|
|
391
775
|
},
|
|
392
776
|
withToolLogging("platform_update_prompt", async (params) => {
|
|
393
777
|
requireApiKey();
|
|
394
|
-
const { handleUpdatePrompt } = await import("./update-prompt-
|
|
778
|
+
const { handleUpdatePrompt } = await import("./update-prompt-ZU2DD6KM.js");
|
|
395
779
|
return {
|
|
396
780
|
content: [{ type: "text", text: await handleUpdatePrompt(params) }]
|
|
397
781
|
};
|
|
@@ -407,7 +791,7 @@ NOTE: Prompts can be managed two ways. Determine which approach the user needs:
|
|
|
407
791
|
},
|
|
408
792
|
withToolLogging("platform_assign_prompt_tag", async (params) => {
|
|
409
793
|
requireApiKey();
|
|
410
|
-
const { handleAssignPromptTag } = await import("./assign-prompt-tag-
|
|
794
|
+
const { handleAssignPromptTag } = await import("./assign-prompt-tag-FKCCZPML.js");
|
|
411
795
|
return {
|
|
412
796
|
content: [{ type: "text", text: await handleAssignPromptTag(params) }]
|
|
413
797
|
};
|
|
@@ -419,7 +803,7 @@ NOTE: Prompts can be managed two ways. Determine which approach the user needs:
|
|
|
419
803
|
{},
|
|
420
804
|
withToolLogging("platform_list_prompt_tags", async () => {
|
|
421
805
|
requireApiKey();
|
|
422
|
-
const { handleListPromptTags } = await import("./list-prompt-tags-
|
|
806
|
+
const { handleListPromptTags } = await import("./list-prompt-tags-Z2DD6FLQ.js");
|
|
423
807
|
return {
|
|
424
808
|
content: [{ type: "text", text: await handleListPromptTags() }]
|
|
425
809
|
};
|
|
@@ -433,7 +817,7 @@ NOTE: Prompts can be managed two ways. Determine which approach the user needs:
|
|
|
433
817
|
},
|
|
434
818
|
withToolLogging("platform_create_prompt_tag", async (params) => {
|
|
435
819
|
requireApiKey();
|
|
436
|
-
const { handleCreatePromptTag } = await import("./create-prompt-tag-
|
|
820
|
+
const { handleCreatePromptTag } = await import("./create-prompt-tag-IUKYPVHH.js");
|
|
437
821
|
return {
|
|
438
822
|
content: [{ type: "text", text: await handleCreatePromptTag(params) }]
|
|
439
823
|
};
|
|
@@ -448,7 +832,7 @@ NOTE: Prompts can be managed two ways. Determine which approach the user needs:
|
|
|
448
832
|
},
|
|
449
833
|
withToolLogging("platform_rename_prompt_tag", async (params) => {
|
|
450
834
|
requireApiKey();
|
|
451
|
-
const { handleRenamePromptTag } = await import("./rename-prompt-tag-
|
|
835
|
+
const { handleRenamePromptTag } = await import("./rename-prompt-tag-A4RJUK7Z.js");
|
|
452
836
|
return {
|
|
453
837
|
content: [{ type: "text", text: await handleRenamePromptTag(params) }]
|
|
454
838
|
};
|
|
@@ -462,7 +846,7 @@ NOTE: Prompts can be managed two ways. Determine which approach the user needs:
|
|
|
462
846
|
},
|
|
463
847
|
withToolLogging("platform_delete_prompt_tag", async (params) => {
|
|
464
848
|
requireApiKey();
|
|
465
|
-
const { handleDeletePromptTag } = await import("./delete-prompt-tag-
|
|
849
|
+
const { handleDeletePromptTag } = await import("./delete-prompt-tag-I6HNMSVJ.js");
|
|
466
850
|
return {
|
|
467
851
|
content: [{ type: "text", text: await handleDeletePromptTag(params) }]
|
|
468
852
|
};
|
|
@@ -490,7 +874,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
490
874
|
},
|
|
491
875
|
withToolLogging("platform_create_scenario", async (params) => {
|
|
492
876
|
requireApiKey();
|
|
493
|
-
const { handleCreateScenario } = await import("./create-scenario-
|
|
877
|
+
const { handleCreateScenario } = await import("./create-scenario-FNBXALH3.js");
|
|
494
878
|
return {
|
|
495
879
|
content: [
|
|
496
880
|
{ type: "text", text: await handleCreateScenario(params) }
|
|
@@ -508,7 +892,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
508
892
|
},
|
|
509
893
|
withToolLogging("platform_list_scenarios", async (params) => {
|
|
510
894
|
requireApiKey();
|
|
511
|
-
const { handleListScenarios } = await import("./list-scenarios-
|
|
895
|
+
const { handleListScenarios } = await import("./list-scenarios-CFZHXL76.js");
|
|
512
896
|
return {
|
|
513
897
|
content: [
|
|
514
898
|
{ type: "text", text: await handleListScenarios(params) }
|
|
@@ -527,7 +911,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
527
911
|
},
|
|
528
912
|
withToolLogging("platform_get_scenario", async (params) => {
|
|
529
913
|
requireApiKey();
|
|
530
|
-
const { handleGetScenario } = await import("./get-scenario-
|
|
914
|
+
const { handleGetScenario } = await import("./get-scenario-7XBCDZWX.js");
|
|
531
915
|
return {
|
|
532
916
|
content: [{ type: "text", text: await handleGetScenario(params) }]
|
|
533
917
|
};
|
|
@@ -545,7 +929,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
545
929
|
},
|
|
546
930
|
withToolLogging("platform_update_scenario", async (params) => {
|
|
547
931
|
requireApiKey();
|
|
548
|
-
const { handleUpdateScenario } = await import("./update-scenario-
|
|
932
|
+
const { handleUpdateScenario } = await import("./update-scenario-3VUTPDRU.js");
|
|
549
933
|
return {
|
|
550
934
|
content: [
|
|
551
935
|
{ type: "text", text: await handleUpdateScenario(params) }
|
|
@@ -561,7 +945,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
561
945
|
},
|
|
562
946
|
withToolLogging("platform_archive_scenario", async (params) => {
|
|
563
947
|
requireApiKey();
|
|
564
|
-
const { handleArchiveScenario } = await import("./archive-scenario-
|
|
948
|
+
const { handleArchiveScenario } = await import("./archive-scenario-P5RRITRM.js");
|
|
565
949
|
return {
|
|
566
950
|
content: [
|
|
567
951
|
{ type: "text", text: await handleArchiveScenario(params) }
|
|
@@ -577,7 +961,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
577
961
|
},
|
|
578
962
|
withToolLogging("platform_list_suites", async (params) => {
|
|
579
963
|
requireApiKey();
|
|
580
|
-
const { handleListSuites } = await import("./list-suites-
|
|
964
|
+
const { handleListSuites } = await import("./list-suites-ZDOHAAXF.js");
|
|
581
965
|
return {
|
|
582
966
|
content: [{ type: "text", text: await handleListSuites(params) }]
|
|
583
967
|
};
|
|
@@ -592,7 +976,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
592
976
|
},
|
|
593
977
|
withToolLogging("platform_get_suite", async (params) => {
|
|
594
978
|
requireApiKey();
|
|
595
|
-
const { handleGetSuite } = await import("./get-suite-
|
|
979
|
+
const { handleGetSuite } = await import("./get-suite-4DBVHFEM.js");
|
|
596
980
|
return {
|
|
597
981
|
content: [{ type: "text", text: await handleGetSuite(params) }]
|
|
598
982
|
};
|
|
@@ -611,7 +995,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
611
995
|
},
|
|
612
996
|
withToolLogging("platform_create_suite", async (params) => {
|
|
613
997
|
requireApiKey();
|
|
614
|
-
const { handleCreateSuite } = await import("./create-suite-
|
|
998
|
+
const { handleCreateSuite } = await import("./create-suite-DJEPD4ZB.js");
|
|
615
999
|
return {
|
|
616
1000
|
content: [{ type: "text", text: await handleCreateSuite(params) }]
|
|
617
1001
|
};
|
|
@@ -631,7 +1015,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
631
1015
|
},
|
|
632
1016
|
withToolLogging("platform_update_suite", async (params) => {
|
|
633
1017
|
requireApiKey();
|
|
634
|
-
const { handleUpdateSuite } = await import("./update-suite-
|
|
1018
|
+
const { handleUpdateSuite } = await import("./update-suite-C6JFDQHL.js");
|
|
635
1019
|
return {
|
|
636
1020
|
content: [{ type: "text", text: await handleUpdateSuite(params) }]
|
|
637
1021
|
};
|
|
@@ -645,7 +1029,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
645
1029
|
},
|
|
646
1030
|
withToolLogging("platform_run_suite", async (params) => {
|
|
647
1031
|
requireApiKey();
|
|
648
|
-
const { handleRunSuite } = await import("./run-suite-
|
|
1032
|
+
const { handleRunSuite } = await import("./run-suite-TH7LO5TJ.js");
|
|
649
1033
|
return {
|
|
650
1034
|
content: [{ type: "text", text: await handleRunSuite(params) }]
|
|
651
1035
|
};
|
|
@@ -659,7 +1043,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
659
1043
|
},
|
|
660
1044
|
withToolLogging("platform_archive_suite", async (params) => {
|
|
661
1045
|
requireApiKey();
|
|
662
|
-
const { handleArchiveSuite } = await import("./archive-suite-
|
|
1046
|
+
const { handleArchiveSuite } = await import("./archive-suite-NUUFD2EM.js");
|
|
663
1047
|
return {
|
|
664
1048
|
content: [{ type: "text", text: await handleArchiveSuite(params) }]
|
|
665
1049
|
};
|
|
@@ -676,7 +1060,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
676
1060
|
},
|
|
677
1061
|
withToolLogging("platform_list_simulation_runs", async (params) => {
|
|
678
1062
|
requireApiKey();
|
|
679
|
-
const { handleListSimulationRuns } = await import("./list-simulation-runs-
|
|
1063
|
+
const { handleListSimulationRuns } = await import("./list-simulation-runs-AM2BXLBW.js");
|
|
680
1064
|
return {
|
|
681
1065
|
content: [{ type: "text", text: await handleListSimulationRuns(params) }]
|
|
682
1066
|
};
|
|
@@ -691,7 +1075,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
691
1075
|
},
|
|
692
1076
|
withToolLogging("platform_get_simulation_run", async (params) => {
|
|
693
1077
|
requireApiKey();
|
|
694
|
-
const { handleGetSimulationRun } = await import("./get-simulation-run-
|
|
1078
|
+
const { handleGetSimulationRun } = await import("./get-simulation-run-AV24FJWI.js");
|
|
695
1079
|
return {
|
|
696
1080
|
content: [{ type: "text", text: await handleGetSimulationRun(params) }]
|
|
697
1081
|
};
|
|
@@ -708,7 +1092,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
708
1092
|
},
|
|
709
1093
|
withToolLogging("platform_create_evaluator", async (params) => {
|
|
710
1094
|
requireApiKey();
|
|
711
|
-
const { handleCreateEvaluator } = await import("./create-evaluator-
|
|
1095
|
+
const { handleCreateEvaluator } = await import("./create-evaluator-YFFQIR7E.js");
|
|
712
1096
|
return {
|
|
713
1097
|
content: [
|
|
714
1098
|
{ type: "text", text: await handleCreateEvaluator(params) }
|
|
@@ -722,7 +1106,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
722
1106
|
{},
|
|
723
1107
|
withToolLogging("platform_list_evaluators", async () => {
|
|
724
1108
|
requireApiKey();
|
|
725
|
-
const { handleListEvaluators } = await import("./list-evaluators-
|
|
1109
|
+
const { handleListEvaluators } = await import("./list-evaluators-B6OSVAM2.js");
|
|
726
1110
|
return {
|
|
727
1111
|
content: [{ type: "text", text: await handleListEvaluators() }]
|
|
728
1112
|
};
|
|
@@ -736,7 +1120,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
736
1120
|
},
|
|
737
1121
|
withToolLogging("platform_get_evaluator", async (params) => {
|
|
738
1122
|
requireApiKey();
|
|
739
|
-
const { handleGetEvaluator } = await import("./get-evaluator-
|
|
1123
|
+
const { handleGetEvaluator } = await import("./get-evaluator-PCM6XQAU.js");
|
|
740
1124
|
return {
|
|
741
1125
|
content: [{ type: "text", text: await handleGetEvaluator(params) }]
|
|
742
1126
|
};
|
|
@@ -754,7 +1138,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
754
1138
|
},
|
|
755
1139
|
withToolLogging("platform_update_evaluator", async (params) => {
|
|
756
1140
|
requireApiKey();
|
|
757
|
-
const { handleUpdateEvaluator } = await import("./update-evaluator-
|
|
1141
|
+
const { handleUpdateEvaluator } = await import("./update-evaluator-6IJHFG2E.js");
|
|
758
1142
|
return {
|
|
759
1143
|
content: [
|
|
760
1144
|
{ type: "text", text: await handleUpdateEvaluator(params) }
|
|
@@ -770,7 +1154,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
770
1154
|
},
|
|
771
1155
|
withToolLogging("platform_delete_evaluator", async (params) => {
|
|
772
1156
|
requireApiKey();
|
|
773
|
-
const { handleDeleteEvaluator } = await import("./delete-evaluator-
|
|
1157
|
+
const { handleDeleteEvaluator } = await import("./delete-evaluator-7ZATLJOA.js");
|
|
774
1158
|
return {
|
|
775
1159
|
content: [{ type: "text", text: await handleDeleteEvaluator(params) }]
|
|
776
1160
|
};
|
|
@@ -791,7 +1175,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
791
1175
|
},
|
|
792
1176
|
withToolLogging("platform_set_model_provider", async (params) => {
|
|
793
1177
|
requireApiKey();
|
|
794
|
-
const { handleSetModelProvider } = await import("./set-model-provider-
|
|
1178
|
+
const { handleSetModelProvider } = await import("./set-model-provider-WOC5FNMV.js");
|
|
795
1179
|
return {
|
|
796
1180
|
content: [
|
|
797
1181
|
{ type: "text", text: await handleSetModelProvider(params) }
|
|
@@ -805,7 +1189,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
805
1189
|
{},
|
|
806
1190
|
withToolLogging("platform_list_model_providers", async () => {
|
|
807
1191
|
requireApiKey();
|
|
808
|
-
const { handleListModelProviders } = await import("./list-model-providers-
|
|
1192
|
+
const { handleListModelProviders } = await import("./list-model-providers-NL6IP4UZ.js");
|
|
809
1193
|
return {
|
|
810
1194
|
content: [{ type: "text", text: await handleListModelProviders() }]
|
|
811
1195
|
};
|
|
@@ -817,7 +1201,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
817
1201
|
{},
|
|
818
1202
|
withToolLogging("platform_list_agents", async () => {
|
|
819
1203
|
requireApiKey();
|
|
820
|
-
const { handleListAgents } = await import("./list-agents-
|
|
1204
|
+
const { handleListAgents } = await import("./list-agents-NECO7MPI.js");
|
|
821
1205
|
return {
|
|
822
1206
|
content: [{ type: "text", text: await handleListAgents() }]
|
|
823
1207
|
};
|
|
@@ -831,7 +1215,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
831
1215
|
},
|
|
832
1216
|
withToolLogging("platform_get_agent", async (params) => {
|
|
833
1217
|
requireApiKey();
|
|
834
|
-
const { handleGetAgent } = await import("./get-agent-
|
|
1218
|
+
const { handleGetAgent } = await import("./get-agent-3KDWCP5N.js");
|
|
835
1219
|
return {
|
|
836
1220
|
content: [{ type: "text", text: await handleGetAgent(params) }]
|
|
837
1221
|
};
|
|
@@ -847,7 +1231,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
847
1231
|
},
|
|
848
1232
|
withToolLogging("platform_create_agent", async (params) => {
|
|
849
1233
|
requireApiKey();
|
|
850
|
-
const { handleCreateAgent } = await import("./create-agent-
|
|
1234
|
+
const { handleCreateAgent } = await import("./create-agent-K5Q7BFGZ.js");
|
|
851
1235
|
const parsedConfig = params.config ? JSON.parse(params.config) : void 0;
|
|
852
1236
|
return {
|
|
853
1237
|
content: [{ type: "text", text: await handleCreateAgent({ ...params, config: parsedConfig }) }]
|
|
@@ -865,7 +1249,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
865
1249
|
},
|
|
866
1250
|
withToolLogging("platform_update_agent", async (params) => {
|
|
867
1251
|
requireApiKey();
|
|
868
|
-
const { handleUpdateAgent } = await import("./update-agent-
|
|
1252
|
+
const { handleUpdateAgent } = await import("./update-agent-YMEV5MTL.js");
|
|
869
1253
|
const parsedConfig = params.config ? JSON.parse(params.config) : void 0;
|
|
870
1254
|
return {
|
|
871
1255
|
content: [{ type: "text", text: await handleUpdateAgent({ ...params, config: parsedConfig }) }]
|
|
@@ -880,7 +1264,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
880
1264
|
},
|
|
881
1265
|
withToolLogging("platform_delete_agent", async (params) => {
|
|
882
1266
|
requireApiKey();
|
|
883
|
-
const { handleDeleteAgent } = await import("./delete-agent-
|
|
1267
|
+
const { handleDeleteAgent } = await import("./delete-agent-TJI5XBBM.js");
|
|
884
1268
|
return {
|
|
885
1269
|
content: [{ type: "text", text: await handleDeleteAgent(params) }]
|
|
886
1270
|
};
|
|
@@ -895,7 +1279,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
895
1279
|
},
|
|
896
1280
|
withToolLogging("platform_run_agent", async (params) => {
|
|
897
1281
|
requireApiKey();
|
|
898
|
-
const { handleRunAgent } = await import("./run-agent-
|
|
1282
|
+
const { handleRunAgent } = await import("./run-agent-JFNDY7MR.js");
|
|
899
1283
|
return {
|
|
900
1284
|
content: [{ type: "text", text: await handleRunAgent(params) }]
|
|
901
1285
|
};
|
|
@@ -907,7 +1291,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
907
1291
|
{},
|
|
908
1292
|
withToolLogging("platform_list_dashboards", async () => {
|
|
909
1293
|
requireApiKey();
|
|
910
|
-
const { handleListDashboards } = await import("./list-dashboards-
|
|
1294
|
+
const { handleListDashboards } = await import("./list-dashboards-DVPVVVKW.js");
|
|
911
1295
|
return {
|
|
912
1296
|
content: [{ type: "text", text: await handleListDashboards() }]
|
|
913
1297
|
};
|
|
@@ -921,7 +1305,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
921
1305
|
},
|
|
922
1306
|
withToolLogging("platform_get_dashboard", async (params) => {
|
|
923
1307
|
requireApiKey();
|
|
924
|
-
const { handleGetDashboard } = await import("./get-dashboard-
|
|
1308
|
+
const { handleGetDashboard } = await import("./get-dashboard-YPTIE5YY.js");
|
|
925
1309
|
return {
|
|
926
1310
|
content: [{ type: "text", text: await handleGetDashboard(params) }]
|
|
927
1311
|
};
|
|
@@ -935,7 +1319,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
935
1319
|
},
|
|
936
1320
|
withToolLogging("platform_create_dashboard", async (params) => {
|
|
937
1321
|
requireApiKey();
|
|
938
|
-
const { handleCreateDashboard } = await import("./create-dashboard-
|
|
1322
|
+
const { handleCreateDashboard } = await import("./create-dashboard-G4QA5AXP.js");
|
|
939
1323
|
return {
|
|
940
1324
|
content: [{ type: "text", text: await handleCreateDashboard(params) }]
|
|
941
1325
|
};
|
|
@@ -949,7 +1333,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
949
1333
|
},
|
|
950
1334
|
withToolLogging("platform_delete_dashboard", async (params) => {
|
|
951
1335
|
requireApiKey();
|
|
952
|
-
const { handleDeleteDashboard } = await import("./delete-dashboard-
|
|
1336
|
+
const { handleDeleteDashboard } = await import("./delete-dashboard-N5SZJIR3.js");
|
|
953
1337
|
return {
|
|
954
1338
|
content: [{ type: "text", text: await handleDeleteDashboard(params) }]
|
|
955
1339
|
};
|
|
@@ -964,7 +1348,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
964
1348
|
},
|
|
965
1349
|
withToolLogging("platform_rename_dashboard", async (params) => {
|
|
966
1350
|
requireApiKey();
|
|
967
|
-
const { renameDashboard } = await import("./langwatch-api-dashboards-
|
|
1351
|
+
const { renameDashboard } = await import("./langwatch-api-dashboards-WARLI6NF.js");
|
|
968
1352
|
const result = await renameDashboard(params.id, { name: params.name });
|
|
969
1353
|
return {
|
|
970
1354
|
content: [{ type: "text", text: `Dashboard "${result.name}" renamed successfully (ID: ${result.id}).` }]
|
|
@@ -977,7 +1361,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
977
1361
|
{},
|
|
978
1362
|
withToolLogging("platform_list_workflows", async () => {
|
|
979
1363
|
requireApiKey();
|
|
980
|
-
const { handleListWorkflows } = await import("./list-workflows-
|
|
1364
|
+
const { handleListWorkflows } = await import("./list-workflows-WBRBKLIT.js");
|
|
981
1365
|
return {
|
|
982
1366
|
content: [{ type: "text", text: await handleListWorkflows() }]
|
|
983
1367
|
};
|
|
@@ -991,7 +1375,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
991
1375
|
},
|
|
992
1376
|
withToolLogging("platform_get_workflow", async (params) => {
|
|
993
1377
|
requireApiKey();
|
|
994
|
-
const { handleGetWorkflow } = await import("./get-workflow-
|
|
1378
|
+
const { handleGetWorkflow } = await import("./get-workflow-UR4Y6UFX.js");
|
|
995
1379
|
return {
|
|
996
1380
|
content: [{ type: "text", text: await handleGetWorkflow(params) }]
|
|
997
1381
|
};
|
|
@@ -1005,7 +1389,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
1005
1389
|
},
|
|
1006
1390
|
withToolLogging("platform_delete_workflow", async (params) => {
|
|
1007
1391
|
requireApiKey();
|
|
1008
|
-
const { handleDeleteWorkflow } = await import("./delete-workflow-
|
|
1392
|
+
const { handleDeleteWorkflow } = await import("./delete-workflow-QEO74JQR.js");
|
|
1009
1393
|
return {
|
|
1010
1394
|
content: [{ type: "text", text: await handleDeleteWorkflow(params) }]
|
|
1011
1395
|
};
|
|
@@ -1020,7 +1404,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
1020
1404
|
},
|
|
1021
1405
|
withToolLogging("platform_run_workflow", async (params) => {
|
|
1022
1406
|
requireApiKey();
|
|
1023
|
-
const { handleRunWorkflow } = await import("./run-workflow-
|
|
1407
|
+
const { handleRunWorkflow } = await import("./run-workflow-CK3JP5U2.js");
|
|
1024
1408
|
return {
|
|
1025
1409
|
content: [{ type: "text", text: await handleRunWorkflow(params) }]
|
|
1026
1410
|
};
|
|
@@ -1034,7 +1418,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
1034
1418
|
},
|
|
1035
1419
|
withToolLogging("platform_list_annotations", async (params) => {
|
|
1036
1420
|
requireApiKey();
|
|
1037
|
-
const { handleListAnnotations } = await import("./list-annotations-
|
|
1421
|
+
const { handleListAnnotations } = await import("./list-annotations-3OJEO774.js");
|
|
1038
1422
|
return {
|
|
1039
1423
|
content: [{ type: "text", text: await handleListAnnotations(params) }]
|
|
1040
1424
|
};
|
|
@@ -1051,7 +1435,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
1051
1435
|
},
|
|
1052
1436
|
withToolLogging("platform_create_annotation", async (params) => {
|
|
1053
1437
|
requireApiKey();
|
|
1054
|
-
const { handleCreateAnnotation } = await import("./create-annotation-
|
|
1438
|
+
const { handleCreateAnnotation } = await import("./create-annotation-KN3GE3DK.js");
|
|
1055
1439
|
return {
|
|
1056
1440
|
content: [{ type: "text", text: await handleCreateAnnotation(params) }]
|
|
1057
1441
|
};
|
|
@@ -1065,7 +1449,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
1065
1449
|
},
|
|
1066
1450
|
withToolLogging("platform_delete_annotation", async (params) => {
|
|
1067
1451
|
requireApiKey();
|
|
1068
|
-
const { handleDeleteAnnotation } = await import("./delete-annotation-
|
|
1452
|
+
const { handleDeleteAnnotation } = await import("./delete-annotation-KRP53TUU.js");
|
|
1069
1453
|
return {
|
|
1070
1454
|
content: [{ type: "text", text: await handleDeleteAnnotation(params) }]
|
|
1071
1455
|
};
|
|
@@ -1079,7 +1463,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
1079
1463
|
},
|
|
1080
1464
|
withToolLogging("platform_get_annotation", async (params) => {
|
|
1081
1465
|
requireApiKey();
|
|
1082
|
-
const { getAnnotation } = await import("./langwatch-api-annotations-
|
|
1466
|
+
const { getAnnotation } = await import("./langwatch-api-annotations-ZJDRB4JH.js");
|
|
1083
1467
|
const annotation = await getAnnotation(params.id);
|
|
1084
1468
|
const lines = [
|
|
1085
1469
|
`**ID**: ${annotation.id}`,
|
|
@@ -1101,7 +1485,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
1101
1485
|
},
|
|
1102
1486
|
withToolLogging("platform_list_triggers", async (params) => {
|
|
1103
1487
|
requireApiKey();
|
|
1104
|
-
const { listTriggers } = await import("./langwatch-api-triggers-
|
|
1488
|
+
const { listTriggers } = await import("./langwatch-api-triggers-5SX6R2WU.js");
|
|
1105
1489
|
const triggers = await listTriggers();
|
|
1106
1490
|
if (params.format === "json") {
|
|
1107
1491
|
return { content: [{ type: "text", text: JSON.stringify(triggers, null, 2) }] };
|
|
@@ -1134,7 +1518,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
1134
1518
|
},
|
|
1135
1519
|
withToolLogging("platform_create_trigger", async (params) => {
|
|
1136
1520
|
requireApiKey();
|
|
1137
|
-
const { createTrigger } = await import("./langwatch-api-triggers-
|
|
1521
|
+
const { createTrigger } = await import("./langwatch-api-triggers-5SX6R2WU.js");
|
|
1138
1522
|
let filters = {};
|
|
1139
1523
|
if (params.filters) {
|
|
1140
1524
|
try {
|
|
@@ -1165,7 +1549,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
1165
1549
|
},
|
|
1166
1550
|
withToolLogging("platform_update_trigger", async (params) => {
|
|
1167
1551
|
requireApiKey();
|
|
1168
|
-
const { updateTrigger } = await import("./langwatch-api-triggers-
|
|
1552
|
+
const { updateTrigger } = await import("./langwatch-api-triggers-5SX6R2WU.js");
|
|
1169
1553
|
const trigger = await updateTrigger(params);
|
|
1170
1554
|
return { content: [{ type: "text", text: `Trigger "${trigger.name}" updated (active: ${trigger.active}).` }] };
|
|
1171
1555
|
})
|
|
@@ -1178,7 +1562,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
1178
1562
|
},
|
|
1179
1563
|
withToolLogging("platform_delete_trigger", async (params) => {
|
|
1180
1564
|
requireApiKey();
|
|
1181
|
-
const { deleteTrigger } = await import("./langwatch-api-triggers-
|
|
1565
|
+
const { deleteTrigger } = await import("./langwatch-api-triggers-5SX6R2WU.js");
|
|
1182
1566
|
const result = await deleteTrigger(params.id);
|
|
1183
1567
|
return { content: [{ type: "text", text: `Trigger ${result.id} deleted.` }] };
|
|
1184
1568
|
})
|
|
@@ -1189,7 +1573,7 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
1189
1573
|
{},
|
|
1190
1574
|
withToolLogging("platform_list_monitors", async () => {
|
|
1191
1575
|
requireApiKey();
|
|
1192
|
-
const { listMonitors } = await import("./langwatch-api-monitors-
|
|
1576
|
+
const { listMonitors } = await import("./langwatch-api-monitors-4XKXHYCG.js");
|
|
1193
1577
|
const monitors = await listMonitors();
|
|
1194
1578
|
if (monitors.length === 0) {
|
|
1195
1579
|
return { content: [{ type: "text", text: "No monitors found." }] };
|
|
@@ -1216,7 +1600,7 @@ ${lines.join("\n")}`
|
|
|
1216
1600
|
},
|
|
1217
1601
|
withToolLogging("platform_get_monitor", async (params) => {
|
|
1218
1602
|
requireApiKey();
|
|
1219
|
-
const { getMonitor } = await import("./langwatch-api-monitors-
|
|
1603
|
+
const { getMonitor } = await import("./langwatch-api-monitors-4XKXHYCG.js");
|
|
1220
1604
|
const m = await getMonitor(params.id);
|
|
1221
1605
|
const lines = [
|
|
1222
1606
|
`**${m.name}** (${m.id})`,
|
|
@@ -1243,7 +1627,7 @@ ${lines.join("\n")}`
|
|
|
1243
1627
|
},
|
|
1244
1628
|
withToolLogging("platform_create_monitor", async (params) => {
|
|
1245
1629
|
requireApiKey();
|
|
1246
|
-
const { createMonitor } = await import("./langwatch-api-monitors-
|
|
1630
|
+
const { createMonitor } = await import("./langwatch-api-monitors-4XKXHYCG.js");
|
|
1247
1631
|
const monitor = await createMonitor(params);
|
|
1248
1632
|
return {
|
|
1249
1633
|
content: [
|
|
@@ -1267,7 +1651,7 @@ ${lines.join("\n")}`
|
|
|
1267
1651
|
},
|
|
1268
1652
|
withToolLogging("platform_update_monitor", async (params) => {
|
|
1269
1653
|
requireApiKey();
|
|
1270
|
-
const { updateMonitor } = await import("./langwatch-api-monitors-
|
|
1654
|
+
const { updateMonitor } = await import("./langwatch-api-monitors-4XKXHYCG.js");
|
|
1271
1655
|
const monitor = await updateMonitor(params);
|
|
1272
1656
|
return {
|
|
1273
1657
|
content: [
|
|
@@ -1287,7 +1671,7 @@ ${lines.join("\n")}`
|
|
|
1287
1671
|
},
|
|
1288
1672
|
withToolLogging("platform_delete_monitor", async (params) => {
|
|
1289
1673
|
requireApiKey();
|
|
1290
|
-
const { deleteMonitor } = await import("./langwatch-api-monitors-
|
|
1674
|
+
const { deleteMonitor } = await import("./langwatch-api-monitors-4XKXHYCG.js");
|
|
1291
1675
|
const result = await deleteMonitor(params.id);
|
|
1292
1676
|
return {
|
|
1293
1677
|
content: [
|
|
@@ -1302,7 +1686,7 @@ ${lines.join("\n")}`
|
|
|
1302
1686
|
{},
|
|
1303
1687
|
withToolLogging("platform_list_secrets", async () => {
|
|
1304
1688
|
requireApiKey();
|
|
1305
|
-
const { listSecrets } = await import("./langwatch-api-secrets-
|
|
1689
|
+
const { listSecrets } = await import("./langwatch-api-secrets-6SHK5G7Q.js");
|
|
1306
1690
|
const secrets = await listSecrets();
|
|
1307
1691
|
if (secrets.length === 0) {
|
|
1308
1692
|
return { content: [{ type: "text", text: "No secrets found." }] };
|
|
@@ -1330,7 +1714,7 @@ ${lines.join("\n")}`
|
|
|
1330
1714
|
},
|
|
1331
1715
|
withToolLogging("platform_create_secret", async (params) => {
|
|
1332
1716
|
requireApiKey();
|
|
1333
|
-
const { createSecret } = await import("./langwatch-api-secrets-
|
|
1717
|
+
const { createSecret } = await import("./langwatch-api-secrets-6SHK5G7Q.js");
|
|
1334
1718
|
const secret = await createSecret({ name: params.name, value: params.value });
|
|
1335
1719
|
return {
|
|
1336
1720
|
content: [
|
|
@@ -1351,7 +1735,7 @@ ${lines.join("\n")}`
|
|
|
1351
1735
|
},
|
|
1352
1736
|
withToolLogging("platform_update_secret", async (params) => {
|
|
1353
1737
|
requireApiKey();
|
|
1354
|
-
const { updateSecret } = await import("./langwatch-api-secrets-
|
|
1738
|
+
const { updateSecret } = await import("./langwatch-api-secrets-6SHK5G7Q.js");
|
|
1355
1739
|
const secret = await updateSecret({ id: params.id, value: params.value });
|
|
1356
1740
|
return {
|
|
1357
1741
|
content: [
|
|
@@ -1371,36 +1755,92 @@ ${lines.join("\n")}`
|
|
|
1371
1755
|
},
|
|
1372
1756
|
withToolLogging("platform_delete_secret", async (params) => {
|
|
1373
1757
|
requireApiKey();
|
|
1374
|
-
const { deleteSecret } = await import("./langwatch-api-secrets-
|
|
1758
|
+
const { deleteSecret } = await import("./langwatch-api-secrets-6SHK5G7Q.js");
|
|
1375
1759
|
const result = await deleteSecret(params.id);
|
|
1376
1760
|
return { content: [{ type: "text", text: `Secret ${result.id} deleted.` }] };
|
|
1377
1761
|
})
|
|
1378
1762
|
);
|
|
1379
1763
|
server.tool(
|
|
1380
|
-
"
|
|
1381
|
-
"Start an
|
|
1764
|
+
"platform_run_experiment",
|
|
1765
|
+
"Start an experiment run by slug. Returns a run ID for polling status.",
|
|
1766
|
+
{
|
|
1767
|
+
slug: z2.string().describe("The experiment slug to run")
|
|
1768
|
+
},
|
|
1769
|
+
withToolLogging("platform_run_experiment", async (params) => {
|
|
1770
|
+
requireApiKey();
|
|
1771
|
+
return {
|
|
1772
|
+
content: [{ type: "text", text: await handleRunExperiment(params) }]
|
|
1773
|
+
};
|
|
1774
|
+
})
|
|
1775
|
+
);
|
|
1776
|
+
server.tool(
|
|
1777
|
+
"platform_experiment_status",
|
|
1778
|
+
"Check the status of an experiment run. Returns progress and summary when completed.",
|
|
1779
|
+
{
|
|
1780
|
+
runId: z2.string().describe("The run ID returned from platform_run_experiment")
|
|
1781
|
+
},
|
|
1782
|
+
withToolLogging("platform_experiment_status", async (params) => {
|
|
1783
|
+
requireApiKey();
|
|
1784
|
+
return {
|
|
1785
|
+
content: [{ type: "text", text: await handleExperimentStatus(params) }]
|
|
1786
|
+
};
|
|
1787
|
+
})
|
|
1788
|
+
);
|
|
1789
|
+
server.tool(
|
|
1790
|
+
"platform_experiment_list",
|
|
1791
|
+
"List experiments configured in the LangWatch project. Returns a markdown table with each experiment's slug, name, last-run timestamp, and run count. Use this to discover experiment slugs before drilling into runs with platform_experiment_list_runs. Output is capped (default 25, max 100) to protect the agent's context window.",
|
|
1382
1792
|
{
|
|
1383
|
-
|
|
1793
|
+
limit: z2.number().int().positive().max(100).optional().describe(
|
|
1794
|
+
"Maximum number of experiments to include (default 25, hard-capped at 100)"
|
|
1795
|
+
)
|
|
1384
1796
|
},
|
|
1385
|
-
withToolLogging("
|
|
1797
|
+
withToolLogging("platform_experiment_list", async (params) => {
|
|
1386
1798
|
requireApiKey();
|
|
1387
|
-
const { handleRunEvaluation } = await import("./run-evaluation-2X3V3Q6L.js");
|
|
1388
1799
|
return {
|
|
1389
|
-
content: [{ type: "text", text: await
|
|
1800
|
+
content: [{ type: "text", text: await handleExperimentList(params) }]
|
|
1390
1801
|
};
|
|
1391
1802
|
})
|
|
1392
1803
|
);
|
|
1393
1804
|
server.tool(
|
|
1394
|
-
"
|
|
1395
|
-
"
|
|
1805
|
+
"platform_experiment_list_runs",
|
|
1806
|
+
"List experiment runs for a specific experiment slug. Returns a markdown table with each run's id, status, started/finished timestamps, and pass-rate summary. Use this to discover run ids before calling platform_experiment_results. Output is capped (default 25, max 100) to protect the agent's context window.",
|
|
1396
1807
|
{
|
|
1397
|
-
|
|
1808
|
+
experimentSlug: z2.string().describe(
|
|
1809
|
+
"Experiment slug from platform_experiment_list (e.g. 'checkout-flow')"
|
|
1810
|
+
),
|
|
1811
|
+
limit: z2.number().int().positive().max(100).optional().describe(
|
|
1812
|
+
"Maximum number of runs to include (default 25, hard-capped at 100)"
|
|
1813
|
+
)
|
|
1398
1814
|
},
|
|
1399
|
-
withToolLogging("
|
|
1815
|
+
withToolLogging("platform_experiment_list_runs", async (params) => {
|
|
1400
1816
|
requireApiKey();
|
|
1401
|
-
const { handleEvaluationStatus } = await import("./run-evaluation-2X3V3Q6L.js");
|
|
1402
1817
|
return {
|
|
1403
|
-
content: [{ type: "text", text: await
|
|
1818
|
+
content: [{ type: "text", text: await handleExperimentListRuns(params) }]
|
|
1819
|
+
};
|
|
1820
|
+
})
|
|
1821
|
+
);
|
|
1822
|
+
server.tool(
|
|
1823
|
+
"platform_experiment_results",
|
|
1824
|
+
"Fetch per-row results for a completed experiment run so you can debug evaluator scores and missed rows. Returns a markdown report: per-evaluator averages plus row-by-row scores and failure details. Output is capped at 50 rows to protect the agent's context window \u2014 narrow with `filter: 'failed'` or `evaluator` to see what matters.",
|
|
1825
|
+
{
|
|
1826
|
+
runId: z2.string().describe("The run ID returned from platform_run_experiment"),
|
|
1827
|
+
experimentSlug: z2.string().optional().describe(
|
|
1828
|
+
"Experiment slug \u2014 required when fetching results for runs older than 24h (Redis state may have expired). Use platform_experiment_list_runs to find the slug."
|
|
1829
|
+
),
|
|
1830
|
+
filter: z2.enum(["all", "failed"]).optional().describe(
|
|
1831
|
+
"Filter rows: 'failed' shows only rows that errored or failed an evaluation; 'all' (default) shows everything"
|
|
1832
|
+
),
|
|
1833
|
+
evaluator: z2.string().optional().describe("Show only this evaluator's results (matched on `evaluator` field)"),
|
|
1834
|
+
limit: z2.number().int().positive().max(50).optional().describe(
|
|
1835
|
+
"Maximum number of rows to include in the markdown output (default 50, hard-capped at 50)."
|
|
1836
|
+
)
|
|
1837
|
+
},
|
|
1838
|
+
withToolLogging("platform_experiment_results", async (params) => {
|
|
1839
|
+
requireApiKey();
|
|
1840
|
+
return {
|
|
1841
|
+
content: [
|
|
1842
|
+
{ type: "text", text: await handleExperimentResults(params) }
|
|
1843
|
+
]
|
|
1404
1844
|
};
|
|
1405
1845
|
})
|
|
1406
1846
|
);
|
|
@@ -1415,7 +1855,7 @@ ${lines.join("\n")}`
|
|
|
1415
1855
|
async (params) => {
|
|
1416
1856
|
const { requireApiKey: requireApiKey2 } = await import("./config.js");
|
|
1417
1857
|
requireApiKey2();
|
|
1418
|
-
const { handleListDatasets } = await import("./list-datasets-
|
|
1858
|
+
const { handleListDatasets } = await import("./list-datasets-WUAE5HGX.js");
|
|
1419
1859
|
return {
|
|
1420
1860
|
content: [{ type: "text", text: await handleListDatasets(params) }]
|
|
1421
1861
|
};
|
|
@@ -1433,7 +1873,7 @@ ${lines.join("\n")}`
|
|
|
1433
1873
|
async (params) => {
|
|
1434
1874
|
const { requireApiKey: requireApiKey2 } = await import("./config.js");
|
|
1435
1875
|
requireApiKey2();
|
|
1436
|
-
const { handleGetDataset } = await import("./get-dataset-
|
|
1876
|
+
const { handleGetDataset } = await import("./get-dataset-6DQFYITM.js");
|
|
1437
1877
|
return {
|
|
1438
1878
|
content: [{ type: "text", text: await handleGetDataset(params) }]
|
|
1439
1879
|
};
|
|
@@ -1446,7 +1886,7 @@ ${lines.join("\n")}`
|
|
|
1446
1886
|
async (params) => {
|
|
1447
1887
|
const { requireApiKey: requireApiKey2 } = await import("./config.js");
|
|
1448
1888
|
requireApiKey2();
|
|
1449
|
-
const { handleCreateDataset } = await import("./create-dataset-
|
|
1889
|
+
const { handleCreateDataset } = await import("./create-dataset-WQSC37N7.js");
|
|
1450
1890
|
return {
|
|
1451
1891
|
content: [{ type: "text", text: await handleCreateDataset(params) }]
|
|
1452
1892
|
};
|
|
@@ -1463,7 +1903,7 @@ ${lines.join("\n")}`
|
|
|
1463
1903
|
async (params) => {
|
|
1464
1904
|
const { requireApiKey: requireApiKey2 } = await import("./config.js");
|
|
1465
1905
|
requireApiKey2();
|
|
1466
|
-
const { handleUpdateDataset } = await import("./update-dataset-
|
|
1906
|
+
const { handleUpdateDataset } = await import("./update-dataset-EYT5POFM.js");
|
|
1467
1907
|
return {
|
|
1468
1908
|
content: [{ type: "text", text: await handleUpdateDataset(params) }]
|
|
1469
1909
|
};
|
|
@@ -1478,7 +1918,7 @@ ${lines.join("\n")}`
|
|
|
1478
1918
|
async (params) => {
|
|
1479
1919
|
const { requireApiKey: requireApiKey2 } = await import("./config.js");
|
|
1480
1920
|
requireApiKey2();
|
|
1481
|
-
const { handleDeleteDataset } = await import("./delete-dataset-
|
|
1921
|
+
const { handleDeleteDataset } = await import("./delete-dataset-KDUOHL2P.js");
|
|
1482
1922
|
return {
|
|
1483
1923
|
content: [{ type: "text", text: await handleDeleteDataset(params) }]
|
|
1484
1924
|
};
|
|
@@ -1496,7 +1936,7 @@ ${lines.join("\n")}`
|
|
|
1496
1936
|
async (params) => {
|
|
1497
1937
|
const { requireApiKey: requireApiKey2 } = await import("./config.js");
|
|
1498
1938
|
requireApiKey2();
|
|
1499
|
-
const { handleListDatasetRecords } = await import("./list-dataset-records-
|
|
1939
|
+
const { handleListDatasetRecords } = await import("./list-dataset-records-I4BYORF5.js");
|
|
1500
1940
|
return {
|
|
1501
1941
|
content: [
|
|
1502
1942
|
{ type: "text", text: await handleListDatasetRecords(params) }
|
|
@@ -1514,7 +1954,7 @@ ${lines.join("\n")}`
|
|
|
1514
1954
|
async (params) => {
|
|
1515
1955
|
const { requireApiKey: requireApiKey2 } = await import("./config.js");
|
|
1516
1956
|
requireApiKey2();
|
|
1517
|
-
const { handleCreateDatasetRecords } = await import("./create-dataset-records-
|
|
1957
|
+
const { handleCreateDatasetRecords } = await import("./create-dataset-records-B4RL3FLC.js");
|
|
1518
1958
|
return {
|
|
1519
1959
|
content: [
|
|
1520
1960
|
{ type: "text", text: await handleCreateDatasetRecords(params) }
|
|
@@ -1533,7 +1973,7 @@ ${lines.join("\n")}`
|
|
|
1533
1973
|
async (params) => {
|
|
1534
1974
|
const { requireApiKey: requireApiKey2 } = await import("./config.js");
|
|
1535
1975
|
requireApiKey2();
|
|
1536
|
-
const { handleUpdateDatasetRecord } = await import("./update-dataset-record-
|
|
1976
|
+
const { handleUpdateDatasetRecord } = await import("./update-dataset-record-VFF5JTX4.js");
|
|
1537
1977
|
return {
|
|
1538
1978
|
content: [
|
|
1539
1979
|
{ type: "text", text: await handleUpdateDatasetRecord(params) }
|
|
@@ -1551,7 +1991,7 @@ ${lines.join("\n")}`
|
|
|
1551
1991
|
async (params) => {
|
|
1552
1992
|
const { requireApiKey: requireApiKey2 } = await import("./config.js");
|
|
1553
1993
|
requireApiKey2();
|
|
1554
|
-
const { handleDeleteDatasetRecords } = await import("./delete-dataset-records-
|
|
1994
|
+
const { handleDeleteDatasetRecords } = await import("./delete-dataset-records-DM4W3PAW.js");
|
|
1555
1995
|
return {
|
|
1556
1996
|
content: [
|
|
1557
1997
|
{ type: "text", text: await handleDeleteDatasetRecords(params) }
|
|
@@ -1559,9 +1999,144 @@ ${lines.join("\n")}`
|
|
|
1559
1999
|
};
|
|
1560
2000
|
}
|
|
1561
2001
|
);
|
|
2002
|
+
server.tool(
|
|
2003
|
+
"platform_list_projects",
|
|
2004
|
+
"List all projects in your LangWatch organization. Requires an org-level API key.",
|
|
2005
|
+
{
|
|
2006
|
+
page: z2.number().int().positive().optional().describe("Page number (default: 1)"),
|
|
2007
|
+
limit: z2.number().int().positive().max(1e3).optional().describe("Results per page (default: 100)")
|
|
2008
|
+
},
|
|
2009
|
+
withToolLogging("platform_list_projects", async (params) => {
|
|
2010
|
+
requireApiKey();
|
|
2011
|
+
const { handleListProjects } = await import("./list-projects-5FHMJ4PQ.js");
|
|
2012
|
+
return {
|
|
2013
|
+
content: [{ type: "text", text: await handleListProjects(params) }]
|
|
2014
|
+
};
|
|
2015
|
+
})
|
|
2016
|
+
);
|
|
2017
|
+
server.tool(
|
|
2018
|
+
"platform_get_project",
|
|
2019
|
+
"Get details of a specific project by its ID.",
|
|
2020
|
+
{
|
|
2021
|
+
id: z2.string().describe("The project ID")
|
|
2022
|
+
},
|
|
2023
|
+
withToolLogging("platform_get_project", async (params) => {
|
|
2024
|
+
requireApiKey();
|
|
2025
|
+
const { handleGetProject } = await import("./get-project-JCMWXVLU.js");
|
|
2026
|
+
return {
|
|
2027
|
+
content: [{ type: "text", text: await handleGetProject(params) }]
|
|
2028
|
+
};
|
|
2029
|
+
})
|
|
2030
|
+
);
|
|
2031
|
+
server.tool(
|
|
2032
|
+
"platform_create_project",
|
|
2033
|
+
`Create a new project in your LangWatch organization. Returns a one-time service API key for the project.
|
|
2034
|
+
|
|
2035
|
+
You must provide either teamId (to add the project to an existing team) or newTeamName (to create a new team for the project).`,
|
|
2036
|
+
{
|
|
2037
|
+
name: z2.string().describe("Project name"),
|
|
2038
|
+
language: z2.string().describe('Programming language (e.g. "python", "typescript")'),
|
|
2039
|
+
framework: z2.string().describe('Framework (e.g. "openai", "langchain", "custom")'),
|
|
2040
|
+
teamId: z2.string().optional().describe("ID of an existing team to add the project to"),
|
|
2041
|
+
newTeamName: z2.string().optional().describe("Name for a new team to create for this project")
|
|
2042
|
+
},
|
|
2043
|
+
withToolLogging("platform_create_project", async (params) => {
|
|
2044
|
+
requireApiKey();
|
|
2045
|
+
const { handleCreateProject } = await import("./create-project-CUVQ67VN.js");
|
|
2046
|
+
return {
|
|
2047
|
+
content: [{ type: "text", text: await handleCreateProject(params) }]
|
|
2048
|
+
};
|
|
2049
|
+
})
|
|
2050
|
+
);
|
|
2051
|
+
server.tool(
|
|
2052
|
+
"platform_update_project",
|
|
2053
|
+
"Update an existing project's name, language, framework, or PII redaction level.",
|
|
2054
|
+
{
|
|
2055
|
+
id: z2.string().describe("The project ID to update"),
|
|
2056
|
+
name: z2.string().optional().describe("New project name"),
|
|
2057
|
+
language: z2.string().optional().describe("New programming language"),
|
|
2058
|
+
framework: z2.string().optional().describe("New framework"),
|
|
2059
|
+
piiRedactionLevel: z2.enum(["STRICT", "ESSENTIAL", "DISABLED"]).optional().describe("PII redaction level")
|
|
2060
|
+
},
|
|
2061
|
+
withToolLogging("platform_update_project", async (params) => {
|
|
2062
|
+
requireApiKey();
|
|
2063
|
+
const { handleUpdateProject } = await import("./update-project-OIT4WPFI.js");
|
|
2064
|
+
return {
|
|
2065
|
+
content: [{ type: "text", text: await handleUpdateProject(params) }]
|
|
2066
|
+
};
|
|
2067
|
+
})
|
|
2068
|
+
);
|
|
2069
|
+
server.tool(
|
|
2070
|
+
"platform_archive_project",
|
|
2071
|
+
"Archive (soft-delete) a project. The project can be restored later if needed.",
|
|
2072
|
+
{
|
|
2073
|
+
id: z2.string().describe("The project ID to archive")
|
|
2074
|
+
},
|
|
2075
|
+
withToolLogging("platform_archive_project", async (params) => {
|
|
2076
|
+
requireApiKey();
|
|
2077
|
+
const { handleArchiveProject } = await import("./archive-project-HZBRPR2S.js");
|
|
2078
|
+
return {
|
|
2079
|
+
content: [{ type: "text", text: await handleArchiveProject(params) }]
|
|
2080
|
+
};
|
|
2081
|
+
})
|
|
2082
|
+
);
|
|
2083
|
+
server.tool(
|
|
2084
|
+
"platform_list_api_keys",
|
|
2085
|
+
"List all API keys in your LangWatch organization. Shows key metadata, status (active/revoked/expired), and role bindings. API key tokens are never returned.",
|
|
2086
|
+
{},
|
|
2087
|
+
withToolLogging("platform_list_api_keys", async () => {
|
|
2088
|
+
requireApiKey();
|
|
2089
|
+
const { handleListApiKeys } = await import("./list-api-keys-AWW7ROLB.js");
|
|
2090
|
+
return {
|
|
2091
|
+
content: [{ type: "text", text: await handleListApiKeys() }]
|
|
2092
|
+
};
|
|
2093
|
+
})
|
|
2094
|
+
);
|
|
2095
|
+
server.tool(
|
|
2096
|
+
"platform_create_api_key",
|
|
2097
|
+
`Create a new API key. Two types available:
|
|
2098
|
+
|
|
2099
|
+
- **personal**: Tied to a user, requires explicit role bindings (e.g. ADMIN on PROJECT:proj_123).
|
|
2100
|
+
- **service**: Not tied to a user. Use projectIds for project-scoped service keys, or omit for org-wide access.
|
|
2101
|
+
|
|
2102
|
+
The token is returned once and cannot be retrieved again.`,
|
|
2103
|
+
{
|
|
2104
|
+
keyType: z2.enum(["personal", "service"]).describe("Key type: 'personal' (user-tied) or 'service' (headless)"),
|
|
2105
|
+
name: z2.string().describe("Key name (max 100 chars)"),
|
|
2106
|
+
description: z2.string().optional().describe("Key description (max 500 chars)"),
|
|
2107
|
+
expiresAt: z2.string().optional().describe("Expiration date (ISO string)"),
|
|
2108
|
+
bindings: z2.array(z2.object({
|
|
2109
|
+
role: z2.enum(["ADMIN", "MEMBER", "VIEWER"]).describe("Role"),
|
|
2110
|
+
scopeType: z2.enum(["ORGANIZATION", "TEAM", "PROJECT"]).describe("Scope type"),
|
|
2111
|
+
scopeId: z2.string().describe("Scope ID (org, team, or project ID)")
|
|
2112
|
+
})).optional().describe("Role bindings (required for personal keys)"),
|
|
2113
|
+
projectIds: z2.array(z2.string()).optional().describe("Project IDs for service keys (creates ADMIN bindings per project)")
|
|
2114
|
+
},
|
|
2115
|
+
withToolLogging("platform_create_api_key", async (params) => {
|
|
2116
|
+
requireApiKey();
|
|
2117
|
+
const { handleCreateApiKey } = await import("./create-api-key-OQI5PUNQ.js");
|
|
2118
|
+
return {
|
|
2119
|
+
content: [{ type: "text", text: await handleCreateApiKey(params) }]
|
|
2120
|
+
};
|
|
2121
|
+
})
|
|
2122
|
+
);
|
|
2123
|
+
server.tool(
|
|
2124
|
+
"platform_revoke_api_key",
|
|
2125
|
+
"Revoke an API key. Once revoked, the key can no longer be used for authentication.",
|
|
2126
|
+
{
|
|
2127
|
+
id: z2.string().describe("The API key ID to revoke")
|
|
2128
|
+
},
|
|
2129
|
+
withToolLogging("platform_revoke_api_key", async (params) => {
|
|
2130
|
+
requireApiKey();
|
|
2131
|
+
const { handleRevokeApiKey } = await import("./revoke-api-key-ZSPSPF5G.js");
|
|
2132
|
+
return {
|
|
2133
|
+
content: [{ type: "text", text: await handleRevokeApiKey(params) }]
|
|
2134
|
+
};
|
|
2135
|
+
})
|
|
2136
|
+
);
|
|
1562
2137
|
}
|
|
1563
2138
|
|
|
1564
2139
|
export {
|
|
1565
2140
|
createMcpServer
|
|
1566
2141
|
};
|
|
1567
|
-
//# sourceMappingURL=chunk-
|
|
2142
|
+
//# sourceMappingURL=chunk-JVLJKQJG.js.map
|