@langwatch/mcp-server 0.6.1 → 0.8.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.
Files changed (241) hide show
  1. package/.release-please-shim +1 -0
  2. package/CHANGELOG.md +89 -0
  3. package/README.md +51 -8
  4. package/dist/{archive-scenario-YFD5THOR.js → archive-scenario-YKGLJ4MZ.js} +4 -4
  5. package/dist/archive-suite-QFNDO3Y3.js +15 -0
  6. package/dist/assign-prompt-tag-Y2B4CBBT.js +19 -0
  7. package/dist/chunk-B57MZ4WI.js +1573 -0
  8. package/dist/{chunk-IX6QJKAD.js → chunk-CPUPGDNA.js} +2 -2
  9. package/dist/chunk-FBRKHHJV.js +48 -0
  10. package/dist/{chunk-5UOPNRXW.js → chunk-HDJDFKZR.js} +10 -3
  11. package/dist/chunk-KOO5733S.js +72 -0
  12. package/dist/chunk-KZNBCKWG.js +39 -0
  13. package/dist/chunk-L6QENXYA.js +42 -0
  14. package/dist/{chunk-6U4TCGFC.js → chunk-NACSR6B7.js} +2 -2
  15. package/dist/chunk-NUFPTHKU.js +9 -0
  16. package/dist/chunk-OVQF3D5R.js +86 -0
  17. package/dist/chunk-PO7FM7IX.js +35 -0
  18. package/dist/chunk-PZUWCWOS.js +25 -0
  19. package/dist/chunk-WVI5CJ6S.js +21 -0
  20. package/dist/{chunk-LLRQIF52.js → chunk-YH2IBTEL.js} +54 -6
  21. package/dist/chunk-YI3OG4PI.js +71 -0
  22. package/dist/config.d.ts +17 -0
  23. package/dist/config.js +13 -0
  24. package/dist/create-agent-YRSDH7P7.js +23 -0
  25. package/dist/create-annotation-FYQNKMVJ.js +24 -0
  26. package/dist/create-dashboard-CORBR4YQ.js +18 -0
  27. package/dist/create-dataset-ZC63T6BB.js +22 -0
  28. package/dist/create-dataset-records-ILVNVKVR.js +22 -0
  29. package/dist/{create-evaluator-E5X5ZP3B.js → create-evaluator-2AU3PXFB.js} +4 -4
  30. package/dist/create-mcp-server.d.ts +8 -0
  31. package/dist/create-mcp-server.js +8 -0
  32. package/dist/{create-prompt-7Z35MIL6.js → create-prompt-NKRJ47YY.js} +7 -4
  33. package/dist/create-prompt-tag-S4JX3ULL.js +17 -0
  34. package/dist/{create-scenario-DIMPJRPY.js → create-scenario-BPRF75KF.js} +4 -4
  35. package/dist/create-suite-4YN7D6K2.js +38 -0
  36. package/dist/delete-agent-Y72R2YQA.js +18 -0
  37. package/dist/delete-annotation-UHWDMHSH.js +17 -0
  38. package/dist/delete-dashboard-LPWT36KN.js +18 -0
  39. package/dist/delete-dataset-GGPQRHKX.js +20 -0
  40. package/dist/delete-dataset-records-LTG5LT26.js +21 -0
  41. package/dist/delete-evaluator-F7QLXDHU.js +15 -0
  42. package/dist/delete-prompt-tag-B5UKZL45.js +17 -0
  43. package/dist/delete-workflow-4DGUDIDE.js +17 -0
  44. package/dist/get-agent-YEVICUX4.js +28 -0
  45. package/dist/{get-analytics-4YJW4S5L.js → get-analytics-3W5CMU3F.js} +22 -5
  46. package/dist/get-dashboard-NCQHN6MW.js +29 -0
  47. package/dist/get-dataset-KBK6PH36.js +48 -0
  48. package/dist/{get-evaluator-WDEH2F7M.js → get-evaluator-QDUL5LXR.js} +4 -4
  49. package/dist/{get-prompt-F6PDVC76.js → get-prompt-XCSSNRKR.js} +4 -4
  50. package/dist/{get-scenario-H24ZYNT5.js → get-scenario-FNRKOY7E.js} +4 -4
  51. package/dist/get-simulation-run-WOEKUF7K.js +56 -0
  52. package/dist/get-suite-U5AOD5TC.js +44 -0
  53. package/dist/{get-trace-27USKGO7.js → get-trace-MUWEJM2Z.js} +3 -3
  54. package/dist/get-workflow-SOA7MT7L.js +25 -0
  55. package/dist/http-server-7DMOCB75.js +224 -0
  56. package/dist/index.js +61640 -31868
  57. package/dist/langwatch-api-annotations-Q57NDUVR.js +17 -0
  58. package/dist/langwatch-api-dashboards-VBWWXV3Y.js +17 -0
  59. package/dist/langwatch-api-monitors-L3IY7FDT.js +52 -0
  60. package/dist/langwatch-api-secrets-S5HHF3XR.js +40 -0
  61. package/dist/langwatch-api-triggers-ME33QE26.js +30 -0
  62. package/dist/langwatch-api-workflows-4CJQAYP2.js +15 -0
  63. package/dist/list-agents-3HGIBJFM.js +32 -0
  64. package/dist/list-annotations-KWXYVEPI.js +33 -0
  65. package/dist/list-dashboards-VQ2LH666.js +32 -0
  66. package/dist/list-dataset-records-RNRGROJP.js +39 -0
  67. package/dist/list-datasets-I4A2LT2S.js +60 -0
  68. package/dist/{list-evaluators-KRGI72EH.js → list-evaluators-AKKRJ5MX.js} +4 -4
  69. package/dist/{list-model-providers-A5YCFTPI.js → list-model-providers-DVFEHFHZ.js} +4 -4
  70. package/dist/list-prompt-tags-PL5OISUA.js +23 -0
  71. package/dist/{list-prompts-LKJSE7XN.js → list-prompts-7VTFWE2Z.js} +3 -3
  72. package/dist/{list-scenarios-ZK5CMGC4.js → list-scenarios-5BZWZ6ZN.js} +4 -4
  73. package/dist/list-simulation-runs-WCZ6RLPE.js +43 -0
  74. package/dist/list-suites-RRQ2JX5Y.js +42 -0
  75. package/dist/list-workflows-UQB5FCX5.js +35 -0
  76. package/dist/rename-prompt-tag-TURD6KYU.js +18 -0
  77. package/dist/run-agent-BEJ4K4CM.js +36 -0
  78. package/dist/run-evaluation-AJ7WZNQD.js +64 -0
  79. package/dist/run-suite-U7V432G2.js +29 -0
  80. package/dist/run-workflow-5WX7DK5T.js +36 -0
  81. package/dist/{search-traces-SOKAAMAR.js → search-traces-ZCHNOMTX.js} +3 -3
  82. package/dist/{set-model-provider-7MGULZDH.js → set-model-provider-6CFHMCNE.js} +4 -4
  83. package/dist/update-agent-UE6UWLZP.js +20 -0
  84. package/dist/update-dataset-4XQZZE4S.js +22 -0
  85. package/dist/update-dataset-record-GNNM5TKM.js +19 -0
  86. package/dist/{update-evaluator-A3XINFLJ.js → update-evaluator-LHVDXIZD.js} +4 -4
  87. package/dist/{update-prompt-IW7X2UQM.js → update-prompt-3XEHECJ7.js} +5 -3
  88. package/dist/{update-scenario-ZT7TOBFR.js → update-scenario-DFPREYCD.js} +4 -4
  89. package/dist/update-suite-RATU5THO.js +39 -0
  90. package/package.json +22 -8
  91. package/src/__tests__/all-tools.integration.test.ts +353 -0
  92. package/src/__tests__/config.unit.test.ts +81 -1
  93. package/src/__tests__/datasets.integration.test.ts +620 -0
  94. package/src/__tests__/datasets.unit.test.ts +244 -0
  95. package/src/__tests__/docker.integration.test.ts +234 -0
  96. package/src/__tests__/http-transport.integration.test.ts +397 -0
  97. package/src/__tests__/langwatch-api.unit.test.ts +174 -0
  98. package/src/__tests__/scenario-tools.unit.test.ts +3 -0
  99. package/src/__tests__/tools.unit.test.ts +177 -0
  100. package/src/config.d.ts +15 -0
  101. package/src/config.ts +85 -7
  102. package/src/create-mcp-server.d.ts +6 -0
  103. package/src/create-mcp-server.ts +1799 -0
  104. package/src/http-server.ts +329 -0
  105. package/src/index.ts +22 -593
  106. package/src/langwatch-api-agents.ts +108 -0
  107. package/src/langwatch-api-annotations.ts +49 -0
  108. package/src/langwatch-api-dashboards.ts +48 -0
  109. package/src/langwatch-api-datasets.ts +191 -0
  110. package/src/langwatch-api-evaluators.ts +10 -0
  111. package/src/langwatch-api-monitors.ts +82 -0
  112. package/src/langwatch-api-secrets.ts +48 -0
  113. package/src/langwatch-api-simulation-runs.ts +51 -0
  114. package/src/langwatch-api-suites.ts +118 -0
  115. package/src/langwatch-api-triggers.ts +48 -0
  116. package/src/langwatch-api-workflows.ts +41 -0
  117. package/src/langwatch-api.ts +65 -3
  118. package/src/schemas/create-dataset.ts +48 -0
  119. package/src/schemas/index.ts +1 -0
  120. package/src/tools/archive-suite.ts +12 -0
  121. package/src/tools/assign-prompt-tag.ts +16 -0
  122. package/src/tools/create-agent.ts +15 -0
  123. package/src/tools/create-annotation.ts +18 -0
  124. package/src/tools/create-dashboard.ts +7 -0
  125. package/src/tools/create-dataset-records.ts +23 -0
  126. package/src/tools/create-dataset.ts +22 -0
  127. package/src/tools/create-prompt-tag.ts +12 -0
  128. package/src/tools/create-prompt.ts +4 -0
  129. package/src/tools/create-suite.ts +42 -0
  130. package/src/tools/delete-agent.ts +7 -0
  131. package/src/tools/delete-annotation.ts +7 -0
  132. package/src/tools/delete-dashboard.ts +7 -0
  133. package/src/tools/delete-dataset-records.ts +22 -0
  134. package/src/tools/delete-dataset.ts +20 -0
  135. package/src/tools/delete-evaluator.ts +12 -0
  136. package/src/tools/delete-prompt-tag.ts +12 -0
  137. package/src/tools/delete-workflow.ts +7 -0
  138. package/src/tools/format-dataset-mutation.ts +25 -0
  139. package/src/tools/get-agent.ts +21 -0
  140. package/src/tools/get-analytics.ts +30 -3
  141. package/src/tools/get-dashboard.ts +22 -0
  142. package/src/tools/get-dataset.ts +63 -0
  143. package/src/tools/get-prompt.ts +2 -1
  144. package/src/tools/get-simulation-run.ts +60 -0
  145. package/src/tools/get-suite.ts +47 -0
  146. package/src/tools/get-workflow.ts +17 -0
  147. package/src/tools/list-agents.ts +27 -0
  148. package/src/tools/list-annotations.ts +33 -0
  149. package/src/tools/list-dashboards.ts +27 -0
  150. package/src/tools/list-dataset-records.ts +46 -0
  151. package/src/tools/list-datasets.ts +80 -0
  152. package/src/tools/list-prompt-tags.ts +21 -0
  153. package/src/tools/list-simulation-runs.ts +49 -0
  154. package/src/tools/list-suites.ts +43 -0
  155. package/src/tools/list-workflows.ts +31 -0
  156. package/src/tools/rename-prompt-tag.ts +14 -0
  157. package/src/tools/run-agent.ts +36 -0
  158. package/src/tools/run-evaluation.ts +87 -0
  159. package/src/tools/run-suite.ts +28 -0
  160. package/src/tools/run-workflow.ts +36 -0
  161. package/src/tools/update-agent.ts +13 -0
  162. package/src/tools/update-dataset-record.ts +21 -0
  163. package/src/tools/update-dataset.ts +23 -0
  164. package/src/tools/update-prompt.ts +3 -0
  165. package/src/tools/update-suite.ts +44 -0
  166. package/src/utils/escape-markdown.ts +12 -0
  167. package/uv.lock +188 -530
  168. package/build.js +0 -12
  169. package/dist/archive-scenario-YFD5THOR.js.map +0 -1
  170. package/dist/chunk-5UOPNRXW.js.map +0 -1
  171. package/dist/chunk-6U4TCGFC.js.map +0 -1
  172. package/dist/chunk-AAQNA53E.js +0 -28
  173. package/dist/chunk-AAQNA53E.js.map +0 -1
  174. package/dist/chunk-IX6QJKAD.js.map +0 -1
  175. package/dist/chunk-LLRQIF52.js.map +0 -1
  176. package/dist/chunk-ZXKLPC2E.js.map +0 -1
  177. package/dist/config-FIQWQRUB.js +0 -11
  178. package/dist/config-FIQWQRUB.js.map +0 -1
  179. package/dist/create-evaluator-E5X5ZP3B.js.map +0 -1
  180. package/dist/create-prompt-7Z35MIL6.js.map +0 -1
  181. package/dist/create-scenario-DIMPJRPY.js.map +0 -1
  182. package/dist/discover-evaluator-schema-H23XCLNE.js.map +0 -1
  183. package/dist/discover-scenario-schema-MEEEVND7.js.map +0 -1
  184. package/dist/discover-schema-3T52ORPB.js.map +0 -1
  185. package/dist/get-analytics-4YJW4S5L.js.map +0 -1
  186. package/dist/get-evaluator-WDEH2F7M.js.map +0 -1
  187. package/dist/get-prompt-F6PDVC76.js.map +0 -1
  188. package/dist/get-scenario-H24ZYNT5.js.map +0 -1
  189. package/dist/get-trace-27USKGO7.js.map +0 -1
  190. package/dist/index.js.map +0 -1
  191. package/dist/list-evaluators-KRGI72EH.js.map +0 -1
  192. package/dist/list-model-providers-A5YCFTPI.js.map +0 -1
  193. package/dist/list-prompts-LKJSE7XN.js.map +0 -1
  194. package/dist/list-scenarios-ZK5CMGC4.js.map +0 -1
  195. package/dist/search-traces-SOKAAMAR.js.map +0 -1
  196. package/dist/set-model-provider-7MGULZDH.js.map +0 -1
  197. package/dist/update-evaluator-A3XINFLJ.js.map +0 -1
  198. package/dist/update-prompt-IW7X2UQM.js.map +0 -1
  199. package/dist/update-scenario-ZT7TOBFR.js.map +0 -1
  200. package/tests/evaluations.ipynb +0 -649
  201. package/tests/fixtures/azure/azure_openai_stream_bot_expected.py +0 -102
  202. package/tests/fixtures/azure/azure_openai_stream_bot_input.py +0 -78
  203. package/tests/fixtures/dspy/dspy_bot_expected.py +0 -61
  204. package/tests/fixtures/dspy/dspy_bot_input.py +0 -53
  205. package/tests/fixtures/fastapi/fastapi_app_expected.py +0 -68
  206. package/tests/fixtures/fastapi/fastapi_app_input.py +0 -60
  207. package/tests/fixtures/fastapi/prompt_management_fastapi_expected.py +0 -114
  208. package/tests/fixtures/fastapi/prompt_management_fastapi_input.py +0 -88
  209. package/tests/fixtures/haystack/haystack_bot_expected.py +0 -141
  210. package/tests/fixtures/haystack/haystack_bot_input.py +0 -69
  211. package/tests/fixtures/langchain/langchain_bot_expected.py +0 -53
  212. package/tests/fixtures/langchain/langchain_bot_input.py +0 -45
  213. package/tests/fixtures/langchain/langchain_bot_with_memory_expected.py +0 -69
  214. package/tests/fixtures/langchain/langchain_bot_with_memory_input.py +0 -61
  215. package/tests/fixtures/langchain/langchain_rag_bot_expected.py +0 -97
  216. package/tests/fixtures/langchain/langchain_rag_bot_input.py +0 -77
  217. package/tests/fixtures/langchain/langchain_rag_bot_vertex_ai_expected.py +0 -116
  218. package/tests/fixtures/langchain/langchain_rag_bot_vertex_ai_input.py +0 -81
  219. package/tests/fixtures/langchain/langgraph_rag_bot_with_threads_expected.py +0 -331
  220. package/tests/fixtures/langchain/langgraph_rag_bot_with_threads_input.py +0 -106
  221. package/tests/fixtures/litellm/litellm_bot_expected.py +0 -40
  222. package/tests/fixtures/litellm/litellm_bot_input.py +0 -35
  223. package/tests/fixtures/openai/openai_bot_expected.py +0 -43
  224. package/tests/fixtures/openai/openai_bot_function_call_expected.py +0 -91
  225. package/tests/fixtures/openai/openai_bot_function_call_input.py +0 -82
  226. package/tests/fixtures/openai/openai_bot_input.py +0 -36
  227. package/tests/fixtures/openai/openai_bot_rag_expected.py +0 -73
  228. package/tests/fixtures/openai/openai_bot_rag_input.py +0 -51
  229. package/tests/fixtures/opentelemetry/openinference_dspy_bot_expected.py +0 -63
  230. package/tests/fixtures/opentelemetry/openinference_dspy_bot_input.py +0 -58
  231. package/tests/fixtures/opentelemetry/openinference_langchain_bot_expected.py +0 -53
  232. package/tests/fixtures/opentelemetry/openinference_langchain_bot_input.py +0 -52
  233. package/tests/fixtures/opentelemetry/openinference_openai_bot_expected.py +0 -49
  234. package/tests/fixtures/opentelemetry/openinference_openai_bot_input.py +0 -41
  235. package/tests/fixtures/opentelemetry/openllmetry_openai_bot_expected.py +0 -44
  236. package/tests/fixtures/opentelemetry/openllmetry_openai_bot_input.py +0 -40
  237. package/tests/fixtures/strands/strands_bot_expected.py +0 -84
  238. package/tests/fixtures/strands/strands_bot_input.py +0 -52
  239. package/tests/scenario-openai.test.ts +0 -160
  240. package/tsup.config.ts +0 -10
  241. package/vitest.config.js +0 -7
@@ -0,0 +1,64 @@
1
+ import {
2
+ makeRequest
3
+ } from "./chunk-YH2IBTEL.js";
4
+ import "./chunk-KOO5733S.js";
5
+
6
+ // src/tools/run-evaluation.ts
7
+ async function handleRunEvaluation(params) {
8
+ const result = await makeRequest(
9
+ "POST",
10
+ `/api/evaluations/v3/${encodeURIComponent(params.slug)}/run`
11
+ );
12
+ const lines = [];
13
+ lines.push(`Evaluation started!
14
+ `);
15
+ lines.push(`**Run ID**: ${result.runId}`);
16
+ lines.push(`**Status**: ${result.status}`);
17
+ lines.push(`**Total cells**: ${result.total}`);
18
+ if (result.runUrl) lines.push(`**View at**: ${result.runUrl}`);
19
+ lines.push("");
20
+ lines.push(
21
+ `> Use \`platform_evaluation_status\` with run ID "${result.runId}" to check progress.`
22
+ );
23
+ return lines.join("\n");
24
+ }
25
+ async function handleEvaluationStatus(params) {
26
+ const status = await makeRequest(
27
+ "GET",
28
+ `/api/evaluations/v3/runs/${encodeURIComponent(params.runId)}`
29
+ );
30
+ const lines = [];
31
+ lines.push(`# Evaluation Run ${status.runId}
32
+ `);
33
+ lines.push(`**Status**: ${status.status}`);
34
+ lines.push(`**Progress**: ${status.progress}/${status.total} cells`);
35
+ if (status.startedAt) {
36
+ lines.push(`**Started**: ${new Date(status.startedAt).toISOString()}`);
37
+ }
38
+ if (status.finishedAt) {
39
+ lines.push(`**Finished**: ${new Date(status.finishedAt).toISOString()}`);
40
+ }
41
+ if (status.summary) {
42
+ lines.push("\n## Summary\n");
43
+ if (status.summary.completedCells !== void 0) {
44
+ lines.push(`**Completed**: ${status.summary.completedCells}`);
45
+ }
46
+ if (status.summary.failedCells) {
47
+ lines.push(`**Failed**: ${status.summary.failedCells}`);
48
+ }
49
+ if (status.summary.duration) {
50
+ lines.push(
51
+ `**Duration**: ${(status.summary.duration / 1e3).toFixed(1)}s`
52
+ );
53
+ }
54
+ if (status.summary.runUrl) {
55
+ lines.push(`**View results**: ${status.summary.runUrl}`);
56
+ }
57
+ }
58
+ return lines.join("\n");
59
+ }
60
+ export {
61
+ handleEvaluationStatus,
62
+ handleRunEvaluation
63
+ };
64
+ //# sourceMappingURL=run-evaluation-AJ7WZNQD.js.map
@@ -0,0 +1,29 @@
1
+ import {
2
+ runSuite
3
+ } from "./chunk-FBRKHHJV.js";
4
+ import "./chunk-YH2IBTEL.js";
5
+ import "./chunk-KOO5733S.js";
6
+
7
+ // src/tools/run-suite.ts
8
+ async function handleRunSuite(params) {
9
+ const result = await runSuite(params.id);
10
+ const lines = [];
11
+ lines.push(`Suite run scheduled successfully.`);
12
+ lines.push("");
13
+ lines.push(`**Batch Run ID**: ${result.batchRunId}`);
14
+ lines.push(`**Jobs**: ${result.jobCount}`);
15
+ lines.push(`**Set ID**: ${result.setId}`);
16
+ if (result.skippedArchived.scenarios.length > 0) {
17
+ lines.push(`
18
+ \u26A0\uFE0F Skipped archived scenarios: ${result.skippedArchived.scenarios.join(", ")}`);
19
+ }
20
+ if (result.skippedArchived.targets.length > 0) {
21
+ lines.push(`\u26A0\uFE0F Skipped archived targets: ${result.skippedArchived.targets.join(", ")}`);
22
+ }
23
+ lines.push("\nView results in the LangWatch dashboard under Simulations.");
24
+ return lines.join("\n");
25
+ }
26
+ export {
27
+ handleRunSuite
28
+ };
29
+ //# sourceMappingURL=run-suite-U7V432G2.js.map
@@ -0,0 +1,36 @@
1
+ import {
2
+ runWorkflow
3
+ } from "./chunk-PO7FM7IX.js";
4
+ import "./chunk-YH2IBTEL.js";
5
+ import "./chunk-KOO5733S.js";
6
+
7
+ // src/tools/run-workflow.ts
8
+ async function handleRunWorkflow(params) {
9
+ let parsedInput = {};
10
+ if (params.input) {
11
+ try {
12
+ parsedInput = JSON.parse(params.input);
13
+ } catch {
14
+ return "Error: `input` must be a valid JSON object.";
15
+ }
16
+ }
17
+ const result = await runWorkflow(params.id, parsedInput);
18
+ const lines = [];
19
+ lines.push(`Workflow "${params.id}" executed successfully.
20
+ `);
21
+ if (typeof result === "object" && result !== null) {
22
+ const output = result.output;
23
+ if (output !== void 0) {
24
+ lines.push("**Output:**");
25
+ lines.push(typeof output === "string" ? output : JSON.stringify(output, null, 2));
26
+ } else {
27
+ lines.push("**Result:**");
28
+ lines.push(JSON.stringify(result, null, 2));
29
+ }
30
+ }
31
+ return lines.join("\n");
32
+ }
33
+ export {
34
+ handleRunWorkflow
35
+ };
36
+ //# sourceMappingURL=run-workflow-5WX7DK5T.js.map
@@ -3,8 +3,8 @@ import {
3
3
  } from "./chunk-ZXKLPC2E.js";
4
4
  import {
5
5
  searchTraces
6
- } from "./chunk-LLRQIF52.js";
7
- import "./chunk-AAQNA53E.js";
6
+ } from "./chunk-YH2IBTEL.js";
7
+ import "./chunk-KOO5733S.js";
8
8
 
9
9
  // src/tools/search-traces.ts
10
10
  async function handleSearchTraces(params) {
@@ -69,4 +69,4 @@ async function handleSearchTraces(params) {
69
69
  export {
70
70
  handleSearchTraces
71
71
  };
72
- //# sourceMappingURL=search-traces-SOKAAMAR.js.map
72
+ //# sourceMappingURL=search-traces-ZCHNOMTX.js.map
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  setModelProvider
3
- } from "./chunk-IX6QJKAD.js";
4
- import "./chunk-LLRQIF52.js";
5
- import "./chunk-AAQNA53E.js";
3
+ } from "./chunk-CPUPGDNA.js";
4
+ import "./chunk-YH2IBTEL.js";
5
+ import "./chunk-KOO5733S.js";
6
6
 
7
7
  // src/tools/set-model-provider.ts
8
8
  async function handleSetModelProvider(params) {
@@ -30,4 +30,4 @@ async function handleSetModelProvider(params) {
30
30
  export {
31
31
  handleSetModelProvider
32
32
  };
33
- //# sourceMappingURL=set-model-provider-7MGULZDH.js.map
33
+ //# sourceMappingURL=set-model-provider-6CFHMCNE.js.map
@@ -0,0 +1,20 @@
1
+ import {
2
+ updateAgent
3
+ } from "./chunk-YI3OG4PI.js";
4
+ import "./chunk-YH2IBTEL.js";
5
+ import "./chunk-KOO5733S.js";
6
+
7
+ // src/tools/update-agent.ts
8
+ async function handleUpdateAgent(params) {
9
+ const { id, ...data } = params;
10
+ const agent = await updateAgent({ id, ...data });
11
+ return `Agent updated successfully!
12
+
13
+ **Name**: ${agent.name}
14
+ **ID**: ${agent.id}
15
+ **Type**: ${agent.type}`;
16
+ }
17
+ export {
18
+ handleUpdateAgent
19
+ };
20
+ //# sourceMappingURL=update-agent-UE6UWLZP.js.map
@@ -0,0 +1,22 @@
1
+ import {
2
+ formatDatasetMutationDetails
3
+ } from "./chunk-WVI5CJ6S.js";
4
+ import "./chunk-NUFPTHKU.js";
5
+ import {
6
+ updateDataset
7
+ } from "./chunk-OVQF3D5R.js";
8
+ import "./chunk-YH2IBTEL.js";
9
+ import "./chunk-KOO5733S.js";
10
+
11
+ // src/tools/update-dataset.ts
12
+ async function handleUpdateDataset(params) {
13
+ const result = await updateDataset(params);
14
+ const lines = [];
15
+ lines.push("Dataset updated successfully!\n");
16
+ lines.push(...formatDatasetMutationDetails(result));
17
+ return lines.join("\n");
18
+ }
19
+ export {
20
+ handleUpdateDataset
21
+ };
22
+ //# sourceMappingURL=update-dataset-4XQZZE4S.js.map
@@ -0,0 +1,19 @@
1
+ import {
2
+ updateDatasetRecord
3
+ } from "./chunk-OVQF3D5R.js";
4
+ import "./chunk-YH2IBTEL.js";
5
+ import "./chunk-KOO5733S.js";
6
+
7
+ // src/tools/update-dataset-record.ts
8
+ async function handleUpdateDatasetRecord(params) {
9
+ const result = await updateDatasetRecord(params);
10
+ const lines = [];
11
+ lines.push("Record updated successfully!\n");
12
+ lines.push(`**Record ID**: ${result.id}`);
13
+ lines.push(`**Entry**: ${JSON.stringify(result.entry)}`);
14
+ return lines.join("\n");
15
+ }
16
+ export {
17
+ handleUpdateDatasetRecord
18
+ };
19
+ //# sourceMappingURL=update-dataset-record-GNNM5TKM.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  getEvaluatorType,
3
3
  updateEvaluator
4
- } from "./chunk-5UOPNRXW.js";
5
- import "./chunk-LLRQIF52.js";
6
- import "./chunk-AAQNA53E.js";
4
+ } from "./chunk-HDJDFKZR.js";
5
+ import "./chunk-YH2IBTEL.js";
6
+ import "./chunk-KOO5733S.js";
7
7
 
8
8
  // src/tools/update-evaluator.ts
9
9
  async function handleUpdateEvaluator(params) {
@@ -21,4 +21,4 @@ async function handleUpdateEvaluator(params) {
21
21
  export {
22
22
  handleUpdateEvaluator
23
23
  };
24
- //# sourceMappingURL=update-evaluator-A3XINFLJ.js.map
24
+ //# sourceMappingURL=update-evaluator-LHVDXIZD.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  updatePrompt
3
- } from "./chunk-LLRQIF52.js";
4
- import "./chunk-AAQNA53E.js";
3
+ } from "./chunk-YH2IBTEL.js";
4
+ import "./chunk-KOO5733S.js";
5
5
 
6
6
  // src/tools/update-prompt.ts
7
7
  async function handleUpdatePrompt(params) {
@@ -14,9 +14,11 @@ async function handleUpdatePrompt(params) {
14
14
  if (result.latestVersionNumber != null)
15
15
  lines.push(`**Version**: v${result.latestVersionNumber}`);
16
16
  lines.push(`**Commit**: ${params.commitMessage}`);
17
+ if (params.tags && params.tags.length > 0)
18
+ lines.push(`**Tags**: ${params.tags.join(", ")}`);
17
19
  return lines.join("\n");
18
20
  }
19
21
  export {
20
22
  handleUpdatePrompt
21
23
  };
22
- //# sourceMappingURL=update-prompt-IW7X2UQM.js.map
24
+ //# sourceMappingURL=update-prompt-3XEHECJ7.js.map
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  updateScenario
3
- } from "./chunk-6U4TCGFC.js";
4
- import "./chunk-LLRQIF52.js";
5
- import "./chunk-AAQNA53E.js";
3
+ } from "./chunk-NACSR6B7.js";
4
+ import "./chunk-YH2IBTEL.js";
5
+ import "./chunk-KOO5733S.js";
6
6
 
7
7
  // src/tools/update-scenario.ts
8
8
  async function handleUpdateScenario(params) {
@@ -24,4 +24,4 @@ async function handleUpdateScenario(params) {
24
24
  export {
25
25
  handleUpdateScenario
26
26
  };
27
- //# sourceMappingURL=update-scenario-ZT7TOBFR.js.map
27
+ //# sourceMappingURL=update-scenario-DFPREYCD.js.map
@@ -0,0 +1,39 @@
1
+ import {
2
+ updateSuite
3
+ } from "./chunk-FBRKHHJV.js";
4
+ import "./chunk-YH2IBTEL.js";
5
+ import "./chunk-KOO5733S.js";
6
+
7
+ // src/tools/update-suite.ts
8
+ async function handleUpdateSuite(params) {
9
+ let parsedTargets;
10
+ if (params.targets) {
11
+ try {
12
+ parsedTargets = JSON.parse(params.targets);
13
+ } catch {
14
+ return "Error: `targets` must be a valid JSON array.";
15
+ }
16
+ }
17
+ const suite = await updateSuite({
18
+ id: params.id,
19
+ name: params.name,
20
+ description: params.description,
21
+ scenarioIds: params.scenarioIds,
22
+ targets: parsedTargets,
23
+ repeatCount: params.repeatCount,
24
+ labels: params.labels
25
+ });
26
+ return [
27
+ `Suite "${suite.name}" updated successfully.`,
28
+ "",
29
+ `**ID**: ${suite.id}`,
30
+ `**Slug**: ${suite.slug}`,
31
+ `**Scenarios**: ${suite.scenarioIds.length}`,
32
+ `**Targets**: ${suite.targets.length}`,
33
+ `**Repeat**: ${suite.repeatCount}x`
34
+ ].join("\n");
35
+ }
36
+ export {
37
+ handleUpdateSuite
38
+ };
39
+ //# sourceMappingURL=update-suite-RATU5THO.js.map
package/package.json CHANGED
@@ -1,15 +1,27 @@
1
1
  {
2
2
  "name": "@langwatch/mcp-server",
3
- "version": "0.6.1",
3
+ "version": "0.8.0",
4
4
  "description": "An MCP server for Langwatch.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
- "module": "./dist/index.mjs",
7
+ "module": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
- "import": "./dist/index.mjs",
11
+ "import": "./dist/index.js",
12
12
  "require": "./dist/index.js"
13
+ },
14
+ "./create-mcp-server": {
15
+ "types": "./src/create-mcp-server.d.ts",
16
+ "import": "./dist/create-mcp-server.js",
17
+ "require": "./dist/create-mcp-server.js",
18
+ "default": "./dist/create-mcp-server.js"
19
+ },
20
+ "./config": {
21
+ "types": "./src/config.d.ts",
22
+ "import": "./dist/config.js",
23
+ "require": "./dist/config.js",
24
+ "default": "./dist/config.js"
13
25
  }
14
26
  },
15
27
  "repository": {
@@ -24,18 +36,19 @@
24
36
  },
25
37
  "devDependencies": {
26
38
  "@ai-sdk/anthropic": "^3.0.44",
27
- "@anthropic-ai/claude-code": "^2.1.72",
28
- "@eslint/js": "^9.4.0",
39
+ "@anthropic-ai/claude-code": "^2.1.119",
40
+ "@eslint/js": "^10.0.1",
29
41
  "@langwatch/scenario": "^0.4.6",
30
42
  "@types/debug": "^4.1.12",
31
43
  "@types/eslint__js": "^8.42.3",
32
- "@types/node": "^16.0.0",
44
+ "@types/express": "^5.0.6",
45
+ "@types/node": "^25.6.0",
33
46
  "@types/yargs": "^17.0.33",
34
47
  "@typescript/native-preview": "7.0.0-dev.20250911.1",
35
48
  "ai": "^6.0.0",
36
49
  "dotenv": "^17.2.2",
37
50
  "esbuild": "^0.25.0",
38
- "eslint": "^8.57.0",
51
+ "eslint": "^10.2.1",
39
52
  "tsup": "^8.1.0",
40
53
  "tsx": "^4.20.5",
41
54
  "typescript": "^5.0.0",
@@ -44,9 +57,10 @@
44
57
  "dependencies": {
45
58
  "@modelcontextprotocol/sdk": "^1.26.0",
46
59
  "@opentelemetry/context-async-hooks": "^2.1.0",
47
- "@opentelemetry/sdk-node": "^0.204.0",
60
+ "@opentelemetry/sdk-node": "^0.217.0",
48
61
  "chalk": "^5.6.2",
49
62
  "date-fns": "^4.1.0",
63
+ "express": "^5.2.1",
50
64
  "node-pty": "^1.0.0",
51
65
  "vitest": "^3.2.4",
52
66
  "yargs": "^17.7.2",