@langwatch/mcp-server 2.2.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/dist/add-dashboard-widget-55UI6H22.js +44 -0
- package/dist/add-dashboard-widget-MJHIC3CC.js +45 -0
- package/dist/{archive-project-SPVHXK6A.js → archive-project-K5UD7A6X.js} +4 -4
- package/dist/{archive-project-KWFM3I5Z.js → archive-project-L4PAKT34.js} +4 -4
- package/dist/{archive-run-plan-65QN3XRX.js → archive-run-plan-5HSQG2HX.js} +4 -4
- package/dist/{archive-run-plan-Z4SYE6BP.js → archive-run-plan-AOKNYQIO.js} +4 -4
- package/dist/{archive-scenario-FXEYQNEH.js → archive-scenario-2CWJW2VD.js} +4 -4
- package/dist/{archive-scenario-A6QV5LOW.js → archive-scenario-5IJQESHH.js} +4 -4
- package/dist/{archive-test-suite-NKZDZY3D.js → archive-test-suite-OPB7NFI7.js} +4 -4
- package/dist/{archive-test-suite-5ADQ3KPQ.js → archive-test-suite-ZC3TN6VH.js} +4 -4
- package/dist/{assign-prompt-tag-5IUZXJ2T.js → assign-prompt-tag-6DDE6ZZ5.js} +3 -3
- package/dist/{assign-prompt-tag-HBZLBIFD.js → assign-prompt-tag-D7O23MJM.js} +3 -3
- package/dist/{chunk-HGELNIVY.js → chunk-4RX3G62A.js} +3 -3
- package/dist/{chunk-UWLE5T2F.js → chunk-7CZQDZ2K.js} +10 -3
- package/dist/{chunk-I7ATIZED.js → chunk-7GETGE6B.js} +2 -2
- package/dist/{chunk-3OCG3QPU.js → chunk-AASW2TO2.js} +2 -2
- package/dist/{chunk-UTJCWXPZ.js → chunk-B4RFWIUP.js} +2 -2
- package/dist/{chunk-B4J3PJLX.js → chunk-D2HS73VI.js} +2 -6
- package/dist/{chunk-H6WGMG2T.js → chunk-DULFP3MK.js} +1 -1
- package/dist/{chunk-YCARO42Z.js → chunk-EYPJBL7P.js} +3 -3
- package/dist/{chunk-SUPUUC4W.js → chunk-GA5JUSPT.js} +2 -2
- package/dist/{chunk-Y34DHR5K.js → chunk-HLQJXUR6.js} +2 -2
- package/dist/{chunk-SXFC3FNH.js → chunk-KILVK3FS.js} +2 -2
- package/dist/chunk-MOCU5XWF.js +79 -0
- package/dist/chunk-O2WGVCED.js +41 -0
- package/dist/{chunk-NKMTIHIJ.js → chunk-QXLMHLRC.js} +2 -2
- package/dist/{chunk-J7PQKBLD.js → chunk-R5YJIYPF.js} +512 -402
- package/dist/{chunk-JRJPH75H.js → chunk-RFC2SBEX.js} +2 -2
- package/dist/{chunk-UNJM3BIL.js → chunk-SHSVN3SE.js} +2 -2
- package/dist/{chunk-PTDR56Z3.js → chunk-VOUGDY2O.js} +2 -2
- package/dist/chunk-WCKZDOGF.js +31 -0
- package/dist/{chunk-7VNSRCXO.js → chunk-XQYH52SI.js} +2 -2
- package/dist/{chunk-VMWJD732.js → chunk-YCIUEZVK.js} +2 -2
- package/dist/{config-EAKW6F26.js → config-2WQGMAEN.js} +2 -2
- package/dist/config.js +1 -1
- package/dist/{create-agent-AYZ3LB3V.js → create-agent-6JNLMYQD.js} +4 -4
- package/dist/{create-agent-S5ZBCEFT.js → create-agent-IRZOU4R5.js} +4 -4
- package/dist/create-analytics-report-N4L4V5QL.js +19 -0
- package/dist/create-analytics-report-QEHXG7FU.js +18 -0
- package/dist/{create-annotation-VUSXULQK.js → create-annotation-CCEGIZ67.js} +4 -4
- package/dist/{create-annotation-LHNCLHYP.js → create-annotation-DTHCMWHB.js} +4 -4
- package/dist/{create-api-key-NNYKARMG.js → create-api-key-JKM2DSZO.js} +4 -4
- package/dist/{create-api-key-T4KSNPKB.js → create-api-key-JPEUIXGM.js} +4 -4
- package/dist/{create-dataset-LUP5PVDM.js → create-dataset-DJNXYJ5B.js} +4 -4
- package/dist/{create-dataset-2MC4SD4O.js → create-dataset-WON4SOTC.js} +4 -4
- package/dist/{create-dataset-records-NSKBZP3G.js → create-dataset-records-TMEOTLTO.js} +4 -4
- package/dist/{create-dataset-records-W4GLN2FV.js → create-dataset-records-UJBW3C7C.js} +4 -4
- package/dist/{create-evaluator-HMTYO5SS.js → create-evaluator-N5AEHI4K.js} +4 -4
- package/dist/{create-evaluator-643G6LXL.js → create-evaluator-XYNY2YFY.js} +4 -4
- package/dist/create-mcp-server.cjs +769 -570
- package/dist/create-mcp-server.js +502 -392
- package/dist/{create-project-KAIC46UY.js → create-project-EY4XZ7TH.js} +4 -4
- package/dist/{create-project-6N7PIYRY.js → create-project-YL345T5L.js} +4 -4
- package/dist/{create-prompt-E67LXIYT.js → create-prompt-JZQNQ7I3.js} +3 -3
- package/dist/{create-prompt-PKJ7EDRR.js → create-prompt-ZUMQHHX7.js} +3 -3
- package/dist/{create-prompt-tag-4YO3FSJ3.js → create-prompt-tag-CJ5FZ436.js} +3 -3
- package/dist/{create-prompt-tag-OPQUEXWB.js → create-prompt-tag-JFP2Q3PO.js} +3 -3
- package/dist/{create-scenario-5PJBMAXO.js → create-scenario-CQU2SSFB.js} +4 -4
- package/dist/{create-scenario-UEM77OE7.js → create-scenario-S6OWWKJO.js} +4 -4
- package/dist/{create-test-suite-SZEPVXSE.js → create-test-suite-OLGCAGJA.js} +4 -4
- package/dist/{create-test-suite-4IPXVSFQ.js → create-test-suite-Y7P2RI4L.js} +4 -4
- package/dist/{create-trigger-PRELMT6J.js → create-trigger-4CNBTISJ.js} +4 -4
- package/dist/{create-trigger-5HZSCRAN.js → create-trigger-RQ653WYF.js} +4 -4
- package/dist/dashboards-BA7M6CMO.js +90 -0
- package/dist/dashboards-U663GUIB.js +91 -0
- package/dist/{delete-agent-QMEK3XHK.js → delete-agent-J2Q4DRZ2.js} +4 -4
- package/dist/{delete-agent-JUIZWAXG.js → delete-agent-ZAU4LTXB.js} +4 -4
- package/dist/delete-analytics-report-QK6X7P4S.js +19 -0
- package/dist/delete-analytics-report-YUYLDHLL.js +18 -0
- package/dist/{delete-annotation-HY3O2OGR.js → delete-annotation-7X4NYXXM.js} +4 -4
- package/dist/{delete-annotation-VKIQWUYW.js → delete-annotation-KJOCDLV3.js} +4 -4
- package/dist/{delete-dataset-WKRUW4FP.js → delete-dataset-NXP7ZPPV.js} +4 -4
- package/dist/{delete-dataset-HQCR66MG.js → delete-dataset-RUTZBBVD.js} +4 -4
- package/dist/{delete-dataset-records-C2IQFFVQ.js → delete-dataset-records-4Z7DZCDW.js} +4 -4
- package/dist/{delete-dataset-records-SDUHQLLM.js → delete-dataset-records-75UAR5IS.js} +4 -4
- package/dist/{delete-evaluator-4SNSCLEE.js → delete-evaluator-E3CUNGTQ.js} +4 -4
- package/dist/{delete-evaluator-QP3QHTLN.js → delete-evaluator-RI4GALGX.js} +4 -4
- package/dist/{delete-prompt-tag-NZ4JQMYG.js → delete-prompt-tag-LE3WJPKS.js} +3 -3
- package/dist/{delete-prompt-tag-YYQ4VMAD.js → delete-prompt-tag-S4KBZTNG.js} +3 -3
- package/dist/{delete-workflow-JSWABL5F.js → delete-workflow-4CZFIQCQ.js} +4 -4
- package/dist/{delete-workflow-5J46T73T.js → delete-workflow-PWQPDW6H.js} +4 -4
- package/dist/{discover-schema-A33SLMXW.js → discover-schema-7WHIIATI.js} +4 -4
- package/dist/{discover-schema-55YJBFGQ.js → discover-schema-J2ANOBKO.js} +4 -4
- package/dist/{get-agent-LJQX7OF4.js → get-agent-5T3CXQOR.js} +4 -4
- package/dist/{get-agent-OTIYUFZA.js → get-agent-ZKYQJUQ7.js} +4 -4
- package/dist/{get-analytics-IQZKJHLW.js → get-analytics-4MPEK4KV.js} +3 -3
- package/dist/{get-analytics-DCS72353.js → get-analytics-ZLI3A4F5.js} +3 -3
- package/dist/get-analytics-report-JCKYMA2S.js +29 -0
- package/dist/get-analytics-report-SKIP2JWH.js +30 -0
- package/dist/{get-dataset-ALSP7RTX.js → get-dataset-APGZBYMH.js} +4 -4
- package/dist/{get-dataset-X4B5JDG2.js → get-dataset-LWXDVMVE.js} +4 -4
- package/dist/{get-evaluator-XEUZGZCH.js → get-evaluator-3A7BJBAB.js} +4 -4
- package/dist/{get-evaluator-ISMC4LLI.js → get-evaluator-IWNJINRY.js} +4 -4
- package/dist/{get-project-RM6FRCBK.js → get-project-EQVB4LEL.js} +4 -4
- package/dist/{get-project-5VKROSDH.js → get-project-RK6AJTEP.js} +4 -4
- package/dist/{get-prompt-OWXJZHQQ.js → get-prompt-TLG2T2DS.js} +3 -3
- package/dist/{get-prompt-W52DY36E.js → get-prompt-ZER557X3.js} +3 -3
- package/dist/{get-run-plan-RUXQ6PAX.js → get-run-plan-5X7DDJRN.js} +4 -4
- package/dist/{get-run-plan-BE3M2AUX.js → get-run-plan-PEHRO5M3.js} +4 -4
- package/dist/{get-scenario-YM4ODWW6.js → get-scenario-375W5D6I.js} +4 -4
- package/dist/{get-scenario-RNM7BAX2.js → get-scenario-UQX45ZZO.js} +4 -4
- package/dist/{get-simulation-run-LCFSMPGQ.js → get-simulation-run-2NBXJADG.js} +4 -4
- package/dist/{get-simulation-run-6GIATQE5.js → get-simulation-run-QZTLGL7W.js} +4 -4
- package/dist/{get-test-suite-GC2O7YH6.js → get-test-suite-GVIBDG7K.js} +4 -4
- package/dist/{get-test-suite-P5LJ6VLF.js → get-test-suite-OODIR3RI.js} +4 -4
- package/dist/{get-trace-SEF3FMR5.js → get-trace-AGCHVPJK.js} +3 -3
- package/dist/{get-trace-KBRVV4NN.js → get-trace-KJLYAZRC.js} +3 -3
- package/dist/{get-workflow-7PVED7JE.js → get-workflow-3TV2YYC5.js} +4 -4
- package/dist/{get-workflow-YXULW4GC.js → get-workflow-7LZSVPP2.js} +4 -4
- package/dist/{http-server-IR4QOS43.js → http-server-7CCN3EHJ.js} +245 -45
- package/dist/index.js +1750 -870
- package/dist/langwatch-api-analytics-reports-6CF6KUET.js +17 -0
- package/dist/langwatch-api-analytics-reports-RPFB5AO5.js +18 -0
- package/dist/{langwatch-api-annotations-TBHLCQ5R.js → langwatch-api-annotations-H4AI4TKG.js} +4 -4
- package/dist/{langwatch-api-annotations-6SA4OB4C.js → langwatch-api-annotations-QSJNUQQS.js} +4 -4
- package/dist/{langwatch-api-monitors-CBF3FGIM.js → langwatch-api-monitors-ENHLOL3S.js} +3 -3
- package/dist/{langwatch-api-monitors-YNWA2M5Y.js → langwatch-api-monitors-OHSGADTH.js} +3 -3
- package/dist/{langwatch-api-secrets-RNFO4LF2.js → langwatch-api-secrets-AGW6UUMD.js} +3 -3
- package/dist/{langwatch-api-secrets-ADTOJELP.js → langwatch-api-secrets-CLTS766Q.js} +3 -3
- package/dist/{langwatch-api-triggers-KQDQC6L5.js → langwatch-api-triggers-G5UWFNN2.js} +4 -4
- package/dist/{langwatch-api-triggers-QS7HDIVW.js → langwatch-api-triggers-QMR7KEXW.js} +4 -4
- package/dist/langwatch-api-workflows-HKTBIKKY.js +15 -0
- package/dist/{langwatch-api-workflows-OKC4FXIF.js → langwatch-api-workflows-OMROZH2O.js} +4 -4
- package/dist/{list-agents-HVYWEQMI.js → list-agents-BYWDNAHT.js} +4 -4
- package/dist/{list-agents-RBAOCF53.js → list-agents-MG24MHZE.js} +4 -4
- package/dist/list-analytics-reports-G3EPWGSQ.js +32 -0
- package/dist/list-analytics-reports-PPWIFRES.js +33 -0
- package/dist/{list-annotations-HJH4NBLD.js → list-annotations-QCLGEK5A.js} +4 -4
- package/dist/{list-annotations-J4UAHSUN.js → list-annotations-Y4EUBJHG.js} +4 -4
- package/dist/{list-api-keys-A2PMV435.js → list-api-keys-DAVOBPFK.js} +4 -4
- package/dist/{list-api-keys-7UTJRZDG.js → list-api-keys-JMW5WRXX.js} +4 -4
- package/dist/list-dashboards-2P3VJFRS.js +29 -0
- package/dist/list-dashboards-MW5O3MKH.js +30 -0
- package/dist/{list-dataset-records-WFM7F33C.js → list-dataset-records-KEHT7G6Q.js} +4 -4
- package/dist/{list-dataset-records-M5TKA6LK.js → list-dataset-records-KMLLMZAZ.js} +4 -4
- package/dist/{list-datasets-B5X4P7BQ.js → list-datasets-P3JK2ZHS.js} +4 -4
- package/dist/{list-datasets-THUKQHPX.js → list-datasets-Z7OOE4KI.js} +4 -4
- package/dist/{list-evaluators-MYH2OVCI.js → list-evaluators-7RRESBOU.js} +4 -4
- package/dist/{list-evaluators-NLVWF6K7.js → list-evaluators-VATJVOHR.js} +4 -4
- package/dist/{list-model-providers-3JUGP4YI.js → list-model-providers-OXDRPUCJ.js} +4 -4
- package/dist/{list-model-providers-H3XKORFO.js → list-model-providers-VXQJWDXU.js} +4 -4
- package/dist/{list-projects-6EJ5YYEW.js → list-projects-HUVK7L3W.js} +4 -4
- package/dist/{list-projects-YNNSRMLC.js → list-projects-X72ZXVY5.js} +4 -4
- package/dist/{list-prompt-tags-NVFQO6WX.js → list-prompt-tags-3I3LWFIR.js} +3 -3
- package/dist/{list-prompt-tags-XUQTTAH4.js → list-prompt-tags-DRHUH2ND.js} +3 -3
- package/dist/{list-prompts-IRI6AIXO.js → list-prompts-6DX3QECJ.js} +3 -3
- package/dist/{list-prompts-HSIMMHTF.js → list-prompts-PS423RU3.js} +3 -3
- package/dist/{list-run-plans-QALLCN2K.js → list-run-plans-5SXPOV3X.js} +4 -4
- package/dist/{list-run-plans-PX2XI6EK.js → list-run-plans-6VNHINPY.js} +4 -4
- package/dist/{list-scenarios-SSJQEMJP.js → list-scenarios-EQWCW7Q4.js} +4 -4
- package/dist/{list-scenarios-QZRPVHS4.js → list-scenarios-GKNH3YND.js} +4 -4
- package/dist/{list-simulation-runs-OEADLLQR.js → list-simulation-runs-KHY7KALI.js} +4 -4
- package/dist/{list-simulation-runs-KNOLGMDV.js → list-simulation-runs-PUDK32C2.js} +4 -4
- package/dist/{list-test-suites-ANAQBLDG.js → list-test-suites-7H2DRILK.js} +4 -4
- package/dist/{list-test-suites-N4WVLBKK.js → list-test-suites-GY56LGLY.js} +4 -4
- package/dist/{list-trigger-fires-JV3WFYYG.js → list-trigger-fires-7RZUP54Y.js} +4 -4
- package/dist/{list-trigger-fires-WTW4DVIW.js → list-trigger-fires-OZUF65LI.js} +4 -4
- package/dist/{list-triggers-SQNIG35Q.js → list-triggers-BGUCUXTJ.js} +4 -4
- package/dist/{list-triggers-V4Y356AK.js → list-triggers-XC5KMX4C.js} +4 -4
- package/dist/{list-workflows-ZHTX5LCL.js → list-workflows-55NYC3PC.js} +4 -4
- package/dist/{list-workflows-IMSX7SXU.js → list-workflows-HV7FUWZA.js} +4 -4
- package/dist/{rename-prompt-tag-IQI7MHOI.js → rename-prompt-tag-2I7Z5FCY.js} +3 -3
- package/dist/{rename-prompt-tag-PA2BRIE6.js → rename-prompt-tag-SZYTOWDX.js} +3 -3
- package/dist/{rename-test-suite-4J7UX5S2.js → rename-test-suite-27AYY33K.js} +4 -4
- package/dist/{rename-test-suite-NNVLMLKY.js → rename-test-suite-CLIEPZDO.js} +4 -4
- package/dist/{report-issue-AS34ZMJF.js → report-issue-5HSL7CNB.js} +28 -2
- package/dist/{report-issue-DCZFLGDO.js → report-issue-N7ND5TM6.js} +28 -2
- package/dist/{rerun-run-plan-TG2V4WM4.js → rerun-run-plan-O3VUZ6CG.js} +4 -4
- package/dist/{rerun-run-plan-ZI5OY3VA.js → rerun-run-plan-OJTVVGJI.js} +4 -4
- package/dist/{revoke-api-key-SFMEFWJC.js → revoke-api-key-BU6BKGCG.js} +4 -4
- package/dist/{revoke-api-key-3J3ZA4UB.js → revoke-api-key-NZNCFOIR.js} +4 -4
- package/dist/{run-agent-W4VJP72Z.js → run-agent-244O4Y5M.js} +4 -4
- package/dist/{run-agent-YNV6ZHW4.js → run-agent-HPCGZGYW.js} +4 -4
- package/dist/{run-plan-6C77GWG4.js → run-plan-2ZPGGZ4H.js} +4 -4
- package/dist/{run-plan-PAARQSI4.js → run-plan-KSXUYQT3.js} +4 -4
- package/dist/{run-query-KJDH544C.js → run-query-4LMOQ5UW.js} +4 -4
- package/dist/{run-query-T4QW2Z5O.js → run-query-BQUHIUC2.js} +4 -4
- package/dist/{run-test-suite-SQJELEZX.js → run-test-suite-P3WLVPXC.js} +4 -4
- package/dist/{run-test-suite-STB6NUJM.js → run-test-suite-UEOMCON6.js} +4 -4
- package/dist/{run-workflow-SP32SO5M.js → run-workflow-EFZ6HG5B.js} +4 -4
- package/dist/{run-workflow-D6PQNBI6.js → run-workflow-I4IHEN54.js} +4 -4
- package/dist/{search-traces-HCBGOG6R.js → search-traces-6IR7PR4L.js} +3 -3
- package/dist/{search-traces-HSTQ6WTQ.js → search-traces-BYML2NQ4.js} +3 -3
- package/dist/{set-model-provider-KDQ7C4EZ.js → set-model-provider-RBNGWFVI.js} +4 -4
- package/dist/{set-model-provider-GF7NXUJA.js → set-model-provider-SHEVKWRC.js} +4 -4
- package/dist/{update-agent-DWG43T2P.js → update-agent-PTKTM2B5.js} +4 -4
- package/dist/{update-agent-MXNOBS4H.js → update-agent-ZPXWRMS2.js} +4 -4
- package/dist/update-dashboard-widget-HKCBXH7X.js +62 -0
- package/dist/update-dashboard-widget-IP2TTQ5G.js +63 -0
- package/dist/{update-dataset-DQH3OHOU.js → update-dataset-GHIN6JR3.js} +4 -4
- package/dist/{update-dataset-SQZ6T4WX.js → update-dataset-IRVMY5PF.js} +4 -4
- package/dist/{update-dataset-record-7PLDGTMR.js → update-dataset-record-6VI7K2CL.js} +4 -4
- package/dist/{update-dataset-record-3AT4IPBC.js → update-dataset-record-Z3L7ACNF.js} +4 -4
- package/dist/{update-evaluator-4LFTKFPT.js → update-evaluator-5NLNE6VY.js} +4 -4
- package/dist/{update-evaluator-IGTX6PX4.js → update-evaluator-FEH7H6NS.js} +4 -4
- package/dist/{update-project-QVHSJRUP.js → update-project-75H3LDQT.js} +4 -4
- package/dist/{update-project-PLJIOZS6.js → update-project-QPR3QX55.js} +4 -4
- package/dist/{update-prompt-GDKRYJI3.js → update-prompt-BCDFTNLK.js} +3 -3
- package/dist/{update-prompt-MY263DYF.js → update-prompt-NPRXYSWA.js} +3 -3
- package/dist/{update-scenario-7KA3JDXA.js → update-scenario-BNOMDCMV.js} +4 -4
- package/dist/{update-scenario-MOHRQKAQ.js → update-scenario-EM5XGMB7.js} +4 -4
- package/package.json +2 -2
- package/pyproject.toml +17 -2
- package/src/config.d.ts +2 -0
- package/src/config.ts +2 -0
- package/src/create-mcp-server.ts +148 -41
- package/src/langwatch-api-analytics-reports.ts +62 -0
- package/src/langwatch-api-dashboard-widgets.ts +3 -68
- package/src/langwatch-api-dashboards.ts +110 -28
- package/src/langwatch-api-projects.ts +0 -17
- package/src/langwatch-api.ts +10 -0
- package/src/schemas/widget-sources.ts +33 -0
- package/src/tools/add-dashboard-widget.ts +20 -32
- package/src/tools/create-analytics-report.ts +7 -0
- package/src/tools/dashboard-widget-queries.ts +13 -0
- package/src/tools/dashboards.ts +104 -0
- package/src/tools/delete-analytics-report.ts +7 -0
- package/src/tools/get-analytics-report.ts +23 -0
- package/src/tools/list-analytics-reports.ts +27 -0
- package/src/tools/list-dashboards.ts +20 -21
- package/src/tools/report-issue.ts +2 -0
- package/src/tools/run-experiment.ts +5 -1
- package/src/tools/update-dashboard-widget.ts +29 -40
- package/uv.lock +667 -341
- package/dist/add-dashboard-widget-4ZC5UN73.js +0 -50
- package/dist/add-dashboard-widget-ACC6QYBG.js +0 -49
- package/dist/chunk-5FNCQRCX.js +0 -91
- package/dist/chunk-ILZDO25L.js +0 -36
- package/dist/chunk-K2I7Z3LZ.js +0 -28
- package/dist/create-dashboard-DHVFMEU4.js +0 -18
- package/dist/create-dashboard-WTKKS5Z6.js +0 -19
- package/dist/delete-dashboard-76N66XXL.js +0 -18
- package/dist/delete-dashboard-JVIVHNJM.js +0 -19
- package/dist/get-dashboard-5NYJEIX2.js +0 -29
- package/dist/get-dashboard-QMTYDQAZ.js +0 -30
- package/dist/langwatch-api-dashboards-6EO2VVZW.js +0 -17
- package/dist/langwatch-api-dashboards-NHU5BZD7.js +0 -18
- package/dist/langwatch-api-workflows-XGJE6SR5.js +0 -15
- package/dist/list-dashboard-boards-OPWROHMG.js +0 -33
- package/dist/list-dashboard-boards-U2GJ7GC5.js +0 -34
- package/dist/list-dashboards-ROSYFLDQ.js +0 -33
- package/dist/list-dashboards-RQ635ZU7.js +0 -32
- package/dist/update-dashboard-widget-CJKJLCDY.js +0 -71
- package/dist/update-dashboard-widget-CYQDS2NR.js +0 -70
- package/src/langwatch-api-boards.ts +0 -46
- package/src/tools/create-dashboard.ts +0 -7
- package/src/tools/dashboard-exists.ts +0 -25
- package/src/tools/delete-dashboard.ts +0 -7
- package/src/tools/get-dashboard.ts +0 -22
- package/src/tools/list-dashboard-boards.ts +0 -28
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-3YLN3ATJ.js";
|
|
14
14
|
import {
|
|
15
15
|
testAgent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-4RX3G62A.js";
|
|
17
17
|
import {
|
|
18
18
|
runParametersSchema,
|
|
19
19
|
runPlanScopeSchema,
|
|
@@ -31,19 +31,19 @@ import {
|
|
|
31
31
|
} from "./chunk-6YZUOD34.js";
|
|
32
32
|
import {
|
|
33
33
|
updateTestSuite
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-YCIUEZVK.js";
|
|
35
35
|
import {
|
|
36
36
|
LangWatchApiError,
|
|
37
37
|
makeRequest,
|
|
38
38
|
package_default
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-7CZQDZ2K.js";
|
|
40
40
|
import {
|
|
41
41
|
requireApiKey
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-DULFP3MK.js";
|
|
43
43
|
|
|
44
44
|
// src/create-mcp-server.ts
|
|
45
45
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
46
|
-
import { z as
|
|
46
|
+
import { z as z3 } from "zod";
|
|
47
47
|
|
|
48
48
|
// src/documentation-fetch.ts
|
|
49
49
|
var TRUSTED_DOCUMENTATION_ORIGIN = "https://langwatch.ai";
|
|
@@ -158,6 +158,25 @@ var createDatasetSchema = z.object({
|
|
|
158
158
|
columnTypes: z.array(datasetColumnDefinitionSchema).optional().describe("Column definitions for the dataset")
|
|
159
159
|
});
|
|
160
160
|
|
|
161
|
+
// src/schemas/widget-sources.ts
|
|
162
|
+
import { z as z2 } from "zod";
|
|
163
|
+
var WIDGET_SOURCES = [
|
|
164
|
+
"application",
|
|
165
|
+
"simulation",
|
|
166
|
+
"evaluation",
|
|
167
|
+
"sample",
|
|
168
|
+
"coding_agent",
|
|
169
|
+
"ai_tool",
|
|
170
|
+
"gateway",
|
|
171
|
+
"workflow",
|
|
172
|
+
"playground",
|
|
173
|
+
"langy",
|
|
174
|
+
"other"
|
|
175
|
+
];
|
|
176
|
+
var widgetSourcesInput = z2.array(z2.enum(WIDGET_SOURCES)).max(WIDGET_SOURCES.length).nullable().optional().describe(
|
|
177
|
+
`The trace origins every query of the widget counts: any of ${WIDGET_SOURCES.join(", ")} (other = any origin not listed). A new widget counts ["application"]; add "langy" to count your own conversations, as a widget about Langy's requests needs. null makes it unset again, counting the default.`
|
|
178
|
+
);
|
|
179
|
+
|
|
161
180
|
// src/tools/experiment-run-status.ts
|
|
162
181
|
var INTERRUPTED_THRESHOLD_MS = 5 * 60 * 1e3;
|
|
163
182
|
var deriveRunStatus = (timestamps, now = Date.now()) => {
|
|
@@ -537,7 +556,8 @@ async function handleExperimentList(params) {
|
|
|
537
556
|
async function handleRunExperiment(params) {
|
|
538
557
|
const result = await makeRequest(
|
|
539
558
|
"POST",
|
|
540
|
-
`/api/v1/experiments/${encodeURIComponent(params.slug)}/run
|
|
559
|
+
`/api/v1/experiments/${encodeURIComponent(params.slug)}/run`,
|
|
560
|
+
params.concurrency !== void 0 ? { concurrency: params.concurrency } : void 0
|
|
541
561
|
);
|
|
542
562
|
const lines = [];
|
|
543
563
|
lines.push(`Evaluation started!
|
|
@@ -688,8 +708,8 @@ async function handleUpdateTestSuite(params) {
|
|
|
688
708
|
}
|
|
689
709
|
|
|
690
710
|
// src/create-mcp-server.ts
|
|
691
|
-
var modelSchema =
|
|
692
|
-
'Model in "provider/model-name" format, e.g., "openai/gpt-
|
|
711
|
+
var modelSchema = z3.string().describe(
|
|
712
|
+
'Model in "provider/model-name" format, e.g., "openai/gpt-6-luna", "anthropic/claude-sonnet-4-5-20250929"'
|
|
693
713
|
);
|
|
694
714
|
function createMcpServer() {
|
|
695
715
|
const server = new McpServer({
|
|
@@ -724,6 +744,7 @@ function registerTools(server) {
|
|
|
724
744
|
registerEvaluatorTools(server);
|
|
725
745
|
registerModelProviderTools(server);
|
|
726
746
|
registerAgentTools(server);
|
|
747
|
+
registerAnalyticsReportTools(server);
|
|
727
748
|
registerDashboardTools(server);
|
|
728
749
|
registerWorkflowTools(server);
|
|
729
750
|
registerAnnotationTools(server);
|
|
@@ -740,7 +761,7 @@ function registerDocsTools(server) {
|
|
|
740
761
|
"fetch_langwatch_docs",
|
|
741
762
|
"Fetches the LangWatch docs for understanding how to implement LangWatch in your codebase. Always use this tool when the user asks for help with LangWatch. Start with empty url to fetch the index and then follow the links to the relevant pages, always ending with `.md` extension",
|
|
742
763
|
{
|
|
743
|
-
url:
|
|
764
|
+
url: z3.string().optional().describe(
|
|
744
765
|
"The full url of the specific doc page. If not provided, the docs index will be fetched."
|
|
745
766
|
)
|
|
746
767
|
},
|
|
@@ -753,21 +774,21 @@ function registerDocsTools(server) {
|
|
|
753
774
|
"report_issue",
|
|
754
775
|
"Report an issue to the LangWatch team: anything that did not work, confused you, or took trial and error while using LangWatch (docs, MCP tools, CLI, SDKs, the platform). Use it whenever you struggled, it is how rough edges get fixed for every agent. Ask the user for permission first, then call with user_approved=true. Works without an API key. Put VERBATIM error messages in the summary; optionally attach raw session content. Secrets, API keys, emails and phone numbers are redacted locally before anything is sent.",
|
|
755
776
|
{
|
|
756
|
-
user_approved:
|
|
777
|
+
user_approved: z3.boolean().describe(
|
|
757
778
|
"Must be true, and only after the user explicitly agreed to send this report to LangWatch"
|
|
758
779
|
),
|
|
759
|
-
title:
|
|
760
|
-
summary:
|
|
780
|
+
title: z3.string().max(300).describe("One-line description of the issue"),
|
|
781
|
+
summary: z3.string().optional().describe(
|
|
761
782
|
"What you were trying to do, what went wrong (verbatim errors), and what you had to figure out the hard way"
|
|
762
783
|
),
|
|
763
|
-
session_content:
|
|
784
|
+
session_content: z3.string().optional().describe(
|
|
764
785
|
"Optional raw session transcript or log excerpt (JSONL or plain text); redacted locally before sending"
|
|
765
786
|
),
|
|
766
|
-
contact_email:
|
|
767
|
-
agent:
|
|
787
|
+
contact_email: z3.string().optional().describe("Optional contact email for follow-up"),
|
|
788
|
+
agent: z3.string().optional().describe("Which coding agent this is, e.g. claude-code, codex, cursor")
|
|
768
789
|
},
|
|
769
790
|
withToolLogging("report_issue", async (params) => {
|
|
770
|
-
const { handleReportIssue } = await import("./report-issue-
|
|
791
|
+
const { handleReportIssue } = await import("./report-issue-N7ND5TM6.js");
|
|
771
792
|
return {
|
|
772
793
|
content: [{ type: "text", text: await handleReportIssue(params) }]
|
|
773
794
|
};
|
|
@@ -777,7 +798,7 @@ function registerDocsTools(server) {
|
|
|
777
798
|
"fetch_scenario_docs",
|
|
778
799
|
"Fetches the Scenario docs for understanding how to implement Scenario agent tests in your codebase. Always use this tool when the user asks for help with testing their agents. Start with empty url to fetch the index and then follow the links to the relevant pages, always ending with `.md` extension",
|
|
779
800
|
{
|
|
780
|
-
url:
|
|
801
|
+
url: z3.string().optional().describe(
|
|
781
802
|
"The full url of the specific doc page. If not provided, the docs index will be fetched."
|
|
782
803
|
)
|
|
783
804
|
},
|
|
@@ -792,7 +813,7 @@ function registerObservabilityTools(server) {
|
|
|
792
813
|
"discover_schema",
|
|
793
814
|
"Discover what LangWatch can be queried with: the trace filter fields and syntax, the analytics SQL views and columns, the analytics metrics, aggregation types, group-by options, scenario schema and evaluator types. Call this before using search_traces, run_query, get_analytics, scenario tools or evaluator tools, so you never guess a field, a column or a value.",
|
|
794
815
|
{
|
|
795
|
-
category:
|
|
816
|
+
category: z3.enum([
|
|
796
817
|
"filters",
|
|
797
818
|
"lwql",
|
|
798
819
|
"metrics",
|
|
@@ -804,7 +825,7 @@ function registerObservabilityTools(server) {
|
|
|
804
825
|
]).describe(
|
|
805
826
|
"Which schema category to discover. 'filters' is the trace filter language, 'lwql' the analytics SQL views; both are read from the platform and need the API key"
|
|
806
827
|
),
|
|
807
|
-
evaluatorType:
|
|
828
|
+
evaluatorType: z3.string().optional().describe(
|
|
808
829
|
"When category is 'evaluators', provide a specific evaluator type (e.g. 'langevals/llm_boolean') to get its full schema details"
|
|
809
830
|
)
|
|
810
831
|
},
|
|
@@ -821,7 +842,7 @@ function registerObservabilityTools(server) {
|
|
|
821
842
|
content: [{ type: "text", text: formatEvaluatorSchema(evaluatorType) }]
|
|
822
843
|
};
|
|
823
844
|
}
|
|
824
|
-
const { formatSchema, needsQueryReference } = await import("./discover-schema-
|
|
845
|
+
const { formatSchema, needsQueryReference } = await import("./discover-schema-J2ANOBKO.js");
|
|
825
846
|
if (needsQueryReference(category)) requireApiKey();
|
|
826
847
|
let text = await formatSchema(category);
|
|
827
848
|
if (category === "all") {
|
|
@@ -837,16 +858,16 @@ function registerObservabilityTools(server) {
|
|
|
837
858
|
"run_query",
|
|
838
859
|
"Run one read-only analytics SQL statement (LangWatchQL) over this project's traces, spans, evaluations and metrics, and get the rows back as a table. This is the tool for a count, a rate, a sum, a percentile or any of them grouped or over time \u2014 questions search_traces would need many calls to answer. The statement runs exactly as written. Call discover_schema with category 'lwql' first for the views, columns and worked statements.",
|
|
839
860
|
{
|
|
840
|
-
sql:
|
|
861
|
+
sql: z3.string().describe(
|
|
841
862
|
"The SELECT to run. Filter on the dataset's time column so the read is bounded, and never select a whole attribute map"
|
|
842
863
|
),
|
|
843
|
-
parameters:
|
|
864
|
+
parameters: z3.record(z3.string(), z3.union([z3.string(), z3.number(), z3.boolean(), z3.null()])).optional().describe(
|
|
844
865
|
'Values for the parameters the statement declares, e.g. {"days": 7} for {days:UInt32}'
|
|
845
866
|
)
|
|
846
867
|
},
|
|
847
868
|
withToolLogging("run_query", async (params) => {
|
|
848
869
|
requireApiKey();
|
|
849
|
-
const { handleRunQuery } = await import("./run-query-
|
|
870
|
+
const { handleRunQuery } = await import("./run-query-4LMOQ5UW.js");
|
|
850
871
|
return {
|
|
851
872
|
content: [{ type: "text", text: await handleRunQuery(params) }]
|
|
852
873
|
};
|
|
@@ -856,29 +877,29 @@ function registerObservabilityTools(server) {
|
|
|
856
877
|
"search_traces",
|
|
857
878
|
"Search LangWatch traces by content, with filters and a date range. Returns AI-readable trace digests by default. Use format: 'json' for full raw data. To fetch a trace you already have the ID for, use get_trace instead \u2014 free text does not match trace IDs.",
|
|
858
879
|
{
|
|
859
|
-
query:
|
|
880
|
+
query: z3.string().optional().describe(
|
|
860
881
|
"Text search query. Matches captured input/output, the trace name and span names ONLY. It does not match trace IDs \u2014 to fetch a known trace ID use get_trace, or pass traceIds here for several at once."
|
|
861
882
|
),
|
|
862
|
-
traceIds:
|
|
883
|
+
traceIds: z3.array(z3.string().min(1)).min(1).max(1e3).optional().describe(
|
|
863
884
|
"Exact trace IDs to fetch (1\u20131000). Use instead of query when you already know the IDs. When set and no startDate is given, the window defaults to the last 90 days rather than 24 hours."
|
|
864
885
|
),
|
|
865
|
-
filters:
|
|
886
|
+
filters: z3.record(z3.string(), z3.array(z3.string())).optional().describe(
|
|
866
887
|
'Filter traces by the older per-field map. Format: {"field": ["value"]}. Use discover_schema for field names.'
|
|
867
888
|
),
|
|
868
|
-
filter:
|
|
889
|
+
filter: z3.string().optional().describe(
|
|
869
890
|
'Filter traces with the Trace Explorer\'s own query language: "status:error AND model:gpt-*", "trace.attribute.langwatch.user_id:alice", "evaluatorVerdict:fail", a quoted phrase for free text. Reaches attribute keys, span events and evaluator verdicts that the `filters` map cannot. Combined with `filters` and `query` when you send more than one. Call discover_schema with category \'filters\' for every field and the syntax.'
|
|
870
891
|
),
|
|
871
|
-
startDate:
|
|
892
|
+
startDate: z3.string().min(1).optional().describe(
|
|
872
893
|
'Start of the window: ISO date, or relative like "24h", "7d", "4w", "3m" \u2014 units are h (hours), d (days), w (weeks), m (30-day months). Defaults to 24h ago for a text search, or 90d when traceIds is set. Widen this when a search comes back empty.'
|
|
873
894
|
),
|
|
874
|
-
endDate:
|
|
875
|
-
pageSize:
|
|
876
|
-
scrollId:
|
|
877
|
-
format:
|
|
895
|
+
endDate: z3.string().min(1).optional().describe("End of the window: ISO date or relative. Default: now"),
|
|
896
|
+
pageSize: z3.number().optional().describe("Results per page (default: 25, max: 1000)"),
|
|
897
|
+
scrollId: z3.string().optional().describe("Pagination token from previous search"),
|
|
898
|
+
format: z3.enum(["digest", "json"]).optional().describe("Output format: 'digest' (default, AI-readable) or 'json' (full raw data)")
|
|
878
899
|
},
|
|
879
900
|
withToolLogging("search_traces", async (params) => {
|
|
880
901
|
requireApiKey();
|
|
881
|
-
const { handleSearchTraces } = await import("./search-traces-
|
|
902
|
+
const { handleSearchTraces } = await import("./search-traces-BYML2NQ4.js");
|
|
882
903
|
return {
|
|
883
904
|
content: [{ type: "text", text: await handleSearchTraces(params) }]
|
|
884
905
|
};
|
|
@@ -888,14 +909,14 @@ function registerObservabilityTools(server) {
|
|
|
888
909
|
"get_trace",
|
|
889
910
|
"Get full details of a single trace by ID. This is the right tool whenever you have a trace ID \u2014 search_traces does not match IDs. A full ID resolves at any age; a unique 8\u201331 character hex prefix resolves within the last 90 days. Returns AI-readable trace digest by default. Use format: 'json' for full raw data including all spans.",
|
|
890
911
|
{
|
|
891
|
-
traceId:
|
|
912
|
+
traceId: z3.string().describe(
|
|
892
913
|
"The trace ID to retrieve. A full ID resolves at any age; a unique 8\u201331 character hex prefix also resolves, git-style, within the last 90 days."
|
|
893
914
|
),
|
|
894
|
-
format:
|
|
915
|
+
format: z3.enum(["digest", "json"]).optional().describe("Output format: 'digest' (default, AI-readable) or 'json' (full raw data)")
|
|
895
916
|
},
|
|
896
917
|
withToolLogging("get_trace", async (params) => {
|
|
897
918
|
requireApiKey();
|
|
898
|
-
const { handleGetTrace } = await import("./get-trace-
|
|
919
|
+
const { handleGetTrace } = await import("./get-trace-AGCHVPJK.js");
|
|
899
920
|
return {
|
|
900
921
|
content: [{ type: "text", text: await handleGetTrace(params) }]
|
|
901
922
|
};
|
|
@@ -905,21 +926,21 @@ function registerObservabilityTools(server) {
|
|
|
905
926
|
"get_analytics",
|
|
906
927
|
'Query analytics timeseries from LangWatch. Metrics use "category.name" format (e.g., "performance.completion_time"). Use discover_schema to see available metrics.',
|
|
907
928
|
{
|
|
908
|
-
metric:
|
|
929
|
+
metric: z3.string().describe(
|
|
909
930
|
'Metric in "category.name" format, e.g., "metadata.trace_id", "performance.total_cost"'
|
|
910
931
|
),
|
|
911
|
-
aggregation:
|
|
932
|
+
aggregation: z3.string().optional().describe(
|
|
912
933
|
"Aggregation type: avg, sum, min, max, median, p90, p95, p99, cardinality, terms. Default: avg"
|
|
913
934
|
),
|
|
914
|
-
startDate:
|
|
915
|
-
endDate:
|
|
916
|
-
timeZone:
|
|
917
|
-
groupBy:
|
|
918
|
-
filters:
|
|
935
|
+
startDate: z3.string().optional().describe('Start date: ISO or relative ("7d", "30d"). Default: 7 days ago'),
|
|
936
|
+
endDate: z3.string().optional().describe("End date. Default: now"),
|
|
937
|
+
timeZone: z3.string().optional().describe("Timezone. Default: UTC"),
|
|
938
|
+
groupBy: z3.string().optional().describe("Group results by field. Use discover_schema for options."),
|
|
939
|
+
filters: z3.record(z3.string(), z3.array(z3.string())).optional().describe("Filters to apply")
|
|
919
940
|
},
|
|
920
941
|
withToolLogging("get_analytics", async (params) => {
|
|
921
942
|
requireApiKey();
|
|
922
|
-
const { handleGetAnalytics } = await import("./get-analytics-
|
|
943
|
+
const { handleGetAnalytics } = await import("./get-analytics-ZLI3A4F5.js");
|
|
923
944
|
return {
|
|
924
945
|
content: [{ type: "text", text: await handleGetAnalytics(params) }]
|
|
925
946
|
};
|
|
@@ -938,22 +959,22 @@ NOTE: Prompts can be managed two ways. Determine which approach the user needs:
|
|
|
938
959
|
2. Platform-based (LangWatch UI): If the user wants to manage prompts directly on the LangWatch platform, use the \`platform_\` MCP tools (\`platform_create_prompt\`, \`platform_update_prompt\`, etc.).
|
|
939
960
|
`,
|
|
940
961
|
{
|
|
941
|
-
name:
|
|
942
|
-
handle:
|
|
943
|
-
messages:
|
|
944
|
-
|
|
945
|
-
role:
|
|
946
|
-
content:
|
|
962
|
+
name: z3.string().describe("Prompt display name"),
|
|
963
|
+
handle: z3.string().optional().describe("URL-friendly handle (auto-generated from name if omitted)"),
|
|
964
|
+
messages: z3.array(
|
|
965
|
+
z3.object({
|
|
966
|
+
role: z3.enum(["system", "user", "assistant"]).describe("Message role"),
|
|
967
|
+
content: z3.string().describe("Message content")
|
|
947
968
|
})
|
|
948
969
|
).describe("Prompt messages"),
|
|
949
970
|
model: modelSchema,
|
|
950
|
-
tags:
|
|
971
|
+
tags: z3.array(z3.string()).optional().describe(
|
|
951
972
|
'Tags to assign to the initial version (e.g., ["production", "staging"]). Built-in tags: "latest" (auto-assigned), "production", "staging". Custom tags must be created first.'
|
|
952
973
|
)
|
|
953
974
|
},
|
|
954
975
|
withToolLogging("platform_create_prompt", async (params) => {
|
|
955
976
|
requireApiKey();
|
|
956
|
-
const { handleCreatePrompt } = await import("./create-prompt-
|
|
977
|
+
const { handleCreatePrompt } = await import("./create-prompt-JZQNQ7I3.js");
|
|
957
978
|
return {
|
|
958
979
|
content: [{ type: "text", text: await handleCreatePrompt(params) }]
|
|
959
980
|
};
|
|
@@ -965,7 +986,7 @@ NOTE: Prompts can be managed two ways. Determine which approach the user needs:
|
|
|
965
986
|
{},
|
|
966
987
|
withToolLogging("platform_list_prompts", async () => {
|
|
967
988
|
requireApiKey();
|
|
968
|
-
const { handleListPrompts } = await import("./list-prompts-
|
|
989
|
+
const { handleListPrompts } = await import("./list-prompts-PS423RU3.js");
|
|
969
990
|
return {
|
|
970
991
|
content: [{ type: "text", text: await handleListPrompts() }]
|
|
971
992
|
};
|
|
@@ -975,12 +996,12 @@ NOTE: Prompts can be managed two ways. Determine which approach the user needs:
|
|
|
975
996
|
"platform_get_prompt",
|
|
976
997
|
"Get a specific prompt from the LangWatch platform by ID or handle, including messages, model config, and version history. Use format: 'json' for the full raw API payload, or 'digest' (default) for a formatted summary.",
|
|
977
998
|
{
|
|
978
|
-
idOrHandle:
|
|
979
|
-
version:
|
|
980
|
-
tag:
|
|
999
|
+
idOrHandle: z3.string().describe("Prompt ID or handle"),
|
|
1000
|
+
version: z3.number().optional().describe("Specific version number (default: latest)"),
|
|
1001
|
+
tag: z3.string().optional().describe(
|
|
981
1002
|
'Fetch the version pointed to by this tag (e.g., "production", "staging"). Alternatively, use shorthand in idOrHandle: "pizza-prompt:production"'
|
|
982
1003
|
),
|
|
983
|
-
format:
|
|
1004
|
+
format: z3.enum(["digest", "json"]).optional().describe("Output format: 'digest' (default, AI-readable) or 'json' (full raw data)")
|
|
984
1005
|
},
|
|
985
1006
|
withToolLogging("platform_get_prompt", async (params) => {
|
|
986
1007
|
if (params.version != null && params.tag) {
|
|
@@ -990,7 +1011,7 @@ NOTE: Prompts can be managed two ways. Determine which approach the user needs:
|
|
|
990
1011
|
};
|
|
991
1012
|
}
|
|
992
1013
|
requireApiKey();
|
|
993
|
-
const { handleGetPrompt } = await import("./get-prompt-
|
|
1014
|
+
const { handleGetPrompt } = await import("./get-prompt-TLG2T2DS.js");
|
|
994
1015
|
return {
|
|
995
1016
|
content: [{ type: "text", text: await handleGetPrompt(params) }]
|
|
996
1017
|
};
|
|
@@ -1000,20 +1021,20 @@ NOTE: Prompts can be managed two ways. Determine which approach the user needs:
|
|
|
1000
1021
|
"platform_update_prompt",
|
|
1001
1022
|
"Update an existing prompt on the LangWatch platform. Every update creates a new version.",
|
|
1002
1023
|
{
|
|
1003
|
-
idOrHandle:
|
|
1004
|
-
messages:
|
|
1005
|
-
|
|
1006
|
-
role:
|
|
1007
|
-
content:
|
|
1024
|
+
idOrHandle: z3.string().describe("Prompt ID or handle to update"),
|
|
1025
|
+
messages: z3.array(
|
|
1026
|
+
z3.object({
|
|
1027
|
+
role: z3.enum(["system", "user", "assistant"]),
|
|
1028
|
+
content: z3.string()
|
|
1008
1029
|
})
|
|
1009
1030
|
).optional().describe("Updated messages"),
|
|
1010
1031
|
model: modelSchema.optional(),
|
|
1011
|
-
commitMessage:
|
|
1012
|
-
tags:
|
|
1032
|
+
commitMessage: z3.string().describe("Commit message describing the change"),
|
|
1033
|
+
tags: z3.array(z3.string()).optional().describe("Tags to assign to the new version created by this update.")
|
|
1013
1034
|
},
|
|
1014
1035
|
withToolLogging("platform_update_prompt", async (params) => {
|
|
1015
1036
|
requireApiKey();
|
|
1016
|
-
const { handleUpdatePrompt } = await import("./update-prompt-
|
|
1037
|
+
const { handleUpdatePrompt } = await import("./update-prompt-NPRXYSWA.js");
|
|
1017
1038
|
return {
|
|
1018
1039
|
content: [{ type: "text", text: await handleUpdatePrompt(params) }]
|
|
1019
1040
|
};
|
|
@@ -1023,13 +1044,13 @@ NOTE: Prompts can be managed two ways. Determine which approach the user needs:
|
|
|
1023
1044
|
"platform_assign_prompt_tag",
|
|
1024
1045
|
'Assign a tag (e.g. "production") to a specific version of a prompt. Use this to "deploy" a version by promoting it to the production tag.',
|
|
1025
1046
|
{
|
|
1026
|
-
idOrHandle:
|
|
1027
|
-
tag:
|
|
1028
|
-
versionId:
|
|
1047
|
+
idOrHandle: z3.string().describe("Prompt ID or handle"),
|
|
1048
|
+
tag: z3.string().describe('Tag name (e.g., "production", "staging")'),
|
|
1049
|
+
versionId: z3.string().describe("The version ID to assign the tag to")
|
|
1029
1050
|
},
|
|
1030
1051
|
withToolLogging("platform_assign_prompt_tag", async (params) => {
|
|
1031
1052
|
requireApiKey();
|
|
1032
|
-
const { handleAssignPromptTag } = await import("./assign-prompt-tag-
|
|
1053
|
+
const { handleAssignPromptTag } = await import("./assign-prompt-tag-D7O23MJM.js");
|
|
1033
1054
|
return {
|
|
1034
1055
|
content: [{ type: "text", text: await handleAssignPromptTag(params) }]
|
|
1035
1056
|
};
|
|
@@ -1041,7 +1062,7 @@ NOTE: Prompts can be managed two ways. Determine which approach the user needs:
|
|
|
1041
1062
|
{},
|
|
1042
1063
|
withToolLogging("platform_list_prompt_tags", async () => {
|
|
1043
1064
|
requireApiKey();
|
|
1044
|
-
const { handleListPromptTags } = await import("./list-prompt-tags-
|
|
1065
|
+
const { handleListPromptTags } = await import("./list-prompt-tags-3I3LWFIR.js");
|
|
1045
1066
|
return {
|
|
1046
1067
|
content: [{ type: "text", text: await handleListPromptTags() }]
|
|
1047
1068
|
};
|
|
@@ -1051,11 +1072,11 @@ NOTE: Prompts can be managed two ways. Determine which approach the user needs:
|
|
|
1051
1072
|
"platform_create_prompt_tag",
|
|
1052
1073
|
'Create a custom prompt tag definition for the organization. Tag names must be non-numeric and not "latest".',
|
|
1053
1074
|
{
|
|
1054
|
-
name:
|
|
1075
|
+
name: z3.string().describe("Tag name to create")
|
|
1055
1076
|
},
|
|
1056
1077
|
withToolLogging("platform_create_prompt_tag", async (params) => {
|
|
1057
1078
|
requireApiKey();
|
|
1058
|
-
const { handleCreatePromptTag } = await import("./create-prompt-tag-
|
|
1079
|
+
const { handleCreatePromptTag } = await import("./create-prompt-tag-JFP2Q3PO.js");
|
|
1059
1080
|
return {
|
|
1060
1081
|
content: [{ type: "text", text: await handleCreatePromptTag(params) }]
|
|
1061
1082
|
};
|
|
@@ -1065,12 +1086,12 @@ NOTE: Prompts can be managed two ways. Determine which approach the user needs:
|
|
|
1065
1086
|
"platform_rename_prompt_tag",
|
|
1066
1087
|
'Rename an existing prompt tag. The "latest" tag cannot be renamed.',
|
|
1067
1088
|
{
|
|
1068
|
-
tag:
|
|
1069
|
-
name:
|
|
1089
|
+
tag: z3.string().describe("Current tag name to rename"),
|
|
1090
|
+
name: z3.string().describe("New tag name")
|
|
1070
1091
|
},
|
|
1071
1092
|
withToolLogging("platform_rename_prompt_tag", async (params) => {
|
|
1072
1093
|
requireApiKey();
|
|
1073
|
-
const { handleRenamePromptTag } = await import("./rename-prompt-tag-
|
|
1094
|
+
const { handleRenamePromptTag } = await import("./rename-prompt-tag-2I7Z5FCY.js");
|
|
1074
1095
|
return {
|
|
1075
1096
|
content: [{ type: "text", text: await handleRenamePromptTag(params) }]
|
|
1076
1097
|
};
|
|
@@ -1080,11 +1101,11 @@ NOTE: Prompts can be managed two ways. Determine which approach the user needs:
|
|
|
1080
1101
|
"platform_delete_prompt_tag",
|
|
1081
1102
|
'Delete a prompt tag and all its assignments. The "latest" tag cannot be deleted.',
|
|
1082
1103
|
{
|
|
1083
|
-
tag:
|
|
1104
|
+
tag: z3.string().describe("Tag name to delete")
|
|
1084
1105
|
},
|
|
1085
1106
|
withToolLogging("platform_delete_prompt_tag", async (params) => {
|
|
1086
1107
|
requireApiKey();
|
|
1087
|
-
const { handleDeletePromptTag } = await import("./delete-prompt-tag-
|
|
1108
|
+
const { handleDeletePromptTag } = await import("./delete-prompt-tag-S4KBZTNG.js");
|
|
1088
1109
|
return {
|
|
1089
1110
|
content: [{ type: "text", text: await handleDeletePromptTag(params) }]
|
|
1090
1111
|
};
|
|
@@ -1103,18 +1124,18 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
1103
1124
|
2. Platform-based (LangWatch UI): If the user wants to manage scenarios directly on the LangWatch platform, use the \`platform_\` MCP tools (\`platform_create_scenario\`, \`platform_update_scenario\`, etc.).
|
|
1104
1125
|
`,
|
|
1105
1126
|
{
|
|
1106
|
-
name:
|
|
1107
|
-
situation:
|
|
1108
|
-
criteria:
|
|
1109
|
-
labels:
|
|
1110
|
-
testSuiteId:
|
|
1127
|
+
name: z3.string().describe("Scenario name"),
|
|
1128
|
+
situation: z3.string().describe("The context or setup describing what the user/agent is doing"),
|
|
1129
|
+
criteria: z3.array(z3.string()).optional().describe("Pass/fail conditions the agent's response must satisfy"),
|
|
1130
|
+
labels: z3.array(z3.string()).optional().describe("Tags for organizing and filtering scenarios"),
|
|
1131
|
+
testSuiteId: z3.string().nullish().describe(
|
|
1111
1132
|
"The test suite to file this scenario in. Pass a test suite ID, or null to unfile it."
|
|
1112
1133
|
),
|
|
1113
1134
|
fields: scenarioFieldValuesSchema.optional()
|
|
1114
1135
|
},
|
|
1115
1136
|
withToolLogging("platform_create_scenario", async (params) => {
|
|
1116
1137
|
requireApiKey();
|
|
1117
|
-
const { handleCreateScenario } = await import("./create-scenario-
|
|
1138
|
+
const { handleCreateScenario } = await import("./create-scenario-S6OWWKJO.js");
|
|
1118
1139
|
return {
|
|
1119
1140
|
content: [{ type: "text", text: await handleCreateScenario(params) }]
|
|
1120
1141
|
};
|
|
@@ -1124,12 +1145,12 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
1124
1145
|
"platform_list_scenarios",
|
|
1125
1146
|
"List all scenarios on the LangWatch platform. Returns AI-readable digest by default.",
|
|
1126
1147
|
{
|
|
1127
|
-
testSuiteId:
|
|
1128
|
-
format:
|
|
1148
|
+
testSuiteId: z3.string().optional().describe("Only the scenarios filed in this test suite"),
|
|
1149
|
+
format: z3.enum(["digest", "json"]).optional().describe("Output format: 'digest' (default, AI-readable) or 'json' (full raw data)")
|
|
1129
1150
|
},
|
|
1130
1151
|
withToolLogging("platform_list_scenarios", async (params) => {
|
|
1131
1152
|
requireApiKey();
|
|
1132
|
-
const { handleListScenarios } = await import("./list-scenarios-
|
|
1153
|
+
const { handleListScenarios } = await import("./list-scenarios-GKNH3YND.js");
|
|
1133
1154
|
return {
|
|
1134
1155
|
content: [{ type: "text", text: await handleListScenarios(params) }]
|
|
1135
1156
|
};
|
|
@@ -1139,12 +1160,12 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
1139
1160
|
"platform_get_scenario",
|
|
1140
1161
|
"Get full details of a scenario on the LangWatch platform by ID, including situation, criteria, and labels.",
|
|
1141
1162
|
{
|
|
1142
|
-
scenarioId:
|
|
1143
|
-
format:
|
|
1163
|
+
scenarioId: z3.string().describe("The scenario ID to retrieve"),
|
|
1164
|
+
format: z3.enum(["digest", "json"]).optional().describe("Output format: 'digest' (default, AI-readable) or 'json' (full raw data)")
|
|
1144
1165
|
},
|
|
1145
1166
|
withToolLogging("platform_get_scenario", async (params) => {
|
|
1146
1167
|
requireApiKey();
|
|
1147
|
-
const { handleGetScenario } = await import("./get-scenario-
|
|
1168
|
+
const { handleGetScenario } = await import("./get-scenario-375W5D6I.js");
|
|
1148
1169
|
return {
|
|
1149
1170
|
content: [{ type: "text", text: await handleGetScenario(params) }]
|
|
1150
1171
|
};
|
|
@@ -1154,19 +1175,19 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
1154
1175
|
"platform_update_scenario",
|
|
1155
1176
|
"Update an existing scenario on the LangWatch platform.",
|
|
1156
1177
|
{
|
|
1157
|
-
scenarioId:
|
|
1158
|
-
name:
|
|
1159
|
-
situation:
|
|
1160
|
-
criteria:
|
|
1161
|
-
labels:
|
|
1162
|
-
testSuiteId:
|
|
1178
|
+
scenarioId: z3.string().describe("The scenario ID to update"),
|
|
1179
|
+
name: z3.string().optional().describe("Updated scenario name"),
|
|
1180
|
+
situation: z3.string().optional().describe("Updated situation"),
|
|
1181
|
+
criteria: z3.array(z3.string()).optional().describe("Updated criteria"),
|
|
1182
|
+
labels: z3.array(z3.string()).optional().describe("Updated labels"),
|
|
1183
|
+
testSuiteId: z3.string().nullish().describe(
|
|
1163
1184
|
"The test suite to file this scenario in. Pass a test suite ID, or null to unfile it."
|
|
1164
1185
|
),
|
|
1165
1186
|
fields: scenarioFieldValuesSchema.optional()
|
|
1166
1187
|
},
|
|
1167
1188
|
withToolLogging("platform_update_scenario", async (params) => {
|
|
1168
1189
|
requireApiKey();
|
|
1169
|
-
const { handleUpdateScenario } = await import("./update-scenario-
|
|
1190
|
+
const { handleUpdateScenario } = await import("./update-scenario-EM5XGMB7.js");
|
|
1170
1191
|
return {
|
|
1171
1192
|
content: [{ type: "text", text: await handleUpdateScenario(params) }]
|
|
1172
1193
|
};
|
|
@@ -1176,11 +1197,11 @@ NOTE: Scenarios can be created two ways. Determine which approach the user needs
|
|
|
1176
1197
|
"platform_archive_scenario",
|
|
1177
1198
|
"Archive (soft-delete) a scenario on the LangWatch platform.",
|
|
1178
1199
|
{
|
|
1179
|
-
scenarioId:
|
|
1200
|
+
scenarioId: z3.string().describe("The scenario ID to archive")
|
|
1180
1201
|
},
|
|
1181
1202
|
withToolLogging("platform_archive_scenario", async (params) => {
|
|
1182
1203
|
requireApiKey();
|
|
1183
|
-
const { handleArchiveScenario } = await import("./archive-scenario-
|
|
1204
|
+
const { handleArchiveScenario } = await import("./archive-scenario-5IJQESHH.js");
|
|
1184
1205
|
return {
|
|
1185
1206
|
content: [{ type: "text", text: await handleArchiveScenario(params) }]
|
|
1186
1207
|
};
|
|
@@ -1192,33 +1213,33 @@ function registerRunPlanTools(server) {
|
|
|
1192
1213
|
"platform_run_plan",
|
|
1193
1214
|
"Run scenarios against targets. The plan name identifies the run plan: an existing name is re-run with the configuration you send here, a new name creates the plan. Configuration is the scope, the targets, the repeat count and the models; parameters, the note and the idempotency key belong to this run alone. Send more than one target to compare them in the same run, and give a target its own parameters to compare one agent on two models.",
|
|
1194
1215
|
{
|
|
1195
|
-
name:
|
|
1216
|
+
name: z3.string().optional().describe(
|
|
1196
1217
|
"The run plan to run. An existing name is replaced with this configuration, a new name creates the plan. Omit to let the server name it after the suite and the target."
|
|
1197
1218
|
),
|
|
1198
1219
|
scope: runPlanScopeSchema.describe(
|
|
1199
1220
|
"What the plan covers: every scenario in the project, the scenarios filed in given test suites, the scenarios carrying given labels, or the hand-picked list in scenarioIds."
|
|
1200
1221
|
),
|
|
1201
|
-
scenarioIds:
|
|
1202
|
-
targets:
|
|
1222
|
+
scenarioIds: z3.array(z3.string()).optional().describe("The scenarios to run. Read only when scope.mode is 'scenarios'."),
|
|
1223
|
+
targets: z3.array(runPlanTargetSchema).describe(
|
|
1203
1224
|
"What to run the scenarios against. Every target runs every scenario, and the results show one column for each, so this is how one run compares two agents or one agent on two models."
|
|
1204
1225
|
),
|
|
1205
|
-
repeatCount:
|
|
1206
|
-
simulatorModel:
|
|
1207
|
-
judgeModel:
|
|
1226
|
+
repeatCount: z3.number().int().min(1).max(5).optional().describe("How many times to run each scenario against each target (1 to 5, default 1)"),
|
|
1227
|
+
simulatorModel: z3.string().optional().describe("Model that plays the user. Omit for the project default."),
|
|
1228
|
+
judgeModel: z3.string().optional().describe("Model that judges the criteria. Omit for the project default."),
|
|
1208
1229
|
evaluators: evaluatorAttachmentsSchema.optional().describe(
|
|
1209
1230
|
"The plan's own evaluators, run beside the ones attached to the test suites its scenarios belong to. A plan evaluator reads the conversation and the trace, never a scenario field. Omit to keep what the plan already holds. See discover_schema({ category: 'scenarios' }) for the mapping paths."
|
|
1210
1231
|
),
|
|
1211
1232
|
parameters: runParametersSchema.optional().describe(
|
|
1212
1233
|
"Values for the parameters the scenarios declare, by name. They apply to every target; a target that names the same parameter overrides them for itself."
|
|
1213
1234
|
),
|
|
1214
|
-
note:
|
|
1215
|
-
idempotencyKey:
|
|
1235
|
+
note: z3.string().max(200).optional().describe("One short line saying why this run was started (max 200 characters)"),
|
|
1236
|
+
idempotencyKey: z3.string().optional().describe(
|
|
1216
1237
|
"Send the same key to make a retry join the run it already started instead of starting a second one."
|
|
1217
1238
|
)
|
|
1218
1239
|
},
|
|
1219
1240
|
withToolLogging("platform_run_plan", async (params) => {
|
|
1220
1241
|
requireApiKey();
|
|
1221
|
-
const { handleRunPlan } = await import("./run-plan-
|
|
1242
|
+
const { handleRunPlan } = await import("./run-plan-KSXUYQT3.js");
|
|
1222
1243
|
return {
|
|
1223
1244
|
content: [{ type: "text", text: await handleRunPlan(params) }]
|
|
1224
1245
|
};
|
|
@@ -1228,12 +1249,12 @@ function registerRunPlanTools(server) {
|
|
|
1228
1249
|
"platform_list_run_plans",
|
|
1229
1250
|
"List the run plans of the project. A run plan holds the configuration a run used, keyed by its name.",
|
|
1230
1251
|
{
|
|
1231
|
-
includeArchived:
|
|
1232
|
-
format:
|
|
1252
|
+
includeArchived: z3.boolean().optional().describe("Include archived plans (default false)"),
|
|
1253
|
+
format: z3.enum(["digest", "json"]).optional().describe("Output format: 'digest' (default) or 'json' (raw data)")
|
|
1233
1254
|
},
|
|
1234
1255
|
withToolLogging("platform_list_run_plans", async (params) => {
|
|
1235
1256
|
requireApiKey();
|
|
1236
|
-
const { handleListRunPlans } = await import("./list-run-plans-
|
|
1257
|
+
const { handleListRunPlans } = await import("./list-run-plans-6VNHINPY.js");
|
|
1237
1258
|
return {
|
|
1238
1259
|
content: [{ type: "text", text: await handleListRunPlans(params) }]
|
|
1239
1260
|
};
|
|
@@ -1243,12 +1264,12 @@ function registerRunPlanTools(server) {
|
|
|
1243
1264
|
"platform_get_run_plan",
|
|
1244
1265
|
"Get the full configuration of a run plan: what it covers, its targets, its repeat count and its models.",
|
|
1245
1266
|
{
|
|
1246
|
-
id:
|
|
1247
|
-
format:
|
|
1267
|
+
id: z3.string().describe("The run plan ID"),
|
|
1268
|
+
format: z3.enum(["digest", "json"]).optional().describe("Output format: 'digest' (default) or 'json'")
|
|
1248
1269
|
},
|
|
1249
1270
|
withToolLogging("platform_get_run_plan", async (params) => {
|
|
1250
1271
|
requireApiKey();
|
|
1251
|
-
const { handleGetRunPlan } = await import("./get-run-plan-
|
|
1272
|
+
const { handleGetRunPlan } = await import("./get-run-plan-PEHRO5M3.js");
|
|
1252
1273
|
return {
|
|
1253
1274
|
content: [{ type: "text", text: await handleGetRunPlan(params) }]
|
|
1254
1275
|
};
|
|
@@ -1258,13 +1279,13 @@ function registerRunPlanTools(server) {
|
|
|
1258
1279
|
"platform_rerun_run_plan",
|
|
1259
1280
|
"Run a plan again with the configuration it already holds. Only the parameters and the note belong to the new run.",
|
|
1260
1281
|
{
|
|
1261
|
-
id:
|
|
1282
|
+
id: z3.string().describe("The run plan ID to run again"),
|
|
1262
1283
|
parameters: runParametersSchema.optional().describe("Values for the parameters the scenarios declare, by name."),
|
|
1263
|
-
note:
|
|
1284
|
+
note: z3.string().max(200).optional().describe("One short line saying why this run was started (max 200 characters)")
|
|
1264
1285
|
},
|
|
1265
1286
|
withToolLogging("platform_rerun_run_plan", async (params) => {
|
|
1266
1287
|
requireApiKey();
|
|
1267
|
-
const { handleRerunRunPlan } = await import("./rerun-run-plan-
|
|
1288
|
+
const { handleRerunRunPlan } = await import("./rerun-run-plan-O3VUZ6CG.js");
|
|
1268
1289
|
return {
|
|
1269
1290
|
content: [{ type: "text", text: await handleRerunRunPlan(params) }]
|
|
1270
1291
|
};
|
|
@@ -1274,11 +1295,11 @@ function registerRunPlanTools(server) {
|
|
|
1274
1295
|
"platform_archive_run_plan",
|
|
1275
1296
|
"Archive a run plan. Its past runs stay readable and the name is free for a new plan.",
|
|
1276
1297
|
{
|
|
1277
|
-
id:
|
|
1298
|
+
id: z3.string().describe("The run plan ID to archive")
|
|
1278
1299
|
},
|
|
1279
1300
|
withToolLogging("platform_archive_run_plan", async (params) => {
|
|
1280
1301
|
requireApiKey();
|
|
1281
|
-
const { handleArchiveRunPlan } = await import("./archive-run-plan-
|
|
1302
|
+
const { handleArchiveRunPlan } = await import("./archive-run-plan-5HSQG2HX.js");
|
|
1282
1303
|
return {
|
|
1283
1304
|
content: [{ type: "text", text: await handleArchiveRunPlan(params) }]
|
|
1284
1305
|
};
|
|
@@ -1290,11 +1311,11 @@ function registerTestSuiteTools(server) {
|
|
|
1290
1311
|
"platform_list_test_suites",
|
|
1291
1312
|
"List the test suites of the project. A test suite groups scenarios.",
|
|
1292
1313
|
{
|
|
1293
|
-
format:
|
|
1314
|
+
format: z3.enum(["digest", "json"]).optional().describe("Output format: 'digest' (default) or 'json' (raw data)")
|
|
1294
1315
|
},
|
|
1295
1316
|
withToolLogging("platform_list_test_suites", async (params) => {
|
|
1296
1317
|
requireApiKey();
|
|
1297
|
-
const { handleListTestSuites } = await import("./list-test-suites-
|
|
1318
|
+
const { handleListTestSuites } = await import("./list-test-suites-GY56LGLY.js");
|
|
1298
1319
|
return {
|
|
1299
1320
|
content: [{ type: "text", text: await handleListTestSuites(params) }]
|
|
1300
1321
|
};
|
|
@@ -1304,13 +1325,13 @@ function registerTestSuiteTools(server) {
|
|
|
1304
1325
|
"platform_create_test_suite",
|
|
1305
1326
|
"Create a test suite. A test suite groups scenarios: file a scenario in it by passing the suite ID as testSuiteId on platform_create_scenario or platform_update_scenario. A suite can declare typed fields every scenario carries a value for, and attach saved evaluators that run after every scenario run with mappings from their inputs to the conversation, the scenario's fields or the trace. Call discover_schema({ category: 'scenarios' }) first for the field rules and the mapping paths.",
|
|
1306
1327
|
{
|
|
1307
|
-
name:
|
|
1328
|
+
name: z3.string().describe("Test suite name"),
|
|
1308
1329
|
fields: suiteFieldsSchema.optional(),
|
|
1309
1330
|
evaluators: evaluatorAttachmentsSchema.optional()
|
|
1310
1331
|
},
|
|
1311
1332
|
withToolLogging("platform_create_test_suite", async (params) => {
|
|
1312
1333
|
requireApiKey();
|
|
1313
|
-
const { handleCreateTestSuite } = await import("./create-test-suite-
|
|
1334
|
+
const { handleCreateTestSuite } = await import("./create-test-suite-Y7P2RI4L.js");
|
|
1314
1335
|
return {
|
|
1315
1336
|
content: [{ type: "text", text: await handleCreateTestSuite(params) }]
|
|
1316
1337
|
};
|
|
@@ -1320,12 +1341,12 @@ function registerTestSuiteTools(server) {
|
|
|
1320
1341
|
"platform_get_test_suite",
|
|
1321
1342
|
"Get a test suite and the scenarios filed in it.",
|
|
1322
1343
|
{
|
|
1323
|
-
id:
|
|
1324
|
-
format:
|
|
1344
|
+
id: z3.string().describe("The test suite ID"),
|
|
1345
|
+
format: z3.enum(["digest", "json"]).optional().describe("Output format: 'digest' (default) or 'json'")
|
|
1325
1346
|
},
|
|
1326
1347
|
withToolLogging("platform_get_test_suite", async (params) => {
|
|
1327
1348
|
requireApiKey();
|
|
1328
|
-
const { handleGetTestSuite } = await import("./get-test-suite-
|
|
1349
|
+
const { handleGetTestSuite } = await import("./get-test-suite-GVIBDG7K.js");
|
|
1329
1350
|
return {
|
|
1330
1351
|
content: [{ type: "text", text: await handleGetTestSuite(params) }]
|
|
1331
1352
|
};
|
|
@@ -1335,8 +1356,8 @@ function registerTestSuiteTools(server) {
|
|
|
1335
1356
|
"platform_update_test_suite",
|
|
1336
1357
|
"Edit a test suite: any of its name, its fields and its evaluators. A field list or an evaluator list replaces the one the suite holds; a key left out keeps what the suite has. A field an attached evaluator still reads cannot be removed. Call discover_schema({ category: 'scenarios' }) first for the field rules and the mapping paths.",
|
|
1337
1358
|
{
|
|
1338
|
-
id:
|
|
1339
|
-
name:
|
|
1359
|
+
id: z3.string().describe("The test suite ID"),
|
|
1360
|
+
name: z3.string().optional().describe("The new name. The slug is kept."),
|
|
1340
1361
|
fields: suiteFieldsSchema.optional().describe(
|
|
1341
1362
|
"The full list of fields the suite declares. It replaces the list the suite holds."
|
|
1342
1363
|
),
|
|
@@ -1355,12 +1376,12 @@ function registerTestSuiteTools(server) {
|
|
|
1355
1376
|
"platform_rename_test_suite",
|
|
1356
1377
|
"Rename a test suite.",
|
|
1357
1378
|
{
|
|
1358
|
-
id:
|
|
1359
|
-
name:
|
|
1379
|
+
id: z3.string().describe("The test suite ID"),
|
|
1380
|
+
name: z3.string().describe("The new name")
|
|
1360
1381
|
},
|
|
1361
1382
|
withToolLogging("platform_rename_test_suite", async (params) => {
|
|
1362
1383
|
requireApiKey();
|
|
1363
|
-
const { handleRenameTestSuite } = await import("./rename-test-suite-
|
|
1384
|
+
const { handleRenameTestSuite } = await import("./rename-test-suite-27AYY33K.js");
|
|
1364
1385
|
return {
|
|
1365
1386
|
content: [{ type: "text", text: await handleRenameTestSuite(params) }]
|
|
1366
1387
|
};
|
|
@@ -1370,11 +1391,11 @@ function registerTestSuiteTools(server) {
|
|
|
1370
1391
|
"platform_archive_test_suite",
|
|
1371
1392
|
"Archive a test suite. The scenarios filed in it are archived with it.",
|
|
1372
1393
|
{
|
|
1373
|
-
id:
|
|
1394
|
+
id: z3.string().describe("The test suite ID to archive")
|
|
1374
1395
|
},
|
|
1375
1396
|
withToolLogging("platform_archive_test_suite", async (params) => {
|
|
1376
1397
|
requireApiKey();
|
|
1377
|
-
const { handleArchiveTestSuite } = await import("./archive-test-suite-
|
|
1398
|
+
const { handleArchiveTestSuite } = await import("./archive-test-suite-OPB7NFI7.js");
|
|
1378
1399
|
return {
|
|
1379
1400
|
content: [{ type: "text", text: await handleArchiveTestSuite(params) }]
|
|
1380
1401
|
};
|
|
@@ -1384,24 +1405,24 @@ function registerTestSuiteTools(server) {
|
|
|
1384
1405
|
"platform_run_test_suite",
|
|
1385
1406
|
"Run every scenario of a test suite against targets. This creates or joins the run plan named '<suite name> <target name>' unless you send a name of your own. Send more than one target to compare them in the same run, and give a target its own parameters to compare one agent on two models.",
|
|
1386
1407
|
{
|
|
1387
|
-
id:
|
|
1388
|
-
targets:
|
|
1408
|
+
id: z3.string().describe("The test suite ID to run"),
|
|
1409
|
+
targets: z3.array(runPlanTargetSchema).describe(
|
|
1389
1410
|
"What to run the scenarios against. Every target runs every scenario, and the results show one column for each."
|
|
1390
1411
|
),
|
|
1391
|
-
name:
|
|
1412
|
+
name: z3.string().optional().describe(
|
|
1392
1413
|
"The run plan to run. Omit to let the server name it after the suite and the target."
|
|
1393
1414
|
),
|
|
1394
|
-
repeatCount:
|
|
1395
|
-
simulatorModel:
|
|
1396
|
-
judgeModel:
|
|
1415
|
+
repeatCount: z3.number().int().min(1).max(5).optional().describe("How many times to run each scenario against each target (1 to 5, default 1)"),
|
|
1416
|
+
simulatorModel: z3.string().optional().describe("Model that plays the user. Omit for the project default."),
|
|
1417
|
+
judgeModel: z3.string().optional().describe("Model that judges the criteria. Omit for the project default."),
|
|
1397
1418
|
parameters: runParametersSchema.optional().describe(
|
|
1398
1419
|
"Values for the parameters the scenarios declare, by name. They apply to every target; a target that names the same parameter overrides them for itself."
|
|
1399
1420
|
),
|
|
1400
|
-
note:
|
|
1421
|
+
note: z3.string().max(200).optional().describe("One short line saying why this run was started (max 200 characters)")
|
|
1401
1422
|
},
|
|
1402
1423
|
withToolLogging("platform_run_test_suite", async (params) => {
|
|
1403
1424
|
requireApiKey();
|
|
1404
|
-
const { handleRunTestSuite } = await import("./run-test-suite-
|
|
1425
|
+
const { handleRunTestSuite } = await import("./run-test-suite-P3WLVPXC.js");
|
|
1405
1426
|
return {
|
|
1406
1427
|
content: [{ type: "text", text: await handleRunTestSuite(params) }]
|
|
1407
1428
|
};
|
|
@@ -1413,14 +1434,14 @@ function registerSimulationRunTools(server) {
|
|
|
1413
1434
|
"platform_list_simulation_runs",
|
|
1414
1435
|
"List simulation run results. Filter by scenario set or batch run ID to see specific results.",
|
|
1415
1436
|
{
|
|
1416
|
-
scenarioSetId:
|
|
1417
|
-
batchRunId:
|
|
1418
|
-
limit:
|
|
1419
|
-
format:
|
|
1437
|
+
scenarioSetId: z3.string().optional().describe("Filter by scenario set ID"),
|
|
1438
|
+
batchRunId: z3.string().optional().describe("Filter by batch run ID"),
|
|
1439
|
+
limit: z3.number().optional().describe("Max results to return (default: 20)"),
|
|
1440
|
+
format: z3.enum(["digest", "json"]).optional().describe("Output format")
|
|
1420
1441
|
},
|
|
1421
1442
|
withToolLogging("platform_list_simulation_runs", async (params) => {
|
|
1422
1443
|
requireApiKey();
|
|
1423
|
-
const { handleListSimulationRuns } = await import("./list-simulation-runs-
|
|
1444
|
+
const { handleListSimulationRuns } = await import("./list-simulation-runs-KHY7KALI.js");
|
|
1424
1445
|
return {
|
|
1425
1446
|
content: [{ type: "text", text: await handleListSimulationRuns(params) }]
|
|
1426
1447
|
};
|
|
@@ -1430,12 +1451,12 @@ function registerSimulationRunTools(server) {
|
|
|
1430
1451
|
"platform_get_simulation_run",
|
|
1431
1452
|
"Get full details of a simulation run including conversation messages, results, costs, the verdict and the result of every evaluator attached to its test suite or run plan.",
|
|
1432
1453
|
{
|
|
1433
|
-
scenarioRunId:
|
|
1434
|
-
format:
|
|
1454
|
+
scenarioRunId: z3.string().describe("The simulation run ID"),
|
|
1455
|
+
format: z3.enum(["digest", "json"]).optional().describe("Output format")
|
|
1435
1456
|
},
|
|
1436
1457
|
withToolLogging("platform_get_simulation_run", async (params) => {
|
|
1437
1458
|
requireApiKey();
|
|
1438
|
-
const { handleGetSimulationRun } = await import("./get-simulation-run-
|
|
1459
|
+
const { handleGetSimulationRun } = await import("./get-simulation-run-2NBXJADG.js");
|
|
1439
1460
|
return {
|
|
1440
1461
|
content: [{ type: "text", text: await handleGetSimulationRun(params) }]
|
|
1441
1462
|
};
|
|
@@ -1447,14 +1468,14 @@ function registerEvaluatorTools(server) {
|
|
|
1447
1468
|
"platform_create_evaluator",
|
|
1448
1469
|
`Create an evaluator on the LangWatch platform. Useful for setting up LLM-as-judge and other evaluators to use in evaluation notebooks. Call discover_schema({ category: 'evaluators' }) first to see available evaluator types and their settings.`,
|
|
1449
1470
|
{
|
|
1450
|
-
name:
|
|
1451
|
-
config:
|
|
1471
|
+
name: z3.string().describe("Evaluator name"),
|
|
1472
|
+
config: z3.record(z3.string(), z3.unknown()).describe(
|
|
1452
1473
|
'Evaluator config object. Must include "evaluatorType" (e.g. "langevals/llm_boolean") and optional "settings" overrides.'
|
|
1453
1474
|
)
|
|
1454
1475
|
},
|
|
1455
1476
|
withToolLogging("platform_create_evaluator", async (params) => {
|
|
1456
1477
|
requireApiKey();
|
|
1457
|
-
const { handleCreateEvaluator } = await import("./create-evaluator-
|
|
1478
|
+
const { handleCreateEvaluator } = await import("./create-evaluator-XYNY2YFY.js");
|
|
1458
1479
|
return {
|
|
1459
1480
|
content: [{ type: "text", text: await handleCreateEvaluator(params) }]
|
|
1460
1481
|
};
|
|
@@ -1466,7 +1487,7 @@ function registerEvaluatorTools(server) {
|
|
|
1466
1487
|
{},
|
|
1467
1488
|
withToolLogging("platform_list_evaluators", async () => {
|
|
1468
1489
|
requireApiKey();
|
|
1469
|
-
const { handleListEvaluators } = await import("./list-evaluators-
|
|
1490
|
+
const { handleListEvaluators } = await import("./list-evaluators-7RRESBOU.js");
|
|
1470
1491
|
return {
|
|
1471
1492
|
content: [{ type: "text", text: await handleListEvaluators() }]
|
|
1472
1493
|
};
|
|
@@ -1476,11 +1497,11 @@ function registerEvaluatorTools(server) {
|
|
|
1476
1497
|
"platform_get_evaluator",
|
|
1477
1498
|
"Get full details of an evaluator on the LangWatch platform by ID or slug, including config, input fields, and output fields.",
|
|
1478
1499
|
{
|
|
1479
|
-
idOrSlug:
|
|
1500
|
+
idOrSlug: z3.string().describe("The evaluator ID or slug to retrieve")
|
|
1480
1501
|
},
|
|
1481
1502
|
withToolLogging("platform_get_evaluator", async (params) => {
|
|
1482
1503
|
requireApiKey();
|
|
1483
|
-
const { handleGetEvaluator } = await import("./get-evaluator-
|
|
1504
|
+
const { handleGetEvaluator } = await import("./get-evaluator-IWNJINRY.js");
|
|
1484
1505
|
return {
|
|
1485
1506
|
content: [{ type: "text", text: await handleGetEvaluator(params) }]
|
|
1486
1507
|
};
|
|
@@ -1490,13 +1511,13 @@ function registerEvaluatorTools(server) {
|
|
|
1490
1511
|
"platform_update_evaluator",
|
|
1491
1512
|
"Update an existing evaluator on the LangWatch platform. The evaluatorType in config cannot be changed after creation.",
|
|
1492
1513
|
{
|
|
1493
|
-
evaluatorId:
|
|
1494
|
-
name:
|
|
1495
|
-
config:
|
|
1514
|
+
evaluatorId: z3.string().describe("The evaluator ID to update"),
|
|
1515
|
+
name: z3.string().optional().describe("Updated evaluator name"),
|
|
1516
|
+
config: z3.record(z3.string(), z3.unknown()).optional().describe("Updated config settings. Note: evaluatorType cannot be changed after creation.")
|
|
1496
1517
|
},
|
|
1497
1518
|
withToolLogging("platform_update_evaluator", async (params) => {
|
|
1498
1519
|
requireApiKey();
|
|
1499
|
-
const { handleUpdateEvaluator } = await import("./update-evaluator-
|
|
1520
|
+
const { handleUpdateEvaluator } = await import("./update-evaluator-FEH7H6NS.js");
|
|
1500
1521
|
return {
|
|
1501
1522
|
content: [{ type: "text", text: await handleUpdateEvaluator(params) }]
|
|
1502
1523
|
};
|
|
@@ -1506,11 +1527,11 @@ function registerEvaluatorTools(server) {
|
|
|
1506
1527
|
"platform_delete_evaluator",
|
|
1507
1528
|
"Archive (soft-delete) an evaluator by ID or slug.",
|
|
1508
1529
|
{
|
|
1509
|
-
idOrSlug:
|
|
1530
|
+
idOrSlug: z3.string().describe("The evaluator ID or slug to archive")
|
|
1510
1531
|
},
|
|
1511
1532
|
withToolLogging("platform_delete_evaluator", async (params) => {
|
|
1512
1533
|
requireApiKey();
|
|
1513
|
-
const { handleDeleteEvaluator } = await import("./delete-evaluator-
|
|
1534
|
+
const { handleDeleteEvaluator } = await import("./delete-evaluator-E3CUNGTQ.js");
|
|
1514
1535
|
return {
|
|
1515
1536
|
content: [{ type: "text", text: await handleDeleteEvaluator(params) }]
|
|
1516
1537
|
};
|
|
@@ -1522,16 +1543,16 @@ function registerModelProviderTools(server) {
|
|
|
1522
1543
|
"platform_set_model_provider",
|
|
1523
1544
|
`Set or update a model provider on the LangWatch platform. Use this to configure API keys (e.g. OPENAI_API_KEY) needed to run evaluators. The API key is stored securely and never returned in responses. Omit customKeys to update other settings without changing existing keys.`,
|
|
1524
1545
|
{
|
|
1525
|
-
provider:
|
|
1526
|
-
enabled:
|
|
1527
|
-
customKeys:
|
|
1546
|
+
provider: z3.string().describe('Provider name, e.g., "openai", "anthropic", "azure", "custom"'),
|
|
1547
|
+
enabled: z3.boolean().describe("Whether the provider is enabled"),
|
|
1548
|
+
customKeys: z3.record(z3.string(), z3.unknown()).optional().describe(
|
|
1528
1549
|
'API key configuration, e.g. { "OPENAI_API_KEY": "sk-..." }. Omit to keep existing keys.'
|
|
1529
1550
|
),
|
|
1530
|
-
defaultModel:
|
|
1551
|
+
defaultModel: z3.string().optional().describe("Set as project default model")
|
|
1531
1552
|
},
|
|
1532
1553
|
withToolLogging("platform_set_model_provider", async (params) => {
|
|
1533
1554
|
requireApiKey();
|
|
1534
|
-
const { handleSetModelProvider } = await import("./set-model-provider-
|
|
1555
|
+
const { handleSetModelProvider } = await import("./set-model-provider-SHEVKWRC.js");
|
|
1535
1556
|
return {
|
|
1536
1557
|
content: [{ type: "text", text: await handleSetModelProvider(params) }]
|
|
1537
1558
|
};
|
|
@@ -1543,7 +1564,7 @@ function registerModelProviderTools(server) {
|
|
|
1543
1564
|
{},
|
|
1544
1565
|
withToolLogging("platform_list_model_providers", async () => {
|
|
1545
1566
|
requireApiKey();
|
|
1546
|
-
const { handleListModelProviders } = await import("./list-model-providers-
|
|
1567
|
+
const { handleListModelProviders } = await import("./list-model-providers-OXDRPUCJ.js");
|
|
1547
1568
|
return {
|
|
1548
1569
|
content: [{ type: "text", text: await handleListModelProviders() }]
|
|
1549
1570
|
};
|
|
@@ -1557,7 +1578,7 @@ function registerAgentTools(server) {
|
|
|
1557
1578
|
{},
|
|
1558
1579
|
withToolLogging("platform_list_agents", async () => {
|
|
1559
1580
|
requireApiKey();
|
|
1560
|
-
const { handleListAgents } = await import("./list-agents-
|
|
1581
|
+
const { handleListAgents } = await import("./list-agents-BYWDNAHT.js");
|
|
1561
1582
|
return {
|
|
1562
1583
|
content: [{ type: "text", text: await handleListAgents() }]
|
|
1563
1584
|
};
|
|
@@ -1567,11 +1588,11 @@ function registerAgentTools(server) {
|
|
|
1567
1588
|
"platform_get_agent",
|
|
1568
1589
|
"Get detailed information about a specific agent by its ID, including its configuration. A connected agent also shows its environment, status, the run parameters it declared (with options and defaults) and the instances connected right now.",
|
|
1569
1590
|
{
|
|
1570
|
-
id:
|
|
1591
|
+
id: z3.string().describe("The agent ID")
|
|
1571
1592
|
},
|
|
1572
1593
|
withToolLogging("platform_get_agent", async (params) => {
|
|
1573
1594
|
requireApiKey();
|
|
1574
|
-
const { handleGetAgent } = await import("./get-agent-
|
|
1595
|
+
const { handleGetAgent } = await import("./get-agent-ZKYQJUQ7.js");
|
|
1575
1596
|
return {
|
|
1576
1597
|
content: [{ type: "text", text: await handleGetAgent(params) }]
|
|
1577
1598
|
};
|
|
@@ -1581,13 +1602,13 @@ function registerAgentTools(server) {
|
|
|
1581
1602
|
"platform_create_agent",
|
|
1582
1603
|
"Create a new agent. Supported types: 'signature' (LLM prompt), 'code' (Python), 'workflow' (sub-workflow), 'http' (external API). A 'connected' agent is not created here: it registers itself from code, with connectAgent from langwatch/agent in TypeScript or langwatch.connect_agent in Python, and appears in the list once that process runs.",
|
|
1583
1604
|
{
|
|
1584
|
-
name:
|
|
1585
|
-
type:
|
|
1586
|
-
config:
|
|
1605
|
+
name: z3.string().describe("Agent name"),
|
|
1606
|
+
type: z3.enum(["signature", "code", "workflow", "http"]).describe("Agent type"),
|
|
1607
|
+
config: z3.string().optional().describe("Agent configuration as JSON string (will be parsed)")
|
|
1587
1608
|
},
|
|
1588
1609
|
withToolLogging("platform_create_agent", async (params) => {
|
|
1589
1610
|
requireApiKey();
|
|
1590
|
-
const { handleCreateAgent } = await import("./create-agent-
|
|
1611
|
+
const { handleCreateAgent } = await import("./create-agent-6JNLMYQD.js");
|
|
1591
1612
|
const parsedConfig = params.config ? JSON.parse(params.config) : void 0;
|
|
1592
1613
|
return {
|
|
1593
1614
|
content: [
|
|
@@ -1600,14 +1621,14 @@ function registerAgentTools(server) {
|
|
|
1600
1621
|
"platform_update_agent",
|
|
1601
1622
|
"Update an existing agent's name, type, or configuration.",
|
|
1602
1623
|
{
|
|
1603
|
-
id:
|
|
1604
|
-
name:
|
|
1605
|
-
type:
|
|
1606
|
-
config:
|
|
1624
|
+
id: z3.string().describe("The agent ID"),
|
|
1625
|
+
name: z3.string().optional().describe("New agent name"),
|
|
1626
|
+
type: z3.string().optional().describe("New agent type: signature, code, workflow, or http"),
|
|
1627
|
+
config: z3.string().optional().describe("Updated configuration as JSON string (will be parsed)")
|
|
1607
1628
|
},
|
|
1608
1629
|
withToolLogging("platform_update_agent", async (params) => {
|
|
1609
1630
|
requireApiKey();
|
|
1610
|
-
const { handleUpdateAgent } = await import("./update-agent-
|
|
1631
|
+
const { handleUpdateAgent } = await import("./update-agent-PTKTM2B5.js");
|
|
1611
1632
|
const parsedConfig = params.config ? JSON.parse(params.config) : void 0;
|
|
1612
1633
|
return {
|
|
1613
1634
|
content: [
|
|
@@ -1620,11 +1641,11 @@ function registerAgentTools(server) {
|
|
|
1620
1641
|
"platform_delete_agent",
|
|
1621
1642
|
"Archive (soft-delete) an agent by its ID.",
|
|
1622
1643
|
{
|
|
1623
|
-
id:
|
|
1644
|
+
id: z3.string().describe("The agent ID to archive")
|
|
1624
1645
|
},
|
|
1625
1646
|
withToolLogging("platform_delete_agent", async (params) => {
|
|
1626
1647
|
requireApiKey();
|
|
1627
|
-
const { handleDeleteAgent } = await import("./delete-agent-
|
|
1648
|
+
const { handleDeleteAgent } = await import("./delete-agent-J2Q4DRZ2.js");
|
|
1628
1649
|
return {
|
|
1629
1650
|
content: [{ type: "text", text: await handleDeleteAgent(params) }]
|
|
1630
1651
|
};
|
|
@@ -1634,17 +1655,17 @@ function registerAgentTools(server) {
|
|
|
1634
1655
|
"platform_run_agent",
|
|
1635
1656
|
"Run one turn of an agent. A connected agent runs through the platform relay on a live instance: give `message` (one user turn) or `input` with a `messages` list, plus `parameters` and `threadId` to continue a conversation. HTTP agents call their configured URL directly; workflow-linked agents execute via the workflow engine.",
|
|
1636
1657
|
{
|
|
1637
|
-
id:
|
|
1638
|
-
input:
|
|
1658
|
+
id: z3.string().describe("The agent ID to run"),
|
|
1659
|
+
input: z3.string().optional().describe(
|
|
1639
1660
|
"Input data as a JSON object string. For a connected agent it is the relay body: messages (OpenAI style), and optionally threadId, session and params."
|
|
1640
1661
|
),
|
|
1641
|
-
message:
|
|
1642
|
-
parameters:
|
|
1643
|
-
threadId:
|
|
1662
|
+
message: z3.string().optional().describe("One user message to send to a connected agent, instead of input"),
|
|
1663
|
+
parameters: z3.record(z3.string(), z3.union([z3.string(), z3.number(), z3.boolean()])).optional().describe("Run parameter values for a connected agent, by name"),
|
|
1664
|
+
threadId: z3.string().optional().describe("Continue a conversation on a connected agent")
|
|
1644
1665
|
},
|
|
1645
1666
|
withToolLogging("platform_run_agent", async (params) => {
|
|
1646
1667
|
requireApiKey();
|
|
1647
|
-
const { handleRunAgent } = await import("./run-agent-
|
|
1668
|
+
const { handleRunAgent } = await import("./run-agent-244O4Y5M.js");
|
|
1648
1669
|
return {
|
|
1649
1670
|
content: [{ type: "text", text: await handleRunAgent(params) }]
|
|
1650
1671
|
};
|
|
@@ -1654,7 +1675,7 @@ function registerAgentTools(server) {
|
|
|
1654
1675
|
"platform_test_agent",
|
|
1655
1676
|
'Test an agent with one scripted scenario run: the user sends "ping", the agent answers, and the run succeeds when the answer arrives. No model is used, and no scenario, run plan or test suite is added to the project. Answers at once with the scenario run id to follow with platform_get_simulation_run; the run itself is asynchronous.',
|
|
1656
1677
|
{
|
|
1657
|
-
id:
|
|
1678
|
+
id: z3.string().describe("The agent ID to test")
|
|
1658
1679
|
},
|
|
1659
1680
|
withToolLogging("platform_test_agent", async (params) => {
|
|
1660
1681
|
requireApiKey();
|
|
@@ -1664,91 +1685,103 @@ function registerAgentTools(server) {
|
|
|
1664
1685
|
})
|
|
1665
1686
|
);
|
|
1666
1687
|
}
|
|
1667
|
-
function
|
|
1688
|
+
function registerAnalyticsReportTools(server) {
|
|
1668
1689
|
server.tool(
|
|
1669
|
-
"
|
|
1670
|
-
"List
|
|
1690
|
+
"platform_list_analytics_reports",
|
|
1691
|
+
"List the Analytics Reports in the LangWatch project (/api/v1/analytics/reports). Dashboards, which hold widgets, are listed by list_dashboards.",
|
|
1671
1692
|
{},
|
|
1672
|
-
withToolLogging("
|
|
1693
|
+
withToolLogging("platform_list_analytics_reports", async () => {
|
|
1673
1694
|
requireApiKey();
|
|
1674
|
-
const {
|
|
1695
|
+
const { handleListAnalyticsReports } = await import("./list-analytics-reports-PPWIFRES.js");
|
|
1675
1696
|
return {
|
|
1676
|
-
content: [{ type: "text", text: await
|
|
1697
|
+
content: [{ type: "text", text: await handleListAnalyticsReports() }]
|
|
1677
1698
|
};
|
|
1678
1699
|
})
|
|
1679
1700
|
);
|
|
1680
1701
|
server.tool(
|
|
1681
|
-
"
|
|
1682
|
-
"Get
|
|
1702
|
+
"platform_get_analytics_report",
|
|
1703
|
+
"Get an Analytics Report by its ID, including its graphs. A Dashboards dashboard's ID is not found here; read it with get_dashboard.",
|
|
1683
1704
|
{
|
|
1684
|
-
|
|
1705
|
+
reportId: z3.string().describe("The Analytics Report ID")
|
|
1685
1706
|
},
|
|
1686
|
-
withToolLogging("
|
|
1707
|
+
withToolLogging("platform_get_analytics_report", async (params) => {
|
|
1687
1708
|
requireApiKey();
|
|
1688
|
-
const {
|
|
1709
|
+
const { handleGetAnalyticsReport } = await import("./get-analytics-report-SKIP2JWH.js");
|
|
1689
1710
|
return {
|
|
1690
|
-
content: [{ type: "text", text: await
|
|
1711
|
+
content: [{ type: "text", text: await handleGetAnalyticsReport(params) }]
|
|
1691
1712
|
};
|
|
1692
1713
|
})
|
|
1693
1714
|
);
|
|
1694
1715
|
server.tool(
|
|
1695
|
-
"
|
|
1696
|
-
"Create a new
|
|
1716
|
+
"platform_create_analytics_report",
|
|
1717
|
+
"Create a new Analytics Report.",
|
|
1697
1718
|
{
|
|
1698
|
-
name:
|
|
1719
|
+
name: z3.string().describe("Analytics Report name")
|
|
1699
1720
|
},
|
|
1700
|
-
withToolLogging("
|
|
1721
|
+
withToolLogging("platform_create_analytics_report", async (params) => {
|
|
1701
1722
|
requireApiKey();
|
|
1702
|
-
const {
|
|
1723
|
+
const { handleCreateAnalyticsReport } = await import("./create-analytics-report-N4L4V5QL.js");
|
|
1703
1724
|
return {
|
|
1704
|
-
content: [
|
|
1725
|
+
content: [
|
|
1726
|
+
{
|
|
1727
|
+
type: "text",
|
|
1728
|
+
text: await handleCreateAnalyticsReport(params)
|
|
1729
|
+
}
|
|
1730
|
+
]
|
|
1705
1731
|
};
|
|
1706
1732
|
})
|
|
1707
1733
|
);
|
|
1708
1734
|
server.tool(
|
|
1709
|
-
"
|
|
1710
|
-
"Delete
|
|
1735
|
+
"platform_delete_analytics_report",
|
|
1736
|
+
"Delete an Analytics Report and all its graphs.",
|
|
1711
1737
|
{
|
|
1712
|
-
|
|
1738
|
+
reportId: z3.string().describe("The Analytics Report ID to delete")
|
|
1713
1739
|
},
|
|
1714
|
-
withToolLogging("
|
|
1740
|
+
withToolLogging("platform_delete_analytics_report", async (params) => {
|
|
1715
1741
|
requireApiKey();
|
|
1716
|
-
const {
|
|
1742
|
+
const { handleDeleteAnalyticsReport } = await import("./delete-analytics-report-QK6X7P4S.js");
|
|
1717
1743
|
return {
|
|
1718
|
-
content: [
|
|
1744
|
+
content: [
|
|
1745
|
+
{
|
|
1746
|
+
type: "text",
|
|
1747
|
+
text: await handleDeleteAnalyticsReport(params)
|
|
1748
|
+
}
|
|
1749
|
+
]
|
|
1719
1750
|
};
|
|
1720
1751
|
})
|
|
1721
1752
|
);
|
|
1722
1753
|
server.tool(
|
|
1723
|
-
"
|
|
1724
|
-
"Rename
|
|
1754
|
+
"platform_rename_analytics_report",
|
|
1755
|
+
"Rename an Analytics Report.",
|
|
1725
1756
|
{
|
|
1726
|
-
|
|
1727
|
-
name:
|
|
1757
|
+
reportId: z3.string().describe("The Analytics Report ID to rename"),
|
|
1758
|
+
name: z3.string().describe("The new name for the Analytics Report")
|
|
1728
1759
|
},
|
|
1729
|
-
withToolLogging("
|
|
1760
|
+
withToolLogging("platform_rename_analytics_report", async (params) => {
|
|
1730
1761
|
requireApiKey();
|
|
1731
|
-
const {
|
|
1732
|
-
const result = await
|
|
1762
|
+
const { renameAnalyticsReport } = await import("./langwatch-api-analytics-reports-RPFB5AO5.js");
|
|
1763
|
+
const result = await renameAnalyticsReport({ reportId: params.reportId, name: params.name });
|
|
1733
1764
|
return {
|
|
1734
1765
|
content: [
|
|
1735
1766
|
{
|
|
1736
1767
|
type: "text",
|
|
1737
|
-
text: `
|
|
1768
|
+
text: `Analytics Report "${result.name}" renamed successfully (ID: ${result.id}).`
|
|
1738
1769
|
}
|
|
1739
1770
|
]
|
|
1740
1771
|
};
|
|
1741
1772
|
})
|
|
1742
1773
|
);
|
|
1774
|
+
}
|
|
1775
|
+
function registerDashboardTools(server) {
|
|
1743
1776
|
server.tool(
|
|
1744
|
-
"
|
|
1745
|
-
"Lists the project's
|
|
1777
|
+
"list_dashboards",
|
|
1778
|
+
"Lists the project's dashboards in the Dashboards area, with each one's ID and widget count. Use an ID from here as the dashboardId of add_dashboard_widget and update_dashboard_widget; the Analytics Reports platform_list_analytics_reports lists hold no widgets.",
|
|
1746
1779
|
{},
|
|
1747
|
-
withToolLogging("
|
|
1780
|
+
withToolLogging("list_dashboards", async () => {
|
|
1748
1781
|
requireApiKey();
|
|
1749
|
-
const {
|
|
1782
|
+
const { handleListDashboards } = await import("./list-dashboards-MW5O3MKH.js");
|
|
1750
1783
|
return {
|
|
1751
|
-
content: [{ type: "text", text: await
|
|
1784
|
+
content: [{ type: "text", text: await handleListDashboards() }]
|
|
1752
1785
|
};
|
|
1753
1786
|
})
|
|
1754
1787
|
);
|
|
@@ -1756,26 +1789,27 @@ function registerDashboardTools(server) {
|
|
|
1756
1789
|
"add_dashboard_widget",
|
|
1757
1790
|
"Creates a custom dashboard widget and places it on the given dashboard. A widget's `code` is a TSX file run in a sandbox: it receives a global `LW` with `LW.useChartQuery(name)` (reads one of the widget's own named queries), `LW.navigate` and `LW.theme`. `queries` are named LangWatchQL SQL statements the code can read by name \u2014 validate each statement's SQL first with run_query before calling this tool, since a query only runs inside the sandbox at render time and a mistake surfaces there, not here. Up to 8 queries per widget.",
|
|
1758
1791
|
{
|
|
1759
|
-
dashboardId:
|
|
1760
|
-
name:
|
|
1761
|
-
code:
|
|
1792
|
+
dashboardId: z3.string().describe("The dashboard to add the widget to, as list_dashboards lists it"),
|
|
1793
|
+
name: z3.string().describe("The widget's display name"),
|
|
1794
|
+
code: z3.string().describe(
|
|
1762
1795
|
"The widget's TSX source. Runs sandboxed with a global LW (LW.useChartQuery(name), LW.navigate, LW.theme) in scope."
|
|
1763
1796
|
),
|
|
1764
|
-
queries:
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
name:
|
|
1769
|
-
sql:
|
|
1797
|
+
queries: z3.union([
|
|
1798
|
+
z3.record(z3.string(), z3.string()).describe('{"<name>": "<LWQL SQL>"}'),
|
|
1799
|
+
z3.array(
|
|
1800
|
+
z3.object({
|
|
1801
|
+
name: z3.string().describe('Referenced from code as LW.useChartQuery("name")'),
|
|
1802
|
+
sql: z3.string().describe("The LangWatchQL statement")
|
|
1770
1803
|
})
|
|
1771
1804
|
).describe("Named LWQL queries, array form")
|
|
1772
1805
|
]).describe(
|
|
1773
1806
|
"The widget's named LangWatchQL queries: either {name: sql} or an array of {name, sql}. Max 8. Validate each statement with run_query first."
|
|
1774
|
-
)
|
|
1807
|
+
),
|
|
1808
|
+
sources: widgetSourcesInput
|
|
1775
1809
|
},
|
|
1776
1810
|
withToolLogging("add_dashboard_widget", async (params) => {
|
|
1777
1811
|
requireApiKey();
|
|
1778
|
-
const { handleAddDashboardWidget } = await import("./add-dashboard-widget-
|
|
1812
|
+
const { handleAddDashboardWidget } = await import("./add-dashboard-widget-MJHIC3CC.js");
|
|
1779
1813
|
return {
|
|
1780
1814
|
content: [{ type: "text", text: await handleAddDashboardWidget(params) }]
|
|
1781
1815
|
};
|
|
@@ -1783,35 +1817,108 @@ function registerDashboardTools(server) {
|
|
|
1783
1817
|
);
|
|
1784
1818
|
server.tool(
|
|
1785
1819
|
"update_dashboard_widget",
|
|
1786
|
-
"Changes one custom widget on a dashboard: its name, its TSX `code`, its named LangWatchQL `queries` or
|
|
1820
|
+
"Changes one custom widget on a dashboard: its name, its TSX `code`, its named LangWatchQL `queries`, its `description` or the `sources` its queries count. Pass only the fields to change; every field left out keeps its stored value. Validate any new query's SQL with run_query first. Returns the updated widget.",
|
|
1787
1821
|
{
|
|
1788
|
-
dashboardId:
|
|
1789
|
-
widgetId:
|
|
1790
|
-
name:
|
|
1791
|
-
code:
|
|
1822
|
+
dashboardId: z3.string().describe("The dashboard the widget is on"),
|
|
1823
|
+
widgetId: z3.string().describe("The widget to change, as add_dashboard_widget returned it"),
|
|
1824
|
+
name: z3.string().optional().describe("The widget's new display name"),
|
|
1825
|
+
code: z3.string().optional().describe(
|
|
1792
1826
|
"The widget's new TSX source. Runs sandboxed with a global LW (LW.useChartQuery(name), LW.navigate, LW.theme) in scope."
|
|
1793
1827
|
),
|
|
1794
|
-
queries:
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
name:
|
|
1799
|
-
sql:
|
|
1828
|
+
queries: z3.union([
|
|
1829
|
+
z3.record(z3.string(), z3.string()).describe('{"<name>": "<LWQL SQL>"}'),
|
|
1830
|
+
z3.array(
|
|
1831
|
+
z3.object({
|
|
1832
|
+
name: z3.string().describe('Referenced from code as LW.useChartQuery("name")'),
|
|
1833
|
+
sql: z3.string().describe("The LangWatchQL statement")
|
|
1800
1834
|
})
|
|
1801
1835
|
).describe("Named LWQL queries, array form")
|
|
1802
1836
|
]).optional().describe(
|
|
1803
1837
|
"The widget's new named LangWatchQL queries, replacing the stored set: either {name: sql} or an array of {name, sql}. Max 8."
|
|
1804
1838
|
),
|
|
1805
|
-
description:
|
|
1839
|
+
description: z3.string().optional().describe("What the widget's info tip says: a sentence or two"),
|
|
1840
|
+
sources: widgetSourcesInput
|
|
1806
1841
|
},
|
|
1807
1842
|
withToolLogging("update_dashboard_widget", async (params) => {
|
|
1808
1843
|
requireApiKey();
|
|
1809
|
-
const { handleUpdateDashboardWidget } = await import("./update-dashboard-widget-
|
|
1844
|
+
const { handleUpdateDashboardWidget } = await import("./update-dashboard-widget-IP2TTQ5G.js");
|
|
1810
1845
|
return {
|
|
1811
1846
|
content: [{ type: "text", text: await handleUpdateDashboardWidget(params) }]
|
|
1812
1847
|
};
|
|
1813
1848
|
})
|
|
1814
1849
|
);
|
|
1850
|
+
registerDashboardCrudTools(server);
|
|
1851
|
+
}
|
|
1852
|
+
function registerDashboardCrudTools(server) {
|
|
1853
|
+
const dashboardId = z3.string().describe("The dashboard's ID, as list_dashboards lists it");
|
|
1854
|
+
const text = (value) => ({ content: [{ type: "text", text: value }] });
|
|
1855
|
+
server.tool(
|
|
1856
|
+
"get_dashboard",
|
|
1857
|
+
"Reads one dashboard in the Dashboards area: its name, scope, description and address. An Analytics Report's ID is not found here; read it with platform_get_analytics_report.",
|
|
1858
|
+
{ dashboardId },
|
|
1859
|
+
withToolLogging("get_dashboard", async (params) => {
|
|
1860
|
+
requireApiKey();
|
|
1861
|
+
const { handleGetDashboard } = await import("./dashboards-U663GUIB.js");
|
|
1862
|
+
return text(await handleGetDashboard(params));
|
|
1863
|
+
})
|
|
1864
|
+
);
|
|
1865
|
+
server.tool(
|
|
1866
|
+
"create_dashboard",
|
|
1867
|
+
"Creates an empty dashboard in the Dashboards area. Add widgets to it with add_dashboard_widget.",
|
|
1868
|
+
{ name: z3.string().describe("The dashboard's name") },
|
|
1869
|
+
withToolLogging("create_dashboard", async (params) => {
|
|
1870
|
+
requireApiKey();
|
|
1871
|
+
const { handleCreateDashboard } = await import("./dashboards-U663GUIB.js");
|
|
1872
|
+
return text(await handleCreateDashboard(params));
|
|
1873
|
+
})
|
|
1874
|
+
);
|
|
1875
|
+
server.tool(
|
|
1876
|
+
"rename_dashboard",
|
|
1877
|
+
"Changes a dashboard's name and/or description; a field left out keeps its value.",
|
|
1878
|
+
{
|
|
1879
|
+
dashboardId,
|
|
1880
|
+
name: z3.string().optional().describe("The dashboard's new name"),
|
|
1881
|
+
description: z3.string().optional().describe("The dashboard's new description")
|
|
1882
|
+
},
|
|
1883
|
+
withToolLogging("rename_dashboard", async (params) => {
|
|
1884
|
+
requireApiKey();
|
|
1885
|
+
const { handleRenameDashboard } = await import("./dashboards-U663GUIB.js");
|
|
1886
|
+
return text(await handleRenameDashboard(params));
|
|
1887
|
+
})
|
|
1888
|
+
);
|
|
1889
|
+
server.tool(
|
|
1890
|
+
"delete_dashboard",
|
|
1891
|
+
"Deletes a dashboard together with the widgets on it. This cannot be undone.",
|
|
1892
|
+
{ dashboardId },
|
|
1893
|
+
withToolLogging("delete_dashboard", async (params) => {
|
|
1894
|
+
requireApiKey();
|
|
1895
|
+
const { handleDeleteDashboard } = await import("./dashboards-U663GUIB.js");
|
|
1896
|
+
return text(await handleDeleteDashboard(params));
|
|
1897
|
+
})
|
|
1898
|
+
);
|
|
1899
|
+
server.tool(
|
|
1900
|
+
"list_dashboard_widgets",
|
|
1901
|
+
"Lists the custom widgets on one dashboard, with each widget's ID and query names.",
|
|
1902
|
+
{ dashboardId },
|
|
1903
|
+
withToolLogging("list_dashboard_widgets", async (params) => {
|
|
1904
|
+
requireApiKey();
|
|
1905
|
+
const { handleListDashboardWidgets } = await import("./dashboards-U663GUIB.js");
|
|
1906
|
+
return text(await handleListDashboardWidgets(params));
|
|
1907
|
+
})
|
|
1908
|
+
);
|
|
1909
|
+
server.tool(
|
|
1910
|
+
"delete_dashboard_widget",
|
|
1911
|
+
"Deletes one custom widget from a dashboard. A widget on another dashboard is not found.",
|
|
1912
|
+
{
|
|
1913
|
+
dashboardId,
|
|
1914
|
+
widgetId: z3.string().describe("The widget's ID, as list_dashboard_widgets lists it")
|
|
1915
|
+
},
|
|
1916
|
+
withToolLogging("delete_dashboard_widget", async (params) => {
|
|
1917
|
+
requireApiKey();
|
|
1918
|
+
const { handleDeleteDashboardWidget } = await import("./dashboards-U663GUIB.js");
|
|
1919
|
+
return text(await handleDeleteDashboardWidget(params));
|
|
1920
|
+
})
|
|
1921
|
+
);
|
|
1815
1922
|
}
|
|
1816
1923
|
function registerWorkflowTools(server) {
|
|
1817
1924
|
server.tool(
|
|
@@ -1820,7 +1927,7 @@ function registerWorkflowTools(server) {
|
|
|
1820
1927
|
{},
|
|
1821
1928
|
withToolLogging("platform_list_workflows", async () => {
|
|
1822
1929
|
requireApiKey();
|
|
1823
|
-
const { handleListWorkflows } = await import("./list-workflows-
|
|
1930
|
+
const { handleListWorkflows } = await import("./list-workflows-HV7FUWZA.js");
|
|
1824
1931
|
return {
|
|
1825
1932
|
content: [{ type: "text", text: await handleListWorkflows() }]
|
|
1826
1933
|
};
|
|
@@ -1830,11 +1937,11 @@ function registerWorkflowTools(server) {
|
|
|
1830
1937
|
"platform_get_workflow",
|
|
1831
1938
|
"Get a workflow by its ID.",
|
|
1832
1939
|
{
|
|
1833
|
-
id:
|
|
1940
|
+
id: z3.string().describe("The workflow ID")
|
|
1834
1941
|
},
|
|
1835
1942
|
withToolLogging("platform_get_workflow", async (params) => {
|
|
1836
1943
|
requireApiKey();
|
|
1837
|
-
const { handleGetWorkflow } = await import("./get-workflow-
|
|
1944
|
+
const { handleGetWorkflow } = await import("./get-workflow-7LZSVPP2.js");
|
|
1838
1945
|
return {
|
|
1839
1946
|
content: [{ type: "text", text: await handleGetWorkflow(params) }]
|
|
1840
1947
|
};
|
|
@@ -1844,11 +1951,11 @@ function registerWorkflowTools(server) {
|
|
|
1844
1951
|
"platform_delete_workflow",
|
|
1845
1952
|
"Archive (soft-delete) a workflow by its ID.",
|
|
1846
1953
|
{
|
|
1847
|
-
id:
|
|
1954
|
+
id: z3.string().describe("The workflow ID to archive")
|
|
1848
1955
|
},
|
|
1849
1956
|
withToolLogging("platform_delete_workflow", async (params) => {
|
|
1850
1957
|
requireApiKey();
|
|
1851
|
-
const { handleDeleteWorkflow } = await import("./delete-workflow-
|
|
1958
|
+
const { handleDeleteWorkflow } = await import("./delete-workflow-PWQPDW6H.js");
|
|
1852
1959
|
return {
|
|
1853
1960
|
content: [{ type: "text", text: await handleDeleteWorkflow(params) }]
|
|
1854
1961
|
};
|
|
@@ -1858,12 +1965,12 @@ function registerWorkflowTools(server) {
|
|
|
1858
1965
|
"platform_run_workflow",
|
|
1859
1966
|
"Execute a workflow with JSON input. Returns the workflow output.",
|
|
1860
1967
|
{
|
|
1861
|
-
id:
|
|
1862
|
-
input:
|
|
1968
|
+
id: z3.string().describe("The workflow ID to run"),
|
|
1969
|
+
input: z3.string().optional().describe("Input data as a JSON object string")
|
|
1863
1970
|
},
|
|
1864
1971
|
withToolLogging("platform_run_workflow", async (params) => {
|
|
1865
1972
|
requireApiKey();
|
|
1866
|
-
const { handleRunWorkflow } = await import("./run-workflow-
|
|
1973
|
+
const { handleRunWorkflow } = await import("./run-workflow-I4IHEN54.js");
|
|
1867
1974
|
return {
|
|
1868
1975
|
content: [{ type: "text", text: await handleRunWorkflow(params) }]
|
|
1869
1976
|
};
|
|
@@ -1875,11 +1982,11 @@ function registerAnnotationTools(server) {
|
|
|
1875
1982
|
"platform_list_annotations",
|
|
1876
1983
|
"List all annotations for the project, optionally filtered by trace ID.",
|
|
1877
1984
|
{
|
|
1878
|
-
traceId:
|
|
1985
|
+
traceId: z3.string().optional().describe("Filter annotations by trace ID")
|
|
1879
1986
|
},
|
|
1880
1987
|
withToolLogging("platform_list_annotations", async (params) => {
|
|
1881
1988
|
requireApiKey();
|
|
1882
|
-
const { handleListAnnotations } = await import("./list-annotations-
|
|
1989
|
+
const { handleListAnnotations } = await import("./list-annotations-Y4EUBJHG.js");
|
|
1883
1990
|
return {
|
|
1884
1991
|
content: [{ type: "text", text: await handleListAnnotations(params) }]
|
|
1885
1992
|
};
|
|
@@ -1889,14 +1996,14 @@ function registerAnnotationTools(server) {
|
|
|
1889
1996
|
"platform_create_annotation",
|
|
1890
1997
|
"Create an annotation (thumbs up/down, comment) for a trace.",
|
|
1891
1998
|
{
|
|
1892
|
-
traceId:
|
|
1893
|
-
comment:
|
|
1894
|
-
isThumbsUp:
|
|
1895
|
-
email:
|
|
1999
|
+
traceId: z3.string().describe("The trace ID to annotate"),
|
|
2000
|
+
comment: z3.string().optional().describe("Annotation comment"),
|
|
2001
|
+
isThumbsUp: z3.boolean().optional().describe("True for positive feedback, false for negative"),
|
|
2002
|
+
email: z3.string().optional().describe("Email of the annotator")
|
|
1896
2003
|
},
|
|
1897
2004
|
withToolLogging("platform_create_annotation", async (params) => {
|
|
1898
2005
|
requireApiKey();
|
|
1899
|
-
const { handleCreateAnnotation } = await import("./create-annotation-
|
|
2006
|
+
const { handleCreateAnnotation } = await import("./create-annotation-CCEGIZ67.js");
|
|
1900
2007
|
return {
|
|
1901
2008
|
content: [{ type: "text", text: await handleCreateAnnotation(params) }]
|
|
1902
2009
|
};
|
|
@@ -1906,11 +2013,11 @@ function registerAnnotationTools(server) {
|
|
|
1906
2013
|
"platform_delete_annotation",
|
|
1907
2014
|
"Delete an annotation by its ID.",
|
|
1908
2015
|
{
|
|
1909
|
-
id:
|
|
2016
|
+
id: z3.string().describe("The annotation ID to delete")
|
|
1910
2017
|
},
|
|
1911
2018
|
withToolLogging("platform_delete_annotation", async (params) => {
|
|
1912
2019
|
requireApiKey();
|
|
1913
|
-
const { handleDeleteAnnotation } = await import("./delete-annotation-
|
|
2020
|
+
const { handleDeleteAnnotation } = await import("./delete-annotation-KJOCDLV3.js");
|
|
1914
2021
|
return {
|
|
1915
2022
|
content: [{ type: "text", text: await handleDeleteAnnotation(params) }]
|
|
1916
2023
|
};
|
|
@@ -1920,11 +2027,11 @@ function registerAnnotationTools(server) {
|
|
|
1920
2027
|
"platform_get_annotation",
|
|
1921
2028
|
"Get annotation details by ID.",
|
|
1922
2029
|
{
|
|
1923
|
-
id:
|
|
2030
|
+
id: z3.string().describe("The annotation ID")
|
|
1924
2031
|
},
|
|
1925
2032
|
withToolLogging("platform_get_annotation", async (params) => {
|
|
1926
2033
|
requireApiKey();
|
|
1927
|
-
const { getAnnotation } = await import("./langwatch-api-annotations-
|
|
2034
|
+
const { getAnnotation } = await import("./langwatch-api-annotations-H4AI4TKG.js");
|
|
1928
2035
|
const annotation = await getAnnotation(params.id);
|
|
1929
2036
|
const lines = [
|
|
1930
2037
|
`**ID**: ${annotation.id}`,
|
|
@@ -1944,11 +2051,11 @@ function registerTriggerTools(server) {
|
|
|
1944
2051
|
"platform_list_triggers",
|
|
1945
2052
|
"List all triggers (automations) in the project. Triggers automate actions like sending emails, Slack messages, or adding to datasets when conditions are met.",
|
|
1946
2053
|
{
|
|
1947
|
-
format:
|
|
2054
|
+
format: z3.enum(["digest", "json"]).optional().describe("Output format")
|
|
1948
2055
|
},
|
|
1949
2056
|
withToolLogging("platform_list_triggers", async (params) => {
|
|
1950
2057
|
requireApiKey();
|
|
1951
|
-
const { handleListTriggers } = await import("./list-triggers-
|
|
2058
|
+
const { handleListTriggers } = await import("./list-triggers-XC5KMX4C.js");
|
|
1952
2059
|
return { content: [{ type: "text", text: await handleListTriggers(params) }] };
|
|
1953
2060
|
})
|
|
1954
2061
|
);
|
|
@@ -1956,11 +2063,11 @@ function registerTriggerTools(server) {
|
|
|
1956
2063
|
"platform_get_trigger",
|
|
1957
2064
|
"Read one trigger (automation) by its ID, including its delivery configuration. Credential values come back as [redacted]; sending them back unchanged on an update keeps the stored values.",
|
|
1958
2065
|
{
|
|
1959
|
-
id:
|
|
2066
|
+
id: z3.string().describe("The trigger ID")
|
|
1960
2067
|
},
|
|
1961
2068
|
withToolLogging("platform_get_trigger", async (params) => {
|
|
1962
2069
|
requireApiKey();
|
|
1963
|
-
const { getTrigger } = await import("./langwatch-api-triggers-
|
|
2070
|
+
const { getTrigger } = await import("./langwatch-api-triggers-QMR7KEXW.js");
|
|
1964
2071
|
const trigger = await getTrigger(params.id);
|
|
1965
2072
|
return { content: [{ type: "text", text: JSON.stringify(trigger, null, 2) }] };
|
|
1966
2073
|
})
|
|
@@ -1977,22 +2084,22 @@ function registerTriggerTools(server) {
|
|
|
1977
2084
|
"The delivery channel cannot be changed afterwards."
|
|
1978
2085
|
].join("\n"),
|
|
1979
2086
|
{
|
|
1980
|
-
name:
|
|
2087
|
+
name: z3.string().describe("Trigger name"),
|
|
1981
2088
|
action: triggerActionSchema.describe("Which channel it delivers on"),
|
|
1982
2089
|
actionParams: actionParamsSchema.optional().describe("The delivery configuration the channel named in `action` reads. Defaults to {}"),
|
|
1983
|
-
filters:
|
|
1984
|
-
filterQuery:
|
|
1985
|
-
customGraphId:
|
|
2090
|
+
filters: z3.string().optional().describe(TRIGGER_FILTERS_DESCRIPTION),
|
|
2091
|
+
filterQuery: z3.string().optional().describe(TRIGGER_FILTER_QUERY_DESCRIPTION),
|
|
2092
|
+
customGraphId: z3.string().optional().describe("Set to make this an alert on that graph"),
|
|
1986
2093
|
graphAlert: graphAlertSchema.optional(),
|
|
1987
2094
|
report: reportSchema.optional().describe("Set to make this a scheduled report"),
|
|
1988
2095
|
templates: templatesSchema.optional(),
|
|
1989
2096
|
notificationCadence: notificationCadenceSchema.optional(),
|
|
1990
|
-
message:
|
|
2097
|
+
message: z3.string().optional().describe("Custom alert message"),
|
|
1991
2098
|
alertType: alertTypeSchema.optional().describe("Alert severity. Required for a graph alert.")
|
|
1992
2099
|
},
|
|
1993
2100
|
withToolLogging("platform_create_trigger", async (params) => {
|
|
1994
2101
|
requireApiKey();
|
|
1995
|
-
const { handleCreateTrigger } = await import("./create-trigger-
|
|
2102
|
+
const { handleCreateTrigger } = await import("./create-trigger-RQ653WYF.js");
|
|
1996
2103
|
return handleCreateTrigger(params);
|
|
1997
2104
|
})
|
|
1998
2105
|
);
|
|
@@ -2005,22 +2112,22 @@ function registerTriggerTools(server) {
|
|
|
2005
2112
|
"The delivery channel, the kind of automation and an alert's graph cannot be changed."
|
|
2006
2113
|
].join("\n"),
|
|
2007
2114
|
{
|
|
2008
|
-
id:
|
|
2009
|
-
name:
|
|
2010
|
-
active:
|
|
2115
|
+
id: z3.string().describe("The trigger ID"),
|
|
2116
|
+
name: z3.string().optional().describe("New name"),
|
|
2117
|
+
active: z3.boolean().optional().describe("Resume or pause it"),
|
|
2011
2118
|
actionParams: actionParamsSchema.optional().describe("The delivery configuration this automation should have from now on"),
|
|
2012
|
-
filters:
|
|
2013
|
-
filterQuery:
|
|
2119
|
+
filters: z3.string().optional().describe(TRIGGER_FILTERS_DESCRIPTION),
|
|
2120
|
+
filterQuery: z3.string().nullable().optional().describe(`${TRIGGER_FILTER_QUERY_DESCRIPTION} null clears the saved query.`),
|
|
2014
2121
|
graphAlert: graphAlertSchema.optional().describe("Only for an automation that is already a graph alert"),
|
|
2015
2122
|
report: reportSchema.optional().describe("Only for an automation that is already a scheduled report"),
|
|
2016
2123
|
templates: templatesSchema.optional(),
|
|
2017
2124
|
notificationCadence: notificationCadenceSchema.optional(),
|
|
2018
|
-
message:
|
|
2125
|
+
message: z3.string().nullable().optional().describe("New alert message. null removes the custom message"),
|
|
2019
2126
|
alertType: alertTypeSchema.nullable().optional().describe("New alert severity. null clears it")
|
|
2020
2127
|
},
|
|
2021
2128
|
withToolLogging("platform_update_trigger", async (params) => {
|
|
2022
2129
|
requireApiKey();
|
|
2023
|
-
const { getTrigger, updateTrigger } = await import("./langwatch-api-triggers-
|
|
2130
|
+
const { getTrigger, updateTrigger } = await import("./langwatch-api-triggers-QMR7KEXW.js");
|
|
2024
2131
|
if (params.actionParams !== void 0) {
|
|
2025
2132
|
const saved = await getTrigger(params.id);
|
|
2026
2133
|
const boundParams = validateActionParamsForAction({
|
|
@@ -2028,11 +2135,11 @@ function registerTriggerTools(server) {
|
|
|
2028
2135
|
actionParams: params.actionParams
|
|
2029
2136
|
});
|
|
2030
2137
|
if (!boundParams.ok) {
|
|
2031
|
-
const { toolError: toolError2 } = await import("./create-trigger-
|
|
2138
|
+
const { toolError: toolError2 } = await import("./create-trigger-RQ653WYF.js");
|
|
2032
2139
|
return toolError2(boundParams.message);
|
|
2033
2140
|
}
|
|
2034
2141
|
}
|
|
2035
|
-
const { parseJsonObject, toolError } = await import("./create-trigger-
|
|
2142
|
+
const { parseJsonObject, toolError } = await import("./create-trigger-RQ653WYF.js");
|
|
2036
2143
|
const filters = params.filters ? parseJsonObject(params.filters) : void 0;
|
|
2037
2144
|
if (params.filters && !filters) {
|
|
2038
2145
|
return toolError("filters must be a JSON object");
|
|
@@ -2049,11 +2156,11 @@ function registerTriggerTools(server) {
|
|
|
2049
2156
|
"platform_test_fire_trigger",
|
|
2050
2157
|
"Send a trigger's message to the destination it is configured with, to confirm it arrives. Nothing is recorded as a fire.",
|
|
2051
2158
|
{
|
|
2052
|
-
id:
|
|
2159
|
+
id: z3.string().describe("The trigger ID")
|
|
2053
2160
|
},
|
|
2054
2161
|
withToolLogging("platform_test_fire_trigger", async (params) => {
|
|
2055
2162
|
requireApiKey();
|
|
2056
|
-
const { testFireTrigger } = await import("./langwatch-api-triggers-
|
|
2163
|
+
const { testFireTrigger } = await import("./langwatch-api-triggers-QMR7KEXW.js");
|
|
2057
2164
|
const result = await testFireTrigger(params.id);
|
|
2058
2165
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
2059
2166
|
})
|
|
@@ -2062,13 +2169,13 @@ function registerTriggerTools(server) {
|
|
|
2062
2169
|
"platform_list_trigger_fires",
|
|
2063
2170
|
"What an automation has done, newest first. Metadata only \u2014 no message content. Answers with `nextCursor`; pass it back as `cursor` for the next page (null means there is none).",
|
|
2064
2171
|
{
|
|
2065
|
-
id:
|
|
2066
|
-
limit:
|
|
2067
|
-
cursor:
|
|
2172
|
+
id: z3.string().describe("The trigger ID"),
|
|
2173
|
+
limit: z3.number().int().positive().optional().describe("How many fires to return"),
|
|
2174
|
+
cursor: z3.string().optional().describe("The `nextCursor` a previous call answered with")
|
|
2068
2175
|
},
|
|
2069
2176
|
withToolLogging("platform_list_trigger_fires", async (params) => {
|
|
2070
2177
|
requireApiKey();
|
|
2071
|
-
const { handleListTriggerFires } = await import("./list-trigger-fires-
|
|
2178
|
+
const { handleListTriggerFires } = await import("./list-trigger-fires-OZUF65LI.js");
|
|
2072
2179
|
return { content: [{ type: "text", text: await handleListTriggerFires(params) }] };
|
|
2073
2180
|
})
|
|
2074
2181
|
);
|
|
@@ -2076,11 +2183,11 @@ function registerTriggerTools(server) {
|
|
|
2076
2183
|
"platform_delete_trigger",
|
|
2077
2184
|
"Delete a trigger (automation).",
|
|
2078
2185
|
{
|
|
2079
|
-
id:
|
|
2186
|
+
id: z3.string().describe("The trigger ID to delete")
|
|
2080
2187
|
},
|
|
2081
2188
|
withToolLogging("platform_delete_trigger", async (params) => {
|
|
2082
2189
|
requireApiKey();
|
|
2083
|
-
const { deleteTrigger } = await import("./langwatch-api-triggers-
|
|
2190
|
+
const { deleteTrigger } = await import("./langwatch-api-triggers-QMR7KEXW.js");
|
|
2084
2191
|
const result = await deleteTrigger(params.id);
|
|
2085
2192
|
return { content: [{ type: "text", text: `Trigger ${result.id} deleted.` }] };
|
|
2086
2193
|
})
|
|
@@ -2093,7 +2200,7 @@ function registerMonitorTools(server) {
|
|
|
2093
2200
|
{},
|
|
2094
2201
|
withToolLogging("platform_list_monitors", async () => {
|
|
2095
2202
|
requireApiKey();
|
|
2096
|
-
const { listMonitors } = await import("./langwatch-api-monitors-
|
|
2203
|
+
const { listMonitors } = await import("./langwatch-api-monitors-OHSGADTH.js");
|
|
2097
2204
|
const monitors = await listMonitors();
|
|
2098
2205
|
if (monitors.length === 0) {
|
|
2099
2206
|
return { content: [{ type: "text", text: "No monitors found." }] };
|
|
@@ -2116,11 +2223,11 @@ ${lines.join("\n")}`
|
|
|
2116
2223
|
"platform_get_monitor",
|
|
2117
2224
|
"Get details of a specific online evaluation monitor.",
|
|
2118
2225
|
{
|
|
2119
|
-
id:
|
|
2226
|
+
id: z3.string().describe("The monitor ID")
|
|
2120
2227
|
},
|
|
2121
2228
|
withToolLogging("platform_get_monitor", async (params) => {
|
|
2122
2229
|
requireApiKey();
|
|
2123
|
-
const { getMonitor } = await import("./langwatch-api-monitors-
|
|
2230
|
+
const { getMonitor } = await import("./langwatch-api-monitors-OHSGADTH.js");
|
|
2124
2231
|
const m = await getMonitor(params.id);
|
|
2125
2232
|
const lines = [
|
|
2126
2233
|
`**${m.name}** (${m.id})`,
|
|
@@ -2139,15 +2246,15 @@ ${lines.join("\n")}`
|
|
|
2139
2246
|
"platform_create_monitor",
|
|
2140
2247
|
"Create a new online evaluation monitor that runs an evaluator on incoming traces.",
|
|
2141
2248
|
{
|
|
2142
|
-
name:
|
|
2143
|
-
checkType:
|
|
2144
|
-
executionMode:
|
|
2145
|
-
sample:
|
|
2146
|
-
evaluatorId:
|
|
2249
|
+
name: z3.string().describe("Monitor name"),
|
|
2250
|
+
checkType: z3.string().describe("Evaluator check type (e.g. ragas/toxicity, custom/my-eval)"),
|
|
2251
|
+
executionMode: z3.enum(["ON_MESSAGE", "AS_GUARDRAIL", "MANUALLY"]).optional().describe("When to run: ON_MESSAGE (default), AS_GUARDRAIL, or MANUALLY"),
|
|
2252
|
+
sample: z3.number().min(0).max(1).optional().describe("Sampling rate 0.0-1.0 (default: 1.0)"),
|
|
2253
|
+
evaluatorId: z3.string().optional().describe("Link to a saved evaluator by ID")
|
|
2147
2254
|
},
|
|
2148
2255
|
withToolLogging("platform_create_monitor", async (params) => {
|
|
2149
2256
|
requireApiKey();
|
|
2150
|
-
const { createMonitor } = await import("./langwatch-api-monitors-
|
|
2257
|
+
const { createMonitor } = await import("./langwatch-api-monitors-OHSGADTH.js");
|
|
2151
2258
|
const monitor = await createMonitor(params);
|
|
2152
2259
|
return {
|
|
2153
2260
|
content: [
|
|
@@ -2163,15 +2270,15 @@ ${lines.join("\n")}`
|
|
|
2163
2270
|
"platform_update_monitor",
|
|
2164
2271
|
"Update an existing online evaluation monitor.",
|
|
2165
2272
|
{
|
|
2166
|
-
id:
|
|
2167
|
-
name:
|
|
2168
|
-
enabled:
|
|
2169
|
-
executionMode:
|
|
2170
|
-
sample:
|
|
2273
|
+
id: z3.string().describe("The monitor ID to update"),
|
|
2274
|
+
name: z3.string().optional().describe("New monitor name"),
|
|
2275
|
+
enabled: z3.boolean().optional().describe("Enable or disable the monitor"),
|
|
2276
|
+
executionMode: z3.enum(["ON_MESSAGE", "AS_GUARDRAIL", "MANUALLY"]).optional().describe("New execution mode"),
|
|
2277
|
+
sample: z3.number().min(0).max(1).optional().describe("New sampling rate")
|
|
2171
2278
|
},
|
|
2172
2279
|
withToolLogging("platform_update_monitor", async (params) => {
|
|
2173
2280
|
requireApiKey();
|
|
2174
|
-
const { updateMonitor } = await import("./langwatch-api-monitors-
|
|
2281
|
+
const { updateMonitor } = await import("./langwatch-api-monitors-OHSGADTH.js");
|
|
2175
2282
|
const monitor = await updateMonitor(params);
|
|
2176
2283
|
return {
|
|
2177
2284
|
content: [
|
|
@@ -2187,11 +2294,11 @@ ${lines.join("\n")}`
|
|
|
2187
2294
|
"platform_delete_monitor",
|
|
2188
2295
|
"Delete an online evaluation monitor.",
|
|
2189
2296
|
{
|
|
2190
|
-
id:
|
|
2297
|
+
id: z3.string().describe("The monitor ID to delete")
|
|
2191
2298
|
},
|
|
2192
2299
|
withToolLogging("platform_delete_monitor", async (params) => {
|
|
2193
2300
|
requireApiKey();
|
|
2194
|
-
const { deleteMonitor } = await import("./langwatch-api-monitors-
|
|
2301
|
+
const { deleteMonitor } = await import("./langwatch-api-monitors-OHSGADTH.js");
|
|
2195
2302
|
const result = await deleteMonitor(params.id);
|
|
2196
2303
|
return {
|
|
2197
2304
|
content: [{ type: "text", text: `Monitor ${result.id} deleted.` }]
|
|
@@ -2206,7 +2313,7 @@ function registerSecretTools(server) {
|
|
|
2206
2313
|
{},
|
|
2207
2314
|
withToolLogging("platform_list_secrets", async () => {
|
|
2208
2315
|
requireApiKey();
|
|
2209
|
-
const { listSecrets } = await import("./langwatch-api-secrets-
|
|
2316
|
+
const { listSecrets } = await import("./langwatch-api-secrets-CLTS766Q.js");
|
|
2210
2317
|
const secrets = await listSecrets();
|
|
2211
2318
|
if (secrets.length === 0) {
|
|
2212
2319
|
return { content: [{ type: "text", text: "No secrets found." }] };
|
|
@@ -2227,12 +2334,12 @@ ${lines.join("\n")}`
|
|
|
2227
2334
|
"platform_create_secret",
|
|
2228
2335
|
"Create a new encrypted project secret. Name must be UPPER_SNAKE_CASE (e.g. MY_API_KEY).",
|
|
2229
2336
|
{
|
|
2230
|
-
name:
|
|
2231
|
-
value:
|
|
2337
|
+
name: z3.string().describe("Secret name in UPPER_SNAKE_CASE (e.g. OPENAI_API_KEY)"),
|
|
2338
|
+
value: z3.string().describe("The secret value (will be encrypted at rest)")
|
|
2232
2339
|
},
|
|
2233
2340
|
withToolLogging("platform_create_secret", async (params) => {
|
|
2234
2341
|
requireApiKey();
|
|
2235
|
-
const { createSecret } = await import("./langwatch-api-secrets-
|
|
2342
|
+
const { createSecret } = await import("./langwatch-api-secrets-CLTS766Q.js");
|
|
2236
2343
|
const secret = await createSecret({ name: params.name, value: params.value });
|
|
2237
2344
|
return {
|
|
2238
2345
|
content: [
|
|
@@ -2248,12 +2355,12 @@ ${lines.join("\n")}`
|
|
|
2248
2355
|
"platform_update_secret",
|
|
2249
2356
|
"Update an existing project secret's value.",
|
|
2250
2357
|
{
|
|
2251
|
-
id:
|
|
2252
|
-
value:
|
|
2358
|
+
id: z3.string().describe("The secret ID to update"),
|
|
2359
|
+
value: z3.string().describe("The new secret value (will be encrypted at rest)")
|
|
2253
2360
|
},
|
|
2254
2361
|
withToolLogging("platform_update_secret", async (params) => {
|
|
2255
2362
|
requireApiKey();
|
|
2256
|
-
const { updateSecret } = await import("./langwatch-api-secrets-
|
|
2363
|
+
const { updateSecret } = await import("./langwatch-api-secrets-CLTS766Q.js");
|
|
2257
2364
|
const secret = await updateSecret({ id: params.id, value: params.value });
|
|
2258
2365
|
return {
|
|
2259
2366
|
content: [
|
|
@@ -2269,11 +2376,11 @@ ${lines.join("\n")}`
|
|
|
2269
2376
|
"platform_delete_secret",
|
|
2270
2377
|
"Delete a project secret.",
|
|
2271
2378
|
{
|
|
2272
|
-
id:
|
|
2379
|
+
id: z3.string().describe("The secret ID to delete")
|
|
2273
2380
|
},
|
|
2274
2381
|
withToolLogging("platform_delete_secret", async (params) => {
|
|
2275
2382
|
requireApiKey();
|
|
2276
|
-
const { deleteSecret } = await import("./langwatch-api-secrets-
|
|
2383
|
+
const { deleteSecret } = await import("./langwatch-api-secrets-CLTS766Q.js");
|
|
2277
2384
|
const result = await deleteSecret(params.id);
|
|
2278
2385
|
return { content: [{ type: "text", text: `Secret ${result.id} deleted.` }] };
|
|
2279
2386
|
})
|
|
@@ -2284,7 +2391,10 @@ function registerExperimentTools(server) {
|
|
|
2284
2391
|
"platform_run_experiment",
|
|
2285
2392
|
"Start an experiment run by slug. Returns a run ID for polling status.",
|
|
2286
2393
|
{
|
|
2287
|
-
slug:
|
|
2394
|
+
slug: z3.string().describe("The experiment slug to run"),
|
|
2395
|
+
concurrency: z3.number().int().min(1).max(24).optional().describe(
|
|
2396
|
+
"Cells (one row against one target) to run at once, for this run only (default: the server's setting). Use 1 to run them one at a time, in order."
|
|
2397
|
+
)
|
|
2288
2398
|
},
|
|
2289
2399
|
withToolLogging("platform_run_experiment", async (params) => {
|
|
2290
2400
|
requireApiKey();
|
|
@@ -2297,8 +2407,8 @@ function registerExperimentTools(server) {
|
|
|
2297
2407
|
"platform_experiment_status",
|
|
2298
2408
|
"Check the status of an experiment run (running, completed, stopped, or interrupted) plus its progress. Works for both platform-run and SDK-logged experiments; pass experimentSlug for SDK runs or runs older than 24h.",
|
|
2299
2409
|
{
|
|
2300
|
-
runId:
|
|
2301
|
-
experimentSlug:
|
|
2410
|
+
runId: z3.string().describe("The run ID returned from platform_run_experiment"),
|
|
2411
|
+
experimentSlug: z3.string().optional().describe(
|
|
2302
2412
|
"Experiment slug \u2014 required for SDK-logged runs and runs older than 24h (the Redis run-state they would otherwise be read from is absent/expired). Use platform_experiment_list_runs to find the slug."
|
|
2303
2413
|
)
|
|
2304
2414
|
},
|
|
@@ -2313,7 +2423,7 @@ function registerExperimentTools(server) {
|
|
|
2313
2423
|
"platform_experiment_list",
|
|
2314
2424
|
"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.",
|
|
2315
2425
|
{
|
|
2316
|
-
limit:
|
|
2426
|
+
limit: z3.number().int().positive().max(100).optional().describe("Maximum number of experiments to include (default 25, hard-capped at 100)")
|
|
2317
2427
|
},
|
|
2318
2428
|
withToolLogging("platform_experiment_list", async (params) => {
|
|
2319
2429
|
requireApiKey();
|
|
@@ -2326,8 +2436,8 @@ function registerExperimentTools(server) {
|
|
|
2326
2436
|
"platform_experiment_list_runs",
|
|
2327
2437
|
"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.",
|
|
2328
2438
|
{
|
|
2329
|
-
experimentSlug:
|
|
2330
|
-
limit:
|
|
2439
|
+
experimentSlug: z3.string().describe("Experiment slug from platform_experiment_list (e.g. 'checkout-flow')"),
|
|
2440
|
+
limit: z3.number().int().positive().max(100).optional().describe("Maximum number of runs to include (default 25, hard-capped at 100)")
|
|
2331
2441
|
},
|
|
2332
2442
|
withToolLogging("platform_experiment_list_runs", async (params) => {
|
|
2333
2443
|
requireApiKey();
|
|
@@ -2340,15 +2450,15 @@ function registerExperimentTools(server) {
|
|
|
2340
2450
|
"platform_experiment_results",
|
|
2341
2451
|
"Fetch per-row results for an experiment run so you can debug evaluator scores and missed rows. Serves partial results for runs that are still running or were interrupted (it does not require a completed run), with the run status noted in the output. 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.",
|
|
2342
2452
|
{
|
|
2343
|
-
runId:
|
|
2344
|
-
experimentSlug:
|
|
2453
|
+
runId: z3.string().describe("The run ID returned from platform_run_experiment"),
|
|
2454
|
+
experimentSlug: z3.string().optional().describe(
|
|
2345
2455
|
"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."
|
|
2346
2456
|
),
|
|
2347
|
-
filter:
|
|
2457
|
+
filter: z3.enum(["all", "failed"]).optional().describe(
|
|
2348
2458
|
"Filter rows: 'failed' shows only rows that errored or failed an evaluation; 'all' (default) shows everything"
|
|
2349
2459
|
),
|
|
2350
|
-
evaluator:
|
|
2351
|
-
limit:
|
|
2460
|
+
evaluator: z3.string().optional().describe("Show only this evaluator's results (matched on `evaluator` field)"),
|
|
2461
|
+
limit: z3.number().int().positive().max(50).optional().describe(
|
|
2352
2462
|
"Maximum number of rows to include in the markdown output (default 50, hard-capped at 50)."
|
|
2353
2463
|
)
|
|
2354
2464
|
},
|
|
@@ -2365,12 +2475,12 @@ function registerDatasetTools(server) {
|
|
|
2365
2475
|
"platform_list_datasets",
|
|
2366
2476
|
"List all datasets on the LangWatch platform with their names, slugs, columns, and record counts. Returns AI-readable digest by default.",
|
|
2367
2477
|
{
|
|
2368
|
-
format:
|
|
2478
|
+
format: z3.enum(["digest", "json"]).optional().describe("Output format: 'digest' (default, AI-readable) or 'json' (full raw data)")
|
|
2369
2479
|
},
|
|
2370
2480
|
async (params) => {
|
|
2371
|
-
const { requireApiKey: requireApiKey2 } = await import("./config-
|
|
2481
|
+
const { requireApiKey: requireApiKey2 } = await import("./config-2WQGMAEN.js");
|
|
2372
2482
|
requireApiKey2();
|
|
2373
|
-
const { handleListDatasets } = await import("./list-datasets-
|
|
2483
|
+
const { handleListDatasets } = await import("./list-datasets-P3JK2ZHS.js");
|
|
2374
2484
|
return {
|
|
2375
2485
|
content: [{ type: "text", text: await handleListDatasets(params) }]
|
|
2376
2486
|
};
|
|
@@ -2380,13 +2490,13 @@ function registerDatasetTools(server) {
|
|
|
2380
2490
|
"platform_get_dataset",
|
|
2381
2491
|
"Get full details of a dataset on the LangWatch platform by slug or ID, including column definitions and a preview of records.",
|
|
2382
2492
|
{
|
|
2383
|
-
slugOrId:
|
|
2384
|
-
format:
|
|
2493
|
+
slugOrId: z3.string().describe("The dataset slug or ID to retrieve"),
|
|
2494
|
+
format: z3.enum(["digest", "json"]).optional().describe("Output format: 'digest' (default, AI-readable) or 'json' (full raw data)")
|
|
2385
2495
|
},
|
|
2386
2496
|
async (params) => {
|
|
2387
|
-
const { requireApiKey: requireApiKey2 } = await import("./config-
|
|
2497
|
+
const { requireApiKey: requireApiKey2 } = await import("./config-2WQGMAEN.js");
|
|
2388
2498
|
requireApiKey2();
|
|
2389
|
-
const { handleGetDataset } = await import("./get-dataset-
|
|
2499
|
+
const { handleGetDataset } = await import("./get-dataset-APGZBYMH.js");
|
|
2390
2500
|
return {
|
|
2391
2501
|
content: [{ type: "text", text: await handleGetDataset(params) }]
|
|
2392
2502
|
};
|
|
@@ -2397,9 +2507,9 @@ function registerDatasetTools(server) {
|
|
|
2397
2507
|
"Create a new dataset on the LangWatch platform.",
|
|
2398
2508
|
createDatasetSchema.shape,
|
|
2399
2509
|
async (params) => {
|
|
2400
|
-
const { requireApiKey: requireApiKey2 } = await import("./config-
|
|
2510
|
+
const { requireApiKey: requireApiKey2 } = await import("./config-2WQGMAEN.js");
|
|
2401
2511
|
requireApiKey2();
|
|
2402
|
-
const { handleCreateDataset } = await import("./create-dataset-
|
|
2512
|
+
const { handleCreateDataset } = await import("./create-dataset-WON4SOTC.js");
|
|
2403
2513
|
return {
|
|
2404
2514
|
content: [{ type: "text", text: await handleCreateDataset(params) }]
|
|
2405
2515
|
};
|
|
@@ -2409,14 +2519,14 @@ function registerDatasetTools(server) {
|
|
|
2409
2519
|
"platform_update_dataset",
|
|
2410
2520
|
"Update an existing dataset on the LangWatch platform (name and/or column types).",
|
|
2411
2521
|
{
|
|
2412
|
-
slugOrId:
|
|
2413
|
-
name:
|
|
2414
|
-
columnTypes:
|
|
2522
|
+
slugOrId: z3.string().describe("The dataset slug or ID to update"),
|
|
2523
|
+
name: z3.string().optional().describe("Updated dataset name"),
|
|
2524
|
+
columnTypes: z3.array(datasetColumnDefinitionSchema).optional().describe("Updated column definitions")
|
|
2415
2525
|
},
|
|
2416
2526
|
async (params) => {
|
|
2417
|
-
const { requireApiKey: requireApiKey2 } = await import("./config-
|
|
2527
|
+
const { requireApiKey: requireApiKey2 } = await import("./config-2WQGMAEN.js");
|
|
2418
2528
|
requireApiKey2();
|
|
2419
|
-
const { handleUpdateDataset } = await import("./update-dataset-
|
|
2529
|
+
const { handleUpdateDataset } = await import("./update-dataset-IRVMY5PF.js");
|
|
2420
2530
|
return {
|
|
2421
2531
|
content: [{ type: "text", text: await handleUpdateDataset(params) }]
|
|
2422
2532
|
};
|
|
@@ -2426,12 +2536,12 @@ function registerDatasetTools(server) {
|
|
|
2426
2536
|
"platform_delete_dataset",
|
|
2427
2537
|
"Delete (archive) a dataset on the LangWatch platform.",
|
|
2428
2538
|
{
|
|
2429
|
-
slugOrId:
|
|
2539
|
+
slugOrId: z3.string().describe("The dataset slug or ID to delete")
|
|
2430
2540
|
},
|
|
2431
2541
|
async (params) => {
|
|
2432
|
-
const { requireApiKey: requireApiKey2 } = await import("./config-
|
|
2542
|
+
const { requireApiKey: requireApiKey2 } = await import("./config-2WQGMAEN.js");
|
|
2433
2543
|
requireApiKey2();
|
|
2434
|
-
const { handleDeleteDataset } = await import("./delete-dataset-
|
|
2544
|
+
const { handleDeleteDataset } = await import("./delete-dataset-NXP7ZPPV.js");
|
|
2435
2545
|
return {
|
|
2436
2546
|
content: [{ type: "text", text: await handleDeleteDataset(params) }]
|
|
2437
2547
|
};
|
|
@@ -2441,15 +2551,15 @@ function registerDatasetTools(server) {
|
|
|
2441
2551
|
"platform_list_dataset_records",
|
|
2442
2552
|
"List records in a dataset on the LangWatch platform with pagination.",
|
|
2443
2553
|
{
|
|
2444
|
-
slugOrId:
|
|
2445
|
-
page:
|
|
2446
|
-
limit:
|
|
2447
|
-
format:
|
|
2554
|
+
slugOrId: z3.string().describe("The dataset slug or ID to list records from"),
|
|
2555
|
+
page: z3.number().int().min(1).optional().describe("Page number (default: 1)"),
|
|
2556
|
+
limit: z3.number().int().min(1).max(1e3).optional().describe("Records per page (default: 50, max: 1000)"),
|
|
2557
|
+
format: z3.enum(["digest", "json"]).optional().describe("Output format: 'digest' (default, AI-readable) or 'json' (full raw data)")
|
|
2448
2558
|
},
|
|
2449
2559
|
async (params) => {
|
|
2450
|
-
const { requireApiKey: requireApiKey2 } = await import("./config-
|
|
2560
|
+
const { requireApiKey: requireApiKey2 } = await import("./config-2WQGMAEN.js");
|
|
2451
2561
|
requireApiKey2();
|
|
2452
|
-
const { handleListDatasetRecords } = await import("./list-dataset-records-
|
|
2562
|
+
const { handleListDatasetRecords } = await import("./list-dataset-records-KMLLMZAZ.js");
|
|
2453
2563
|
return {
|
|
2454
2564
|
content: [{ type: "text", text: await handleListDatasetRecords(params) }]
|
|
2455
2565
|
};
|
|
@@ -2459,13 +2569,13 @@ function registerDatasetTools(server) {
|
|
|
2459
2569
|
"platform_create_dataset_records",
|
|
2460
2570
|
"Add records to a dataset on the LangWatch platform in batch (max 1000 per call).",
|
|
2461
2571
|
{
|
|
2462
|
-
slugOrId:
|
|
2463
|
-
entries:
|
|
2572
|
+
slugOrId: z3.string().describe("The dataset slug or ID to add records to"),
|
|
2573
|
+
entries: z3.array(z3.record(z3.string(), z3.unknown())).min(1).max(1e3).describe("Array of record entries to create (key-value objects matching dataset columns)")
|
|
2464
2574
|
},
|
|
2465
2575
|
async (params) => {
|
|
2466
|
-
const { requireApiKey: requireApiKey2 } = await import("./config-
|
|
2576
|
+
const { requireApiKey: requireApiKey2 } = await import("./config-2WQGMAEN.js");
|
|
2467
2577
|
requireApiKey2();
|
|
2468
|
-
const { handleCreateDatasetRecords } = await import("./create-dataset-records-
|
|
2578
|
+
const { handleCreateDatasetRecords } = await import("./create-dataset-records-UJBW3C7C.js");
|
|
2469
2579
|
return {
|
|
2470
2580
|
content: [{ type: "text", text: await handleCreateDatasetRecords(params) }]
|
|
2471
2581
|
};
|
|
@@ -2475,14 +2585,14 @@ function registerDatasetTools(server) {
|
|
|
2475
2585
|
"platform_update_dataset_record",
|
|
2476
2586
|
"Update a single record in a dataset on the LangWatch platform.",
|
|
2477
2587
|
{
|
|
2478
|
-
slugOrId:
|
|
2479
|
-
recordId:
|
|
2480
|
-
entry:
|
|
2588
|
+
slugOrId: z3.string().describe("The dataset slug or ID containing the record"),
|
|
2589
|
+
recordId: z3.string().describe("The record ID to update"),
|
|
2590
|
+
entry: z3.record(z3.string(), z3.unknown()).describe("Updated record entry (key-value object)")
|
|
2481
2591
|
},
|
|
2482
2592
|
async (params) => {
|
|
2483
|
-
const { requireApiKey: requireApiKey2 } = await import("./config-
|
|
2593
|
+
const { requireApiKey: requireApiKey2 } = await import("./config-2WQGMAEN.js");
|
|
2484
2594
|
requireApiKey2();
|
|
2485
|
-
const { handleUpdateDatasetRecord } = await import("./update-dataset-record-
|
|
2595
|
+
const { handleUpdateDatasetRecord } = await import("./update-dataset-record-Z3L7ACNF.js");
|
|
2486
2596
|
return {
|
|
2487
2597
|
content: [{ type: "text", text: await handleUpdateDatasetRecord(params) }]
|
|
2488
2598
|
};
|
|
@@ -2492,13 +2602,13 @@ function registerDatasetTools(server) {
|
|
|
2492
2602
|
"platform_delete_dataset_records",
|
|
2493
2603
|
"Delete records from a dataset on the LangWatch platform by their IDs.",
|
|
2494
2604
|
{
|
|
2495
|
-
slugOrId:
|
|
2496
|
-
recordIds:
|
|
2605
|
+
slugOrId: z3.string().describe("The dataset slug or ID containing the records"),
|
|
2606
|
+
recordIds: z3.array(z3.string()).min(1).max(1e3).describe("Array of record IDs to delete")
|
|
2497
2607
|
},
|
|
2498
2608
|
async (params) => {
|
|
2499
|
-
const { requireApiKey: requireApiKey2 } = await import("./config-
|
|
2609
|
+
const { requireApiKey: requireApiKey2 } = await import("./config-2WQGMAEN.js");
|
|
2500
2610
|
requireApiKey2();
|
|
2501
|
-
const { handleDeleteDatasetRecords } = await import("./delete-dataset-records-
|
|
2611
|
+
const { handleDeleteDatasetRecords } = await import("./delete-dataset-records-4Z7DZCDW.js");
|
|
2502
2612
|
return {
|
|
2503
2613
|
content: [{ type: "text", text: await handleDeleteDatasetRecords(params) }]
|
|
2504
2614
|
};
|
|
@@ -2510,12 +2620,12 @@ function registerProjectTools(server) {
|
|
|
2510
2620
|
"platform_list_projects",
|
|
2511
2621
|
"List all projects in your LangWatch organization. Requires an org-level API key.",
|
|
2512
2622
|
{
|
|
2513
|
-
page:
|
|
2514
|
-
limit:
|
|
2623
|
+
page: z3.number().int().positive().optional().describe("Page number (default: 1)"),
|
|
2624
|
+
limit: z3.number().int().positive().max(1e3).optional().describe("Results per page (default: 100)")
|
|
2515
2625
|
},
|
|
2516
2626
|
withToolLogging("platform_list_projects", async (params) => {
|
|
2517
2627
|
requireApiKey();
|
|
2518
|
-
const { handleListProjects } = await import("./list-projects-
|
|
2628
|
+
const { handleListProjects } = await import("./list-projects-HUVK7L3W.js");
|
|
2519
2629
|
return {
|
|
2520
2630
|
content: [{ type: "text", text: await handleListProjects(params) }]
|
|
2521
2631
|
};
|
|
@@ -2525,11 +2635,11 @@ function registerProjectTools(server) {
|
|
|
2525
2635
|
"platform_get_project",
|
|
2526
2636
|
"Get details of a specific project by its ID.",
|
|
2527
2637
|
{
|
|
2528
|
-
id:
|
|
2638
|
+
id: z3.string().describe("The project ID")
|
|
2529
2639
|
},
|
|
2530
2640
|
withToolLogging("platform_get_project", async (params) => {
|
|
2531
2641
|
requireApiKey();
|
|
2532
|
-
const { handleGetProject } = await import("./get-project-
|
|
2642
|
+
const { handleGetProject } = await import("./get-project-RK6AJTEP.js");
|
|
2533
2643
|
return {
|
|
2534
2644
|
content: [{ type: "text", text: await handleGetProject(params) }]
|
|
2535
2645
|
};
|
|
@@ -2541,15 +2651,15 @@ function registerProjectTools(server) {
|
|
|
2541
2651
|
|
|
2542
2652
|
You must provide either teamId (to add the project to an existing team) or newTeamName (to create a new team for the project).`,
|
|
2543
2653
|
{
|
|
2544
|
-
name:
|
|
2545
|
-
language:
|
|
2546
|
-
framework:
|
|
2547
|
-
teamId:
|
|
2548
|
-
newTeamName:
|
|
2654
|
+
name: z3.string().describe("Project name"),
|
|
2655
|
+
language: z3.string().describe('Programming language (e.g. "python", "typescript")'),
|
|
2656
|
+
framework: z3.string().describe('Framework (e.g. "openai", "langchain", "custom")'),
|
|
2657
|
+
teamId: z3.string().optional().describe("ID of an existing team to add the project to"),
|
|
2658
|
+
newTeamName: z3.string().optional().describe("Name for a new team to create for this project")
|
|
2549
2659
|
},
|
|
2550
2660
|
withToolLogging("platform_create_project", async (params) => {
|
|
2551
2661
|
requireApiKey();
|
|
2552
|
-
const { handleCreateProject } = await import("./create-project-
|
|
2662
|
+
const { handleCreateProject } = await import("./create-project-EY4XZ7TH.js");
|
|
2553
2663
|
return {
|
|
2554
2664
|
content: [{ type: "text", text: await handleCreateProject(params) }]
|
|
2555
2665
|
};
|
|
@@ -2559,15 +2669,15 @@ You must provide either teamId (to add the project to an existing team) or newTe
|
|
|
2559
2669
|
"platform_update_project",
|
|
2560
2670
|
"Update an existing project's name, language, framework, or PII redaction level.",
|
|
2561
2671
|
{
|
|
2562
|
-
id:
|
|
2563
|
-
name:
|
|
2564
|
-
language:
|
|
2565
|
-
framework:
|
|
2566
|
-
piiRedactionLevel:
|
|
2672
|
+
id: z3.string().describe("The project ID to update"),
|
|
2673
|
+
name: z3.string().optional().describe("New project name"),
|
|
2674
|
+
language: z3.string().optional().describe("New programming language"),
|
|
2675
|
+
framework: z3.string().optional().describe("New framework"),
|
|
2676
|
+
piiRedactionLevel: z3.enum(["STRICT", "ESSENTIAL", "DISABLED"]).optional().describe("PII redaction level")
|
|
2567
2677
|
},
|
|
2568
2678
|
withToolLogging("platform_update_project", async (params) => {
|
|
2569
2679
|
requireApiKey();
|
|
2570
|
-
const { handleUpdateProject } = await import("./update-project-
|
|
2680
|
+
const { handleUpdateProject } = await import("./update-project-QPR3QX55.js");
|
|
2571
2681
|
return {
|
|
2572
2682
|
content: [{ type: "text", text: await handleUpdateProject(params) }]
|
|
2573
2683
|
};
|
|
@@ -2577,11 +2687,11 @@ You must provide either teamId (to add the project to an existing team) or newTe
|
|
|
2577
2687
|
"platform_archive_project",
|
|
2578
2688
|
"Archive (soft-delete) a project. The project can be restored later if needed.",
|
|
2579
2689
|
{
|
|
2580
|
-
id:
|
|
2690
|
+
id: z3.string().describe("The project ID to archive")
|
|
2581
2691
|
},
|
|
2582
2692
|
withToolLogging("platform_archive_project", async (params) => {
|
|
2583
2693
|
requireApiKey();
|
|
2584
|
-
const { handleArchiveProject } = await import("./archive-project-
|
|
2694
|
+
const { handleArchiveProject } = await import("./archive-project-K5UD7A6X.js");
|
|
2585
2695
|
return {
|
|
2586
2696
|
content: [{ type: "text", text: await handleArchiveProject(params) }]
|
|
2587
2697
|
};
|
|
@@ -2595,7 +2705,7 @@ function registerApiKeyTools(server) {
|
|
|
2595
2705
|
{},
|
|
2596
2706
|
withToolLogging("platform_list_api_keys", async () => {
|
|
2597
2707
|
requireApiKey();
|
|
2598
|
-
const { handleListApiKeys } = await import("./list-api-keys-
|
|
2708
|
+
const { handleListApiKeys } = await import("./list-api-keys-JMW5WRXX.js");
|
|
2599
2709
|
return {
|
|
2600
2710
|
content: [{ type: "text", text: await handleListApiKeys() }]
|
|
2601
2711
|
};
|
|
@@ -2610,22 +2720,22 @@ function registerApiKeyTools(server) {
|
|
|
2610
2720
|
|
|
2611
2721
|
The token is returned once and cannot be retrieved again.`,
|
|
2612
2722
|
{
|
|
2613
|
-
keyType:
|
|
2614
|
-
name:
|
|
2615
|
-
description:
|
|
2616
|
-
expiresAt:
|
|
2617
|
-
bindings:
|
|
2618
|
-
|
|
2619
|
-
role:
|
|
2620
|
-
scopeType:
|
|
2621
|
-
scopeId:
|
|
2723
|
+
keyType: z3.enum(["personal", "service"]).describe("Key type: 'personal' (user-tied) or 'service' (headless)"),
|
|
2724
|
+
name: z3.string().describe("Key name (max 100 chars)"),
|
|
2725
|
+
description: z3.string().optional().describe("Key description (max 500 chars)"),
|
|
2726
|
+
expiresAt: z3.string().optional().describe("Expiration date (ISO string)"),
|
|
2727
|
+
bindings: z3.array(
|
|
2728
|
+
z3.object({
|
|
2729
|
+
role: z3.enum(["ADMIN", "MEMBER", "VIEWER"]).describe("Role"),
|
|
2730
|
+
scopeType: z3.enum(["ORGANIZATION", "TEAM", "PROJECT"]).describe("Scope type"),
|
|
2731
|
+
scopeId: z3.string().describe("Scope ID (org, team, or project ID)")
|
|
2622
2732
|
})
|
|
2623
2733
|
).optional().describe("Role bindings (required for personal keys)"),
|
|
2624
|
-
projectIds:
|
|
2734
|
+
projectIds: z3.array(z3.string()).optional().describe("Project IDs for service keys (creates ADMIN bindings per project)")
|
|
2625
2735
|
},
|
|
2626
2736
|
withToolLogging("platform_create_api_key", async (params) => {
|
|
2627
2737
|
requireApiKey();
|
|
2628
|
-
const { handleCreateApiKey } = await import("./create-api-key-
|
|
2738
|
+
const { handleCreateApiKey } = await import("./create-api-key-JKM2DSZO.js");
|
|
2629
2739
|
return {
|
|
2630
2740
|
content: [{ type: "text", text: await handleCreateApiKey(params) }]
|
|
2631
2741
|
};
|
|
@@ -2635,11 +2745,11 @@ The token is returned once and cannot be retrieved again.`,
|
|
|
2635
2745
|
"platform_revoke_api_key",
|
|
2636
2746
|
"Revoke an API key. Once revoked, the key can no longer be used for authentication.",
|
|
2637
2747
|
{
|
|
2638
|
-
id:
|
|
2748
|
+
id: z3.string().describe("The API key ID to revoke")
|
|
2639
2749
|
},
|
|
2640
2750
|
withToolLogging("platform_revoke_api_key", async (params) => {
|
|
2641
2751
|
requireApiKey();
|
|
2642
|
-
const { handleRevokeApiKey } = await import("./revoke-api-key-
|
|
2752
|
+
const { handleRevokeApiKey } = await import("./revoke-api-key-BU6BKGCG.js");
|
|
2643
2753
|
return {
|
|
2644
2754
|
content: [{ type: "text", text: await handleRevokeApiKey(params) }]
|
|
2645
2755
|
};
|
|
@@ -2650,4 +2760,4 @@ The token is returned once and cannot be retrieved again.`,
|
|
|
2650
2760
|
export {
|
|
2651
2761
|
createMcpServer
|
|
2652
2762
|
};
|
|
2653
|
-
//# sourceMappingURL=chunk-
|
|
2763
|
+
//# sourceMappingURL=chunk-R5YJIYPF.js.map
|