@langwatch/mcp-server 2.2.0 → 3.1.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 +33 -0
- package/dist/add-dashboard-widget-3IE3W5RR.js +46 -0
- package/dist/add-dashboard-widget-XNAIGV37.js +45 -0
- package/dist/{archive-project-KWFM3I5Z.js → archive-project-LAWWNKTX.js} +4 -4
- package/dist/{archive-project-SPVHXK6A.js → archive-project-X64627XS.js} +4 -4
- package/dist/{archive-run-plan-Z4SYE6BP.js → archive-run-plan-3HKFL5MS.js} +4 -4
- package/dist/{archive-run-plan-65QN3XRX.js → archive-run-plan-C35EJACZ.js} +4 -4
- package/dist/{archive-scenario-A6QV5LOW.js → archive-scenario-3DOXHOJJ.js} +4 -4
- package/dist/{archive-scenario-FXEYQNEH.js → archive-scenario-7KDGEZM5.js} +4 -4
- package/dist/{archive-test-suite-NKZDZY3D.js → archive-test-suite-KZOESY2Y.js} +4 -4
- package/dist/{archive-test-suite-5ADQ3KPQ.js → archive-test-suite-RPJ6ZKBV.js} +4 -4
- package/dist/{assign-prompt-tag-5IUZXJ2T.js → assign-prompt-tag-2A25CXB7.js} +3 -3
- package/dist/{assign-prompt-tag-HBZLBIFD.js → assign-prompt-tag-TQRV6D6V.js} +3 -3
- package/dist/{chunk-Y34DHR5K.js → chunk-27SS5FBC.js} +2 -2
- package/dist/chunk-2RLDGMPZ.js +79 -0
- package/dist/{chunk-VMWJD732.js → chunk-3GVTJ7NK.js} +2 -2
- package/dist/chunk-6DF65T3B.js +36 -0
- package/dist/{chunk-3OCG3QPU.js → chunk-6OLI3LFY.js} +2 -2
- package/dist/{chunk-B4J3PJLX.js → chunk-7HJSQOSZ.js} +2 -6
- package/dist/{chunk-UWLE5T2F.js → chunk-7MNQDTKJ.js} +46 -27
- package/dist/{chunk-I7ATIZED.js → chunk-BHCYKMRH.js} +2 -2
- package/dist/{chunk-H6WGMG2T.js → chunk-DULFP3MK.js} +1 -1
- package/dist/{chunk-NKMTIHIJ.js → chunk-FSU2ZBUM.js} +2 -2
- package/dist/{chunk-SXFC3FNH.js → chunk-I2Z5CBOU.js} +2 -2
- package/dist/{chunk-J7PQKBLD.js → chunk-JEMUBKLJ.js} +533 -402
- package/dist/{chunk-7VNSRCXO.js → chunk-JOFSQFCN.js} +2 -2
- package/dist/{chunk-HGELNIVY.js → chunk-JQN3VXPH.js} +3 -3
- package/dist/{chunk-UTJCWXPZ.js → chunk-LXBQK3J3.js} +2 -2
- package/dist/{chunk-JRJPH75H.js → chunk-MQRTYXHJ.js} +2 -2
- package/dist/{chunk-YCARO42Z.js → chunk-P2JRKSYI.js} +3 -3
- package/dist/{chunk-PTDR56Z3.js → chunk-QF7ZGYVI.js} +2 -2
- package/dist/{chunk-UNJM3BIL.js → chunk-QTAHHJH3.js} +2 -2
- package/dist/chunk-SLRQHMJZ.js +41 -0
- package/dist/{chunk-SUPUUC4W.js → chunk-YQWZ4CDN.js} +5 -3
- package/dist/{config-EAKW6F26.js → config-2WQGMAEN.js} +2 -2
- package/dist/config.js +1 -1
- package/dist/{create-agent-S5ZBCEFT.js → create-agent-IE7Q2Z4C.js} +4 -4
- package/dist/{create-agent-AYZ3LB3V.js → create-agent-JMCQ5WZC.js} +4 -4
- package/dist/create-analytics-report-4X5N7EOT.js +19 -0
- package/dist/create-analytics-report-IKWZRS2O.js +18 -0
- package/dist/{create-annotation-VUSXULQK.js → create-annotation-IZ53SJOX.js} +4 -4
- package/dist/{create-annotation-LHNCLHYP.js → create-annotation-JR6DBHPW.js} +4 -4
- package/dist/{create-api-key-T4KSNPKB.js → create-api-key-IKMOTWCD.js} +4 -4
- package/dist/{create-api-key-NNYKARMG.js → create-api-key-YUDAGOWL.js} +4 -4
- package/dist/{create-dataset-2MC4SD4O.js → create-dataset-54FJCX45.js} +4 -4
- package/dist/{create-dataset-LUP5PVDM.js → create-dataset-ONX3RADL.js} +4 -4
- package/dist/{create-dataset-records-W4GLN2FV.js → create-dataset-records-HPLMFDJY.js} +4 -4
- package/dist/{create-dataset-records-NSKBZP3G.js → create-dataset-records-QZZZF64Z.js} +4 -4
- package/dist/{create-evaluator-HMTYO5SS.js → create-evaluator-I5I52HOQ.js} +4 -4
- package/dist/{create-evaluator-643G6LXL.js → create-evaluator-L66QGSDX.js} +4 -4
- package/dist/create-mcp-server.cjs +851 -597
- package/dist/create-mcp-server.js +523 -392
- package/dist/{create-project-6N7PIYRY.js → create-project-UPZGETN5.js} +4 -4
- package/dist/{create-project-KAIC46UY.js → create-project-Y5EGJKDG.js} +4 -4
- package/dist/{create-prompt-PKJ7EDRR.js → create-prompt-RNUJOL25.js} +3 -3
- package/dist/{create-prompt-E67LXIYT.js → create-prompt-WGQLJASD.js} +3 -3
- package/dist/{create-prompt-tag-OPQUEXWB.js → create-prompt-tag-3ZCA7M7O.js} +3 -3
- package/dist/{create-prompt-tag-4YO3FSJ3.js → create-prompt-tag-R6KIAZTB.js} +3 -3
- package/dist/{create-scenario-UEM77OE7.js → create-scenario-WIMKZLQO.js} +4 -4
- package/dist/{create-scenario-5PJBMAXO.js → create-scenario-WO5NWXVQ.js} +4 -4
- package/dist/{create-test-suite-4IPXVSFQ.js → create-test-suite-AVSR7IIM.js} +4 -4
- package/dist/{create-test-suite-SZEPVXSE.js → create-test-suite-LRKCNIJA.js} +4 -4
- package/dist/{create-trigger-5HZSCRAN.js → create-trigger-CBO2XDYC.js} +4 -4
- package/dist/{create-trigger-PRELMT6J.js → create-trigger-M3VFK5UH.js} +4 -4
- package/dist/dashboards-4X6QUT3E.js +90 -0
- package/dist/dashboards-CX2T6RKH.js +91 -0
- package/dist/{delete-agent-QMEK3XHK.js → delete-agent-QUVDMSOC.js} +4 -4
- package/dist/{delete-agent-JUIZWAXG.js → delete-agent-Y4QTEQ3B.js} +4 -4
- package/dist/delete-analytics-report-T4GIMEOA.js +18 -0
- package/dist/delete-analytics-report-WIP24EXV.js +19 -0
- package/dist/{delete-annotation-VKIQWUYW.js → delete-annotation-BWO5ZEZY.js} +4 -4
- package/dist/{delete-annotation-HY3O2OGR.js → delete-annotation-ESUH3RWN.js} +4 -4
- package/dist/{delete-dataset-WKRUW4FP.js → delete-dataset-N4AEYIAA.js} +4 -4
- package/dist/{delete-dataset-HQCR66MG.js → delete-dataset-ZRD23FLO.js} +4 -4
- package/dist/{delete-dataset-records-SDUHQLLM.js → delete-dataset-records-HC7VLBT7.js} +4 -4
- package/dist/{delete-dataset-records-C2IQFFVQ.js → delete-dataset-records-XC2DFVXD.js} +4 -4
- package/dist/{delete-evaluator-QP3QHTLN.js → delete-evaluator-27P5XLNV.js} +4 -4
- package/dist/{delete-evaluator-4SNSCLEE.js → delete-evaluator-LJII4YLC.js} +4 -4
- package/dist/{delete-prompt-tag-YYQ4VMAD.js → delete-prompt-tag-DH7IQO4X.js} +3 -3
- package/dist/{delete-prompt-tag-NZ4JQMYG.js → delete-prompt-tag-OC57CN32.js} +3 -3
- package/dist/{delete-workflow-5J46T73T.js → delete-workflow-I4IXK3ZL.js} +4 -4
- package/dist/{delete-workflow-JSWABL5F.js → delete-workflow-JXREDDW7.js} +4 -4
- package/dist/{discover-schema-A33SLMXW.js → discover-schema-ME5BAD2S.js} +4 -4
- package/dist/{discover-schema-55YJBFGQ.js → discover-schema-OHYBG3CY.js} +4 -4
- package/dist/{get-agent-LJQX7OF4.js → get-agent-6GKIKKL7.js} +4 -4
- package/dist/{get-agent-OTIYUFZA.js → get-agent-UKZUBVPB.js} +4 -4
- package/dist/{get-analytics-IQZKJHLW.js → get-analytics-TI2U3JLA.js} +3 -3
- package/dist/{get-analytics-DCS72353.js → get-analytics-ZGQ4LY3I.js} +3 -3
- package/dist/get-analytics-report-PD6XZ4ZA.js +29 -0
- package/dist/get-analytics-report-QMXNQ7VA.js +30 -0
- package/dist/{get-dataset-ALSP7RTX.js → get-dataset-5QORNVOZ.js} +4 -4
- package/dist/{get-dataset-X4B5JDG2.js → get-dataset-E5WLIPNK.js} +4 -4
- package/dist/{get-evaluator-XEUZGZCH.js → get-evaluator-GYQFB4F3.js} +4 -4
- package/dist/{get-evaluator-ISMC4LLI.js → get-evaluator-QQV65MQB.js} +4 -4
- package/dist/{get-project-5VKROSDH.js → get-project-43SGQCAT.js} +4 -4
- package/dist/{get-project-RM6FRCBK.js → get-project-W5DCKXZP.js} +4 -4
- package/dist/{get-prompt-OWXJZHQQ.js → get-prompt-IUTPSRRI.js} +3 -3
- package/dist/{get-prompt-W52DY36E.js → get-prompt-ZTCWGYJV.js} +3 -3
- package/dist/{get-run-plan-BE3M2AUX.js → get-run-plan-M3LVXMGO.js} +4 -4
- package/dist/{get-run-plan-RUXQ6PAX.js → get-run-plan-MEPEU353.js} +4 -4
- package/dist/{get-scenario-RNM7BAX2.js → get-scenario-2DM4XR44.js} +4 -4
- package/dist/{get-scenario-YM4ODWW6.js → get-scenario-D6EPSSPW.js} +4 -4
- package/dist/{get-simulation-run-6GIATQE5.js → get-simulation-run-53WM2XOO.js} +4 -4
- package/dist/{get-simulation-run-LCFSMPGQ.js → get-simulation-run-RKQ52TKP.js} +4 -4
- package/dist/{get-test-suite-P5LJ6VLF.js → get-test-suite-DP2HNOQZ.js} +4 -4
- package/dist/{get-test-suite-GC2O7YH6.js → get-test-suite-MUSY2CDJ.js} +4 -4
- package/dist/{get-trace-SEF3FMR5.js → get-trace-5Z2BIZ3V.js} +3 -3
- package/dist/{get-trace-KBRVV4NN.js → get-trace-THPWSLD3.js} +3 -3
- package/dist/{get-workflow-YXULW4GC.js → get-workflow-63E7BNLY.js} +4 -4
- package/dist/{get-workflow-7PVED7JE.js → get-workflow-R6XUKTZ7.js} +4 -4
- package/dist/{http-server-IR4QOS43.js → http-server-4JHSQN56.js} +245 -45
- package/dist/index.js +1847 -899
- package/dist/langwatch-api-analytics-reports-IIHGTTQA.js +17 -0
- package/dist/langwatch-api-analytics-reports-IQ6CHM5Y.js +18 -0
- package/dist/{langwatch-api-annotations-TBHLCQ5R.js → langwatch-api-annotations-CN2KYV3Z.js} +4 -4
- package/dist/{langwatch-api-annotations-6SA4OB4C.js → langwatch-api-annotations-CRI6JTQR.js} +4 -4
- package/dist/{langwatch-api-monitors-CBF3FGIM.js → langwatch-api-monitors-66O5Z5LB.js} +3 -3
- package/dist/{langwatch-api-monitors-YNWA2M5Y.js → langwatch-api-monitors-GNHQRPMR.js} +3 -3
- package/dist/{langwatch-api-secrets-RNFO4LF2.js → langwatch-api-secrets-B7BURV76.js} +3 -3
- package/dist/{langwatch-api-secrets-ADTOJELP.js → langwatch-api-secrets-P6SHZOHE.js} +3 -3
- package/dist/{langwatch-api-triggers-KQDQC6L5.js → langwatch-api-triggers-6FR4VWDL.js} +4 -4
- package/dist/{langwatch-api-triggers-QS7HDIVW.js → langwatch-api-triggers-VKNGXSJH.js} +4 -4
- package/dist/langwatch-api-workflows-22RQFYO7.js +15 -0
- package/dist/{langwatch-api-workflows-OKC4FXIF.js → langwatch-api-workflows-KDACD36L.js} +4 -4
- package/dist/{list-agents-RBAOCF53.js → list-agents-SVXWLLO7.js} +4 -4
- package/dist/{list-agents-HVYWEQMI.js → list-agents-XM5JNCVK.js} +4 -4
- package/dist/list-analytics-reports-DEKKC6BU.js +32 -0
- package/dist/list-analytics-reports-E7QFC22G.js +33 -0
- package/dist/{list-annotations-J4UAHSUN.js → list-annotations-5CGNOIKI.js} +4 -4
- package/dist/{list-annotations-HJH4NBLD.js → list-annotations-P26ELIAO.js} +4 -4
- package/dist/{list-api-keys-A2PMV435.js → list-api-keys-B4YL7STE.js} +4 -4
- package/dist/{list-api-keys-7UTJRZDG.js → list-api-keys-ZIJJH755.js} +4 -4
- package/dist/list-dashboards-F4YJPDKD.js +29 -0
- package/dist/list-dashboards-XHYTXEQK.js +30 -0
- package/dist/{list-dataset-records-WFM7F33C.js → list-dataset-records-SWCEDRPX.js} +4 -4
- package/dist/{list-dataset-records-M5TKA6LK.js → list-dataset-records-YWGROVKC.js} +4 -4
- package/dist/{list-datasets-B5X4P7BQ.js → list-datasets-32SCF66H.js} +4 -4
- package/dist/{list-datasets-THUKQHPX.js → list-datasets-YYADWT4D.js} +4 -4
- package/dist/{list-evaluators-MYH2OVCI.js → list-evaluators-KKQKBJKN.js} +4 -4
- package/dist/{list-evaluators-NLVWF6K7.js → list-evaluators-V6LP6ZQA.js} +4 -4
- package/dist/{list-model-providers-3JUGP4YI.js → list-model-providers-RCPVT7R4.js} +4 -4
- package/dist/{list-model-providers-H3XKORFO.js → list-model-providers-TMBSB6EE.js} +4 -4
- package/dist/{list-projects-YNNSRMLC.js → list-projects-4Y74TFDZ.js} +4 -4
- package/dist/{list-projects-6EJ5YYEW.js → list-projects-R4MTRF3C.js} +4 -4
- package/dist/{list-prompt-tags-NVFQO6WX.js → list-prompt-tags-C345AGM2.js} +3 -3
- package/dist/{list-prompt-tags-XUQTTAH4.js → list-prompt-tags-RITKQDC5.js} +3 -3
- package/dist/{list-prompts-IRI6AIXO.js → list-prompts-DSJ2LUSU.js} +3 -3
- package/dist/{list-prompts-HSIMMHTF.js → list-prompts-F7C5L5XK.js} +3 -3
- package/dist/{list-run-plans-PX2XI6EK.js → list-run-plans-YPGLC5QG.js} +4 -4
- package/dist/{list-run-plans-QALLCN2K.js → list-run-plans-ZHRZHCDL.js} +4 -4
- package/dist/{list-scenarios-SSJQEMJP.js → list-scenarios-6HN72TMW.js} +4 -4
- package/dist/{list-scenarios-QZRPVHS4.js → list-scenarios-HCYFOTSL.js} +4 -4
- package/dist/{list-simulation-runs-OEADLLQR.js → list-simulation-runs-BKVMQQMT.js} +4 -4
- package/dist/{list-simulation-runs-KNOLGMDV.js → list-simulation-runs-JNST5PQU.js} +4 -4
- package/dist/{list-test-suites-N4WVLBKK.js → list-test-suites-4ZVYYKVB.js} +4 -4
- package/dist/{list-test-suites-ANAQBLDG.js → list-test-suites-YY4J3L7H.js} +4 -4
- package/dist/{list-trigger-fires-WTW4DVIW.js → list-trigger-fires-3XM6YZWG.js} +4 -4
- package/dist/{list-trigger-fires-JV3WFYYG.js → list-trigger-fires-5C5XM2KQ.js} +4 -4
- package/dist/{list-triggers-V4Y356AK.js → list-triggers-DARBIIRA.js} +4 -4
- package/dist/{list-triggers-SQNIG35Q.js → list-triggers-MRSWN7RR.js} +4 -4
- package/dist/{list-workflows-ZHTX5LCL.js → list-workflows-BGUSQUJX.js} +4 -4
- package/dist/{list-workflows-IMSX7SXU.js → list-workflows-NXOWP3XS.js} +4 -4
- package/dist/{rename-prompt-tag-IQI7MHOI.js → rename-prompt-tag-F3WT4FB4.js} +3 -3
- package/dist/{rename-prompt-tag-PA2BRIE6.js → rename-prompt-tag-HR5HZZI2.js} +3 -3
- package/dist/{rename-test-suite-NNVLMLKY.js → rename-test-suite-2ZRXG5O7.js} +4 -4
- package/dist/{rename-test-suite-4J7UX5S2.js → rename-test-suite-PWXKE7Z4.js} +4 -4
- package/dist/{report-issue-AS34ZMJF.js → report-issue-HG7XCPOY.js} +28 -2
- package/dist/{report-issue-DCZFLGDO.js → report-issue-TWRFUPGB.js} +28 -2
- package/dist/{rerun-run-plan-TG2V4WM4.js → rerun-run-plan-BFRZFEJB.js} +4 -4
- package/dist/{rerun-run-plan-ZI5OY3VA.js → rerun-run-plan-LXM3RFZC.js} +4 -4
- package/dist/{revoke-api-key-3J3ZA4UB.js → revoke-api-key-GR55PUP4.js} +4 -4
- package/dist/{revoke-api-key-SFMEFWJC.js → revoke-api-key-KCDOYPUK.js} +4 -4
- package/dist/{run-agent-YNV6ZHW4.js → run-agent-HRVRHRHI.js} +4 -4
- package/dist/{run-agent-W4VJP72Z.js → run-agent-WS6TADJQ.js} +4 -4
- package/dist/{run-plan-6C77GWG4.js → run-plan-G24DBB5D.js} +4 -4
- package/dist/{run-plan-PAARQSI4.js → run-plan-NSXMBEC5.js} +4 -4
- package/dist/{run-query-T4QW2Z5O.js → run-query-6YVOA5NV.js} +19 -5
- package/dist/{run-query-KJDH544C.js → run-query-7QIYSDVI.js} +19 -5
- package/dist/{run-test-suite-STB6NUJM.js → run-test-suite-NTKLJZCJ.js} +4 -4
- package/dist/{run-test-suite-SQJELEZX.js → run-test-suite-P33XFQ6H.js} +4 -4
- package/dist/{run-workflow-D6PQNBI6.js → run-workflow-E5ZRSXUB.js} +4 -4
- package/dist/{run-workflow-SP32SO5M.js → run-workflow-HDF6CRLM.js} +4 -4
- package/dist/{search-traces-HCBGOG6R.js → search-traces-X7NSRTTP.js} +3 -3
- package/dist/{search-traces-HSTQ6WTQ.js → search-traces-XWZYOZOM.js} +3 -3
- package/dist/{set-model-provider-GF7NXUJA.js → set-model-provider-XJF47L6H.js} +4 -4
- package/dist/{set-model-provider-KDQ7C4EZ.js → set-model-provider-YPUCFEXG.js} +4 -4
- package/dist/{update-agent-MXNOBS4H.js → update-agent-6FHGWOO7.js} +4 -4
- package/dist/{update-agent-DWG43T2P.js → update-agent-VEDXQRSM.js} +4 -4
- package/dist/update-dashboard-widget-VOKXN7JA.js +64 -0
- package/dist/update-dashboard-widget-VUIQZ7F5.js +63 -0
- package/dist/{update-dataset-SQZ6T4WX.js → update-dataset-7AQ24NRS.js} +4 -4
- package/dist/{update-dataset-DQH3OHOU.js → update-dataset-GHKDCJJQ.js} +4 -4
- package/dist/{update-dataset-record-3AT4IPBC.js → update-dataset-record-IRD6FH2C.js} +4 -4
- package/dist/{update-dataset-record-7PLDGTMR.js → update-dataset-record-ZZUPG7AS.js} +4 -4
- package/dist/{update-evaluator-4LFTKFPT.js → update-evaluator-O6EJFTQJ.js} +4 -4
- package/dist/{update-evaluator-IGTX6PX4.js → update-evaluator-PUJFU5LT.js} +4 -4
- package/dist/{update-project-PLJIOZS6.js → update-project-HO53IHXC.js} +4 -4
- package/dist/{update-project-QVHSJRUP.js → update-project-VTVU6KNP.js} +4 -4
- package/dist/{update-prompt-GDKRYJI3.js → update-prompt-FABVQCAC.js} +3 -3
- package/dist/{update-prompt-MY263DYF.js → update-prompt-MNRLCLBA.js} +3 -3
- package/dist/{update-scenario-MOHRQKAQ.js → update-scenario-MQZZM5CP.js} +4 -4
- package/dist/{update-scenario-7KA3JDXA.js → update-scenario-XIZNUH4I.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 +165 -41
- package/src/langwatch-api-analytics-reports.ts +62 -0
- package/src/langwatch-api-dashboard-widgets.ts +4 -68
- package/src/langwatch-api-dashboards.ts +110 -28
- package/src/langwatch-api-projects.ts +0 -17
- package/src/langwatch-api-query.ts +6 -0
- package/src/langwatch-api.ts +60 -27
- package/src/schemas/widget-sources.ts +69 -0
- package/src/tools/add-dashboard-widget.ts +23 -32
- package/src/tools/create-analytics-report.ts +7 -0
- package/src/tools/dashboard-widget-queries.ts +22 -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/run-query.ts +23 -1
- package/src/tools/update-dashboard-widget.ts +32 -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
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
} from "./chunk-XUIJYNRJ.js";
|
|
4
4
|
import {
|
|
5
5
|
updateScenario
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-BHCYKMRH.js";
|
|
7
|
+
import "./chunk-7MNQDTKJ.js";
|
|
8
|
+
import "./chunk-DULFP3MK.js";
|
|
9
9
|
import "./chunk-SAS5OB7F.js";
|
|
10
10
|
|
|
11
11
|
// src/tools/update-scenario.ts
|
|
@@ -32,4 +32,4 @@ async function handleUpdateScenario(params) {
|
|
|
32
32
|
export {
|
|
33
33
|
handleUpdateScenario
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=update-scenario-
|
|
35
|
+
//# sourceMappingURL=update-scenario-MQZZM5CP.js.map
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
} from "./chunk-XUIJYNRJ.js";
|
|
4
4
|
import {
|
|
5
5
|
updateScenario
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-BHCYKMRH.js";
|
|
7
|
+
import "./chunk-7MNQDTKJ.js";
|
|
8
|
+
import "./chunk-DULFP3MK.js";
|
|
9
9
|
|
|
10
10
|
// src/tools/update-scenario.ts
|
|
11
11
|
async function handleUpdateScenario(params) {
|
|
@@ -31,4 +31,4 @@ async function handleUpdateScenario(params) {
|
|
|
31
31
|
export {
|
|
32
32
|
handleUpdateScenario
|
|
33
33
|
};
|
|
34
|
-
//# sourceMappingURL=update-scenario-
|
|
34
|
+
//# sourceMappingURL=update-scenario-XIZNUH4I.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langwatch/mcp-server",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "An MCP server for Langwatch.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@langwatch/evaluator-contract": "0.1.0",
|
|
38
|
-
"@modelcontextprotocol/sdk": "1.
|
|
38
|
+
"@modelcontextprotocol/sdk": "1.32.0",
|
|
39
39
|
"zod": "^4.6.7"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
package/pyproject.toml
CHANGED
|
@@ -7,21 +7,36 @@ requires-python = ">=3.11"
|
|
|
7
7
|
dependencies = [
|
|
8
8
|
"ipykernel>=7.3.0",
|
|
9
9
|
"langwatch",
|
|
10
|
-
"litellm>=1.
|
|
11
|
-
"mcp[cli]>=2.
|
|
10
|
+
"litellm>=1.100.4", # security: litellm advisories up to GHSA-7hp6-4w63-5g45, fixed in 1.100.4
|
|
11
|
+
"mcp[cli]>=2.2.0", # security: MCP SDK unbounded StreamableHTTP sessions, fixed in 2.2.0 (#2823)
|
|
12
12
|
"pandas>=2.3.2",
|
|
13
13
|
"tenacity>=9.1.4",
|
|
14
14
|
]
|
|
15
15
|
|
|
16
16
|
[tool.uv]
|
|
17
|
+
# exclude-newer-package below needs uv 0.9.25+ (dev/docs/best_practices/dependency-age-gates.md).
|
|
18
|
+
required-version = ">=0.9.25"
|
|
17
19
|
exclude-newer = "7 days"
|
|
18
20
|
|
|
21
|
+
# Security fix released inside the 7-day window above, admitted up to a fixed
|
|
22
|
+
# date so the rest of the tree keeps the cooldown. Drop it once the date is
|
|
23
|
+
# more than 7 days old (#8958).
|
|
24
|
+
exclude-newer-package = { certifi = "2026-10-21T00:00:00Z" }
|
|
25
|
+
|
|
19
26
|
# Transitive-dependency security pins. Keep these even when the importing
|
|
20
27
|
# package isn't a direct dependency, so a future re-resolution can't silently
|
|
21
28
|
# pull a vulnerable version back in.
|
|
22
29
|
constraint-dependencies = [
|
|
23
30
|
"python-dotenv>=1.2.2", # security: python-dotenv advisory (#934)
|
|
24
31
|
"python-liquid>=2.2.1", # security: python-liquid advisory (#1528)
|
|
32
|
+
"tornado>=6.5.9", # security: tornado advisories (#2159, #2173, #2233, #2665-#2667)
|
|
33
|
+
"anyio>=4.14.2", # security: anyio advisories (#2430, #2431)
|
|
34
|
+
"httpx2>=2.12.0", # security: httpx2 advisories (#2312, #2313, #2329)
|
|
35
|
+
"pyjwt>=2.15.0", # security: PyJWT advisories covering <=2.14.0 (#2479, #2615)
|
|
36
|
+
"urllib3>=2.8.0", # security: urllib3 advisories covering <2.8.0 (#2591, #2592, #2608)
|
|
37
|
+
"fsspec>=2026.6.0", # security: fsspec advisory covering <2026.6.0 (#2731)
|
|
38
|
+
"aiohttp>=3.14.4", # security: aiohttp advisories covering <=3.14.3, two HIGH (#2842-#2844)
|
|
39
|
+
"certifi>=2026.10.19", # security: certifi advisory covering <2026.10.19 (#2897)
|
|
25
40
|
]
|
|
26
41
|
|
|
27
42
|
[tool.uv.sources]
|
package/src/config.d.ts
CHANGED
package/src/config.ts
CHANGED
|
@@ -4,6 +4,8 @@ export interface McpConfig {
|
|
|
4
4
|
apiKey: string | undefined;
|
|
5
5
|
endpoint: string;
|
|
6
6
|
projectId?: string;
|
|
7
|
+
/** Set by the hosted MCP server, so the platform tells its calls from a local server's. */
|
|
8
|
+
hosted?: boolean;
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
// Store on globalThis to share config between CJS and ESM module instances.
|
package/src/create-mcp-server.ts
CHANGED
|
@@ -28,6 +28,11 @@ import {
|
|
|
28
28
|
triggerActionSchema,
|
|
29
29
|
validateActionParamsForAction,
|
|
30
30
|
} from "./schemas/triggers.ts";
|
|
31
|
+
import {
|
|
32
|
+
runQueryProjectsInput,
|
|
33
|
+
widgetProjectsInput,
|
|
34
|
+
widgetSourcesInput,
|
|
35
|
+
} from "./schemas/widget-sources.ts";
|
|
31
36
|
import { handleExperimentResults } from "./tools/get-experiment-results.ts";
|
|
32
37
|
import { handleExperimentListRuns } from "./tools/list-experiment-runs.ts";
|
|
33
38
|
import { handleExperimentList } from "./tools/list-experiments.ts";
|
|
@@ -38,7 +43,7 @@ import { handleUpdateTestSuite } from "./tools/update-test-suite.ts";
|
|
|
38
43
|
const modelSchema = z
|
|
39
44
|
.string()
|
|
40
45
|
.describe(
|
|
41
|
-
'Model in "provider/model-name" format, e.g., "openai/gpt-
|
|
46
|
+
'Model in "provider/model-name" format, e.g., "openai/gpt-6-luna", "anthropic/claude-sonnet-4-5-20250929"',
|
|
42
47
|
);
|
|
43
48
|
|
|
44
49
|
/**
|
|
@@ -91,6 +96,7 @@ function registerTools(server: McpServer): void {
|
|
|
91
96
|
registerEvaluatorTools(server);
|
|
92
97
|
registerModelProviderTools(server);
|
|
93
98
|
registerAgentTools(server);
|
|
99
|
+
registerAnalyticsReportTools(server);
|
|
94
100
|
registerDashboardTools(server);
|
|
95
101
|
registerWorkflowTools(server);
|
|
96
102
|
registerAnnotationTools(server);
|
|
@@ -246,6 +252,17 @@ function registerObservabilityTools(server: McpServer): void {
|
|
|
246
252
|
.describe(
|
|
247
253
|
'Values for the parameters the statement declares, e.g. {"days": 7} for {days:UInt32}',
|
|
248
254
|
),
|
|
255
|
+
projects: runQueryProjectsInput
|
|
256
|
+
.optional()
|
|
257
|
+
.describe(
|
|
258
|
+
'The project ids to read, or the string "all" for every project the key can read (params.dashboard_context_projects lists them). A key that reaches several projects must name them or send "all"; a key that reads one project defaults to it',
|
|
259
|
+
),
|
|
260
|
+
sources: z
|
|
261
|
+
.array(z.string())
|
|
262
|
+
.optional()
|
|
263
|
+
.describe(
|
|
264
|
+
"The trace sources {dashboard_context_sources:Array(String)} is bound to (default application). Only a statement that reads that parameter is kept to them; a SOURCES_IGNORED diagnostic says it did not",
|
|
265
|
+
),
|
|
249
266
|
},
|
|
250
267
|
withToolLogging("run_query", async (params) => {
|
|
251
268
|
requireApiKey();
|
|
@@ -1321,97 +1338,110 @@ function registerAgentTools(server: McpServer): void {
|
|
|
1321
1338
|
);
|
|
1322
1339
|
}
|
|
1323
1340
|
|
|
1324
|
-
// --- Platform
|
|
1325
|
-
function
|
|
1341
|
+
// --- Platform Analytics Report Tools (require API key) ---
|
|
1342
|
+
function registerAnalyticsReportTools(server: McpServer): void {
|
|
1326
1343
|
server.tool(
|
|
1327
|
-
"
|
|
1328
|
-
"List
|
|
1344
|
+
"platform_list_analytics_reports",
|
|
1345
|
+
"List the Analytics Reports in the LangWatch project (/api/v1/analytics/reports). Dashboards, which hold widgets, are listed by list_dashboards.",
|
|
1329
1346
|
{},
|
|
1330
|
-
withToolLogging("
|
|
1347
|
+
withToolLogging("platform_list_analytics_reports", async () => {
|
|
1331
1348
|
requireApiKey();
|
|
1332
|
-
const {
|
|
1349
|
+
const { handleListAnalyticsReports } = await import("./tools/list-analytics-reports.ts");
|
|
1333
1350
|
return {
|
|
1334
|
-
content: [{ type: "text", text: await
|
|
1351
|
+
content: [{ type: "text", text: await handleListAnalyticsReports() }],
|
|
1335
1352
|
};
|
|
1336
1353
|
}),
|
|
1337
1354
|
);
|
|
1338
1355
|
|
|
1339
1356
|
server.tool(
|
|
1340
|
-
"
|
|
1341
|
-
"Get
|
|
1357
|
+
"platform_get_analytics_report",
|
|
1358
|
+
"Get an Analytics Report by its ID, including its graphs. A Dashboards dashboard's ID is not found here; read it with get_dashboard.",
|
|
1342
1359
|
{
|
|
1343
|
-
|
|
1360
|
+
reportId: z.string().describe("The Analytics Report ID"),
|
|
1344
1361
|
},
|
|
1345
|
-
withToolLogging("
|
|
1362
|
+
withToolLogging("platform_get_analytics_report", async (params) => {
|
|
1346
1363
|
requireApiKey();
|
|
1347
|
-
const {
|
|
1364
|
+
const { handleGetAnalyticsReport } = await import("./tools/get-analytics-report.ts");
|
|
1348
1365
|
return {
|
|
1349
|
-
content: [{ type: "text", text: await
|
|
1366
|
+
content: [{ type: "text", text: await handleGetAnalyticsReport(params) }],
|
|
1350
1367
|
};
|
|
1351
1368
|
}),
|
|
1352
1369
|
);
|
|
1353
1370
|
|
|
1354
1371
|
server.tool(
|
|
1355
|
-
"
|
|
1356
|
-
"Create a new
|
|
1372
|
+
"platform_create_analytics_report",
|
|
1373
|
+
"Create a new Analytics Report.",
|
|
1357
1374
|
{
|
|
1358
|
-
name: z.string().describe("
|
|
1375
|
+
name: z.string().describe("Analytics Report name"),
|
|
1359
1376
|
},
|
|
1360
|
-
withToolLogging("
|
|
1377
|
+
withToolLogging("platform_create_analytics_report", async (params) => {
|
|
1361
1378
|
requireApiKey();
|
|
1362
|
-
const {
|
|
1379
|
+
const { handleCreateAnalyticsReport } = await import("./tools/create-analytics-report.ts");
|
|
1363
1380
|
return {
|
|
1364
|
-
content: [
|
|
1381
|
+
content: [
|
|
1382
|
+
{
|
|
1383
|
+
type: "text",
|
|
1384
|
+
text: await handleCreateAnalyticsReport(params),
|
|
1385
|
+
},
|
|
1386
|
+
],
|
|
1365
1387
|
};
|
|
1366
1388
|
}),
|
|
1367
1389
|
);
|
|
1368
1390
|
|
|
1369
1391
|
server.tool(
|
|
1370
|
-
"
|
|
1371
|
-
"Delete
|
|
1392
|
+
"platform_delete_analytics_report",
|
|
1393
|
+
"Delete an Analytics Report and all its graphs.",
|
|
1372
1394
|
{
|
|
1373
|
-
|
|
1395
|
+
reportId: z.string().describe("The Analytics Report ID to delete"),
|
|
1374
1396
|
},
|
|
1375
|
-
withToolLogging("
|
|
1397
|
+
withToolLogging("platform_delete_analytics_report", async (params) => {
|
|
1376
1398
|
requireApiKey();
|
|
1377
|
-
const {
|
|
1399
|
+
const { handleDeleteAnalyticsReport } = await import("./tools/delete-analytics-report.ts");
|
|
1378
1400
|
return {
|
|
1379
|
-
content: [
|
|
1401
|
+
content: [
|
|
1402
|
+
{
|
|
1403
|
+
type: "text",
|
|
1404
|
+
text: await handleDeleteAnalyticsReport(params),
|
|
1405
|
+
},
|
|
1406
|
+
],
|
|
1380
1407
|
};
|
|
1381
1408
|
}),
|
|
1382
1409
|
);
|
|
1383
1410
|
|
|
1384
1411
|
server.tool(
|
|
1385
|
-
"
|
|
1386
|
-
"Rename
|
|
1412
|
+
"platform_rename_analytics_report",
|
|
1413
|
+
"Rename an Analytics Report.",
|
|
1387
1414
|
{
|
|
1388
|
-
|
|
1389
|
-
name: z.string().describe("The new name for the
|
|
1415
|
+
reportId: z.string().describe("The Analytics Report ID to rename"),
|
|
1416
|
+
name: z.string().describe("The new name for the Analytics Report"),
|
|
1390
1417
|
},
|
|
1391
|
-
withToolLogging("
|
|
1418
|
+
withToolLogging("platform_rename_analytics_report", async (params) => {
|
|
1392
1419
|
requireApiKey();
|
|
1393
|
-
const {
|
|
1394
|
-
const result = await
|
|
1420
|
+
const { renameAnalyticsReport } = await import("./langwatch-api-analytics-reports.ts");
|
|
1421
|
+
const result = await renameAnalyticsReport({ reportId: params.reportId, name: params.name });
|
|
1395
1422
|
return {
|
|
1396
1423
|
content: [
|
|
1397
1424
|
{
|
|
1398
1425
|
type: "text",
|
|
1399
|
-
text: `
|
|
1426
|
+
text: `Analytics Report "${result.name}" renamed successfully (ID: ${result.id}).`,
|
|
1400
1427
|
},
|
|
1401
1428
|
],
|
|
1402
1429
|
};
|
|
1403
1430
|
}),
|
|
1404
1431
|
);
|
|
1432
|
+
}
|
|
1405
1433
|
|
|
1434
|
+
// --- Dashboard Tools (require API key) ---
|
|
1435
|
+
function registerDashboardTools(server: McpServer): void {
|
|
1406
1436
|
server.tool(
|
|
1407
|
-
"
|
|
1408
|
-
"Lists the project's
|
|
1437
|
+
"list_dashboards",
|
|
1438
|
+
"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.",
|
|
1409
1439
|
{},
|
|
1410
|
-
withToolLogging("
|
|
1440
|
+
withToolLogging("list_dashboards", async () => {
|
|
1411
1441
|
requireApiKey();
|
|
1412
|
-
const {
|
|
1442
|
+
const { handleListDashboards } = await import("./tools/list-dashboards.js");
|
|
1413
1443
|
return {
|
|
1414
|
-
content: [{ type: "text", text: await
|
|
1444
|
+
content: [{ type: "text", text: await handleListDashboards() }],
|
|
1415
1445
|
};
|
|
1416
1446
|
}),
|
|
1417
1447
|
);
|
|
@@ -1422,7 +1452,7 @@ function registerDashboardTools(server: McpServer): void {
|
|
|
1422
1452
|
{
|
|
1423
1453
|
dashboardId: z
|
|
1424
1454
|
.string()
|
|
1425
|
-
.describe("The
|
|
1455
|
+
.describe("The dashboard to add the widget to, as list_dashboards lists it"),
|
|
1426
1456
|
name: z.string().describe("The widget's display name"),
|
|
1427
1457
|
code: z
|
|
1428
1458
|
.string()
|
|
@@ -1444,6 +1474,8 @@ function registerDashboardTools(server: McpServer): void {
|
|
|
1444
1474
|
.describe(
|
|
1445
1475
|
"The widget's named LangWatchQL queries: either {name: sql} or an array of {name, sql}. Max 8. Validate each statement with run_query first.",
|
|
1446
1476
|
),
|
|
1477
|
+
sources: widgetSourcesInput,
|
|
1478
|
+
projects: widgetProjectsInput,
|
|
1447
1479
|
},
|
|
1448
1480
|
withToolLogging("add_dashboard_widget", async (params) => {
|
|
1449
1481
|
requireApiKey();
|
|
@@ -1456,7 +1488,7 @@ function registerDashboardTools(server: McpServer): void {
|
|
|
1456
1488
|
|
|
1457
1489
|
server.tool(
|
|
1458
1490
|
"update_dashboard_widget",
|
|
1459
|
-
"Changes one custom widget on a dashboard: its name, its TSX `code`, its named LangWatchQL `queries` or
|
|
1491
|
+
"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.",
|
|
1460
1492
|
{
|
|
1461
1493
|
dashboardId: z.string().describe("The dashboard the widget is on"),
|
|
1462
1494
|
widgetId: z.string().describe("The widget to change, as add_dashboard_widget returned it"),
|
|
@@ -1487,6 +1519,8 @@ function registerDashboardTools(server: McpServer): void {
|
|
|
1487
1519
|
.string()
|
|
1488
1520
|
.optional()
|
|
1489
1521
|
.describe("What the widget's info tip says: a sentence or two"),
|
|
1522
|
+
sources: widgetSourcesInput,
|
|
1523
|
+
projects: widgetProjectsInput,
|
|
1490
1524
|
},
|
|
1491
1525
|
withToolLogging("update_dashboard_widget", async (params) => {
|
|
1492
1526
|
requireApiKey();
|
|
@@ -1496,6 +1530,87 @@ function registerDashboardTools(server: McpServer): void {
|
|
|
1496
1530
|
};
|
|
1497
1531
|
}),
|
|
1498
1532
|
);
|
|
1533
|
+
|
|
1534
|
+
registerDashboardCrudTools(server);
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
/** Dashboard CRUD and a dashboard's widgets, over `/api/v1/dashboards`. */
|
|
1538
|
+
function registerDashboardCrudTools(server: McpServer): void {
|
|
1539
|
+
const dashboardId = z.string().describe("The dashboard's ID, as list_dashboards lists it");
|
|
1540
|
+
const text = (value: string) => ({ content: [{ type: "text" as const, text: value }] });
|
|
1541
|
+
|
|
1542
|
+
server.tool(
|
|
1543
|
+
"get_dashboard",
|
|
1544
|
+
"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.",
|
|
1545
|
+
{ dashboardId },
|
|
1546
|
+
withToolLogging("get_dashboard", async (params) => {
|
|
1547
|
+
requireApiKey();
|
|
1548
|
+
const { handleGetDashboard } = await import("./tools/dashboards.js");
|
|
1549
|
+
return text(await handleGetDashboard(params));
|
|
1550
|
+
}),
|
|
1551
|
+
);
|
|
1552
|
+
|
|
1553
|
+
server.tool(
|
|
1554
|
+
"create_dashboard",
|
|
1555
|
+
"Creates an empty dashboard in the Dashboards area. Add widgets to it with add_dashboard_widget.",
|
|
1556
|
+
{ name: z.string().describe("The dashboard's name") },
|
|
1557
|
+
withToolLogging("create_dashboard", async (params) => {
|
|
1558
|
+
requireApiKey();
|
|
1559
|
+
const { handleCreateDashboard } = await import("./tools/dashboards.js");
|
|
1560
|
+
return text(await handleCreateDashboard(params));
|
|
1561
|
+
}),
|
|
1562
|
+
);
|
|
1563
|
+
|
|
1564
|
+
server.tool(
|
|
1565
|
+
"rename_dashboard",
|
|
1566
|
+
"Changes a dashboard's name and/or description; a field left out keeps its value.",
|
|
1567
|
+
{
|
|
1568
|
+
dashboardId,
|
|
1569
|
+
name: z.string().optional().describe("The dashboard's new name"),
|
|
1570
|
+
description: z.string().optional().describe("The dashboard's new description"),
|
|
1571
|
+
},
|
|
1572
|
+
withToolLogging("rename_dashboard", async (params) => {
|
|
1573
|
+
requireApiKey();
|
|
1574
|
+
const { handleRenameDashboard } = await import("./tools/dashboards.js");
|
|
1575
|
+
return text(await handleRenameDashboard(params));
|
|
1576
|
+
}),
|
|
1577
|
+
);
|
|
1578
|
+
|
|
1579
|
+
server.tool(
|
|
1580
|
+
"delete_dashboard",
|
|
1581
|
+
"Deletes a dashboard together with the widgets on it. This cannot be undone.",
|
|
1582
|
+
{ dashboardId },
|
|
1583
|
+
withToolLogging("delete_dashboard", async (params) => {
|
|
1584
|
+
requireApiKey();
|
|
1585
|
+
const { handleDeleteDashboard } = await import("./tools/dashboards.js");
|
|
1586
|
+
return text(await handleDeleteDashboard(params));
|
|
1587
|
+
}),
|
|
1588
|
+
);
|
|
1589
|
+
|
|
1590
|
+
server.tool(
|
|
1591
|
+
"list_dashboard_widgets",
|
|
1592
|
+
"Lists the custom widgets on one dashboard, with each widget's ID and query names.",
|
|
1593
|
+
{ dashboardId },
|
|
1594
|
+
withToolLogging("list_dashboard_widgets", async (params) => {
|
|
1595
|
+
requireApiKey();
|
|
1596
|
+
const { handleListDashboardWidgets } = await import("./tools/dashboards.js");
|
|
1597
|
+
return text(await handleListDashboardWidgets(params));
|
|
1598
|
+
}),
|
|
1599
|
+
);
|
|
1600
|
+
|
|
1601
|
+
server.tool(
|
|
1602
|
+
"delete_dashboard_widget",
|
|
1603
|
+
"Deletes one custom widget from a dashboard. A widget on another dashboard is not found.",
|
|
1604
|
+
{
|
|
1605
|
+
dashboardId,
|
|
1606
|
+
widgetId: z.string().describe("The widget's ID, as list_dashboard_widgets lists it"),
|
|
1607
|
+
},
|
|
1608
|
+
withToolLogging("delete_dashboard_widget", async (params) => {
|
|
1609
|
+
requireApiKey();
|
|
1610
|
+
const { handleDeleteDashboardWidget } = await import("./tools/dashboards.js");
|
|
1611
|
+
return text(await handleDeleteDashboardWidget(params));
|
|
1612
|
+
}),
|
|
1613
|
+
);
|
|
1499
1614
|
}
|
|
1500
1615
|
|
|
1501
1616
|
// --- Platform Workflow Tools (require API key) ---
|
|
@@ -2026,6 +2141,15 @@ function registerExperimentTools(server: McpServer): void {
|
|
|
2026
2141
|
"Start an experiment run by slug. Returns a run ID for polling status.",
|
|
2027
2142
|
{
|
|
2028
2143
|
slug: z.string().describe("The experiment slug to run"),
|
|
2144
|
+
concurrency: z
|
|
2145
|
+
.number()
|
|
2146
|
+
.int()
|
|
2147
|
+
.min(1)
|
|
2148
|
+
.max(24)
|
|
2149
|
+
.optional()
|
|
2150
|
+
.describe(
|
|
2151
|
+
"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.",
|
|
2152
|
+
),
|
|
2029
2153
|
},
|
|
2030
2154
|
withToolLogging("platform_run_experiment", async (params) => {
|
|
2031
2155
|
requireApiKey();
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { makeRequest } from "./langwatch-api.ts";
|
|
2
|
+
|
|
3
|
+
/** An Analytics Report, at `/api/v1/analytics/reports`. Dashboards live at `/api/v1/dashboards`. */
|
|
4
|
+
export interface AnalyticsReportSummary {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
order: number;
|
|
8
|
+
graphCount: number;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
updatedAt: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface AnalyticsReportDetail extends AnalyticsReportSummary {
|
|
14
|
+
graphs: unknown[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface AnalyticsReportListResponse {
|
|
18
|
+
data: AnalyticsReportSummary[];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const reportPath = (reportId: string) =>
|
|
22
|
+
`/api/v1/analytics/reports/${encodeURIComponent(reportId)}`;
|
|
23
|
+
|
|
24
|
+
export async function listAnalyticsReports(): Promise<AnalyticsReportListResponse> {
|
|
25
|
+
return makeRequest("GET", "/api/v1/analytics/reports") as Promise<AnalyticsReportListResponse>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export async function getAnalyticsReport({
|
|
29
|
+
reportId,
|
|
30
|
+
}: {
|
|
31
|
+
reportId: string;
|
|
32
|
+
}): Promise<AnalyticsReportDetail> {
|
|
33
|
+
return makeRequest("GET", reportPath(reportId)) as Promise<AnalyticsReportDetail>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export async function createAnalyticsReport({
|
|
37
|
+
name,
|
|
38
|
+
}: {
|
|
39
|
+
name: string;
|
|
40
|
+
}): Promise<AnalyticsReportDetail> {
|
|
41
|
+
return makeRequest("POST", "/api/v1/analytics/reports", {
|
|
42
|
+
name,
|
|
43
|
+
}) as Promise<AnalyticsReportDetail>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export async function renameAnalyticsReport({
|
|
47
|
+
reportId,
|
|
48
|
+
name,
|
|
49
|
+
}: {
|
|
50
|
+
reportId: string;
|
|
51
|
+
name: string;
|
|
52
|
+
}): Promise<AnalyticsReportDetail> {
|
|
53
|
+
return makeRequest("PATCH", reportPath(reportId), { name }) as Promise<AnalyticsReportDetail>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export async function deleteAnalyticsReport({
|
|
57
|
+
reportId,
|
|
58
|
+
}: {
|
|
59
|
+
reportId: string;
|
|
60
|
+
}): Promise<{ id: string; name: string }> {
|
|
61
|
+
return makeRequest("DELETE", reportPath(reportId)) as Promise<{ id: string; name: string }>;
|
|
62
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { WidgetSource } from "./schemas/widget-sources.js";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* One named LangWatchQL statement a widget may run, as the REST endpoint validates it
|
|
@@ -12,6 +12,9 @@ export interface DashboardWidgetQueryInput {
|
|
|
12
12
|
type: "string" | "number" | "boolean";
|
|
13
13
|
default?: string | number | boolean;
|
|
14
14
|
}[];
|
|
15
|
+
/** The trace origins the query counts; `null` makes it unset, counting application. */
|
|
16
|
+
sources?: WidgetSource[] | null;
|
|
17
|
+
projects?: string[] | null;
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
/** Where a widget came from, as the platform records it. */
|
|
@@ -43,70 +46,3 @@ export interface DashboardWidget {
|
|
|
43
46
|
colSpan: number;
|
|
44
47
|
rowSpan: number;
|
|
45
48
|
}
|
|
46
|
-
|
|
47
|
-
/** Saves a new widget, unplaced (not yet on any dashboard). */
|
|
48
|
-
export async function createDashboardWidget(params: {
|
|
49
|
-
projectId: string;
|
|
50
|
-
name: string;
|
|
51
|
-
code: string;
|
|
52
|
-
queries: DashboardWidgetQueryInput[];
|
|
53
|
-
}): Promise<DashboardWidget> {
|
|
54
|
-
const { projectId, ...data } = params;
|
|
55
|
-
return makeRequest(
|
|
56
|
-
"POST",
|
|
57
|
-
`/api/v1/projects/${encodeURIComponent(projectId)}/analytics/dashboard-widgets`,
|
|
58
|
-
data,
|
|
59
|
-
) as Promise<DashboardWidget>;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/** Reads one widget; a widget in another project answers 404. */
|
|
63
|
-
export async function getDashboardWidget(params: {
|
|
64
|
-
projectId: string;
|
|
65
|
-
widgetId: string;
|
|
66
|
-
}): Promise<DashboardWidget> {
|
|
67
|
-
return makeRequest(
|
|
68
|
-
"GET",
|
|
69
|
-
`/api/v1/projects/${encodeURIComponent(params.projectId)}/analytics/dashboard-widgets/${encodeURIComponent(params.widgetId)}`,
|
|
70
|
-
) as Promise<DashboardWidget>;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/** Changes the fields given; every field left out keeps its stored value. */
|
|
74
|
-
export async function updateDashboardWidget(params: {
|
|
75
|
-
projectId: string;
|
|
76
|
-
widgetId: string;
|
|
77
|
-
name?: string;
|
|
78
|
-
code?: string;
|
|
79
|
-
queries?: DashboardWidgetQueryInput[];
|
|
80
|
-
description?: string;
|
|
81
|
-
}): Promise<DashboardWidget> {
|
|
82
|
-
const { projectId, widgetId, ...data } = params;
|
|
83
|
-
return makeRequest(
|
|
84
|
-
"PATCH",
|
|
85
|
-
`/api/v1/projects/${encodeURIComponent(projectId)}/analytics/dashboard-widgets/${encodeURIComponent(widgetId)}`,
|
|
86
|
-
data,
|
|
87
|
-
) as Promise<DashboardWidget>;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/** Places an existing widget on a dashboard, at the next free row. */
|
|
91
|
-
export async function assignDashboardWidgetToDashboard(params: {
|
|
92
|
-
projectId: string;
|
|
93
|
-
widgetId: string;
|
|
94
|
-
dashboardId: string;
|
|
95
|
-
}): Promise<DashboardWidget> {
|
|
96
|
-
return makeRequest(
|
|
97
|
-
"POST",
|
|
98
|
-
`/api/v1/projects/${encodeURIComponent(params.projectId)}/analytics/dashboard-widgets/${encodeURIComponent(params.widgetId)}/dashboard`,
|
|
99
|
-
{ dashboardId: params.dashboardId },
|
|
100
|
-
) as Promise<DashboardWidget>;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/** Deletes a widget. Used to undo a create when placing it fails. */
|
|
104
|
-
export async function deleteDashboardWidget(params: {
|
|
105
|
-
projectId: string;
|
|
106
|
-
widgetId: string;
|
|
107
|
-
}): Promise<void> {
|
|
108
|
-
await makeRequest(
|
|
109
|
-
"DELETE",
|
|
110
|
-
`/api/v1/projects/${encodeURIComponent(params.projectId)}/analytics/dashboard-widgets/${encodeURIComponent(params.widgetId)}`,
|
|
111
|
-
);
|
|
112
|
-
}
|