@langwatch/mcp-server 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.release-please-shim +1 -0
- package/CHANGELOG.md +66 -0
- package/dist/{archive-scenario-WJ2A7ETN.js → archive-scenario-YKGLJ4MZ.js} +4 -4
- package/dist/{archive-suite-4JOM4SSL.js → archive-suite-QFNDO3Y3.js} +4 -4
- package/dist/{assign-prompt-tag-GL7EAAF3.js → assign-prompt-tag-Y2B4CBBT.js} +3 -3
- package/dist/{chunk-E5JYYU3J.js → chunk-B57MZ4WI.js} +89 -83
- package/dist/{chunk-CCWCIJJ3.js → chunk-CPUPGDNA.js} +2 -2
- package/dist/{chunk-LUMEZEHL.js → chunk-FBRKHHJV.js} +2 -2
- package/dist/{chunk-HYMIWO3U.js → chunk-HDJDFKZR.js} +2 -2
- package/dist/{chunk-BWWY5KEF.js → chunk-KOO5733S.js} +3 -2
- package/dist/{chunk-EUQDVOSU.js → chunk-KZNBCKWG.js} +2 -2
- package/dist/{chunk-IE4M5OGE.js → chunk-L6QENXYA.js} +2 -2
- package/dist/{chunk-2GT7IFWK.js → chunk-NACSR6B7.js} +2 -2
- package/dist/{chunk-WQG2DFHX.js → chunk-OVQF3D5R.js} +2 -2
- package/dist/{chunk-ZVS4UKN2.js → chunk-PO7FM7IX.js} +2 -2
- package/dist/{chunk-EGH5RPXM.js → chunk-PZUWCWOS.js} +2 -2
- package/dist/{chunk-2WPLXEKF.js → chunk-YH2IBTEL.js} +7 -3
- package/dist/{chunk-4AUB2BIA.js → chunk-YI3OG4PI.js} +3 -3
- package/dist/config.js +1 -1
- package/dist/{create-agent-MBOOT3XK.js → create-agent-YRSDH7P7.js} +4 -4
- package/dist/{create-annotation-XMV6A7ED.js → create-annotation-FYQNKMVJ.js} +4 -4
- package/dist/{create-dashboard-VRKLFVZJ.js → create-dashboard-CORBR4YQ.js} +4 -4
- package/dist/{create-dataset-7HQPZCRE.js → create-dataset-ZC63T6BB.js} +4 -4
- package/dist/{create-dataset-records-2NIVFYTV.js → create-dataset-records-ILVNVKVR.js} +4 -4
- package/dist/{create-evaluator-WYFRFLRC.js → create-evaluator-2AU3PXFB.js} +4 -4
- package/dist/create-mcp-server.js +2 -2
- package/dist/{create-prompt-IEN7O6JT.js → create-prompt-NKRJ47YY.js} +3 -3
- package/dist/{create-prompt-tag-CAEZ45VO.js → create-prompt-tag-S4JX3ULL.js} +3 -3
- package/dist/{create-scenario-6YHSMGLP.js → create-scenario-BPRF75KF.js} +4 -4
- package/dist/{create-suite-H5XOFDE5.js → create-suite-4YN7D6K2.js} +4 -4
- package/dist/{delete-agent-JKTNBWAA.js → delete-agent-Y72R2YQA.js} +4 -4
- package/dist/{delete-annotation-ACMDV6QO.js → delete-annotation-UHWDMHSH.js} +4 -4
- package/dist/{delete-dashboard-VJSR7CRU.js → delete-dashboard-LPWT36KN.js} +4 -4
- package/dist/{delete-dataset-RTTTWP4D.js → delete-dataset-GGPQRHKX.js} +4 -4
- package/dist/{delete-dataset-records-KNQTIPQK.js → delete-dataset-records-LTG5LT26.js} +4 -4
- package/dist/{delete-evaluator-7FVC5WM4.js → delete-evaluator-F7QLXDHU.js} +4 -4
- package/dist/{delete-prompt-tag-ZMZUAGFW.js → delete-prompt-tag-B5UKZL45.js} +3 -3
- package/dist/{delete-workflow-EYQ3T4RQ.js → delete-workflow-4DGUDIDE.js} +4 -4
- package/dist/{get-agent-E3QSTVKG.js → get-agent-YEVICUX4.js} +4 -4
- package/dist/{get-analytics-2OHV763I.js → get-analytics-3W5CMU3F.js} +3 -3
- package/dist/{get-dashboard-PC7JDHH6.js → get-dashboard-NCQHN6MW.js} +4 -4
- package/dist/{get-dataset-H5IK5FVU.js → get-dataset-KBK6PH36.js} +4 -4
- package/dist/{get-evaluator-UWVUPYTM.js → get-evaluator-QDUL5LXR.js} +4 -4
- package/dist/{get-prompt-WZUOLLQC.js → get-prompt-XCSSNRKR.js} +3 -3
- package/dist/{get-scenario-Q6LCNUYN.js → get-scenario-FNRKOY7E.js} +4 -4
- package/dist/{get-simulation-run-Z2XKO256.js → get-simulation-run-WOEKUF7K.js} +4 -4
- package/dist/{get-suite-BXK5TN7P.js → get-suite-U5AOD5TC.js} +4 -4
- package/dist/{get-trace-4EJAYVBG.js → get-trace-MUWEJM2Z.js} +3 -3
- package/dist/{get-workflow-O34QJLHD.js → get-workflow-SOA7MT7L.js} +4 -4
- package/dist/{http-server-ISHF7NJX.js → http-server-7DMOCB75.js} +3 -3
- package/dist/index.js +423 -241
- package/dist/{langwatch-api-annotations-ERBG27RF.js → langwatch-api-annotations-Q57NDUVR.js} +4 -4
- package/dist/{langwatch-api-dashboards-G6TR7VVO.js → langwatch-api-dashboards-VBWWXV3Y.js} +4 -4
- package/dist/{langwatch-api-monitors-WSXZLS2B.js → langwatch-api-monitors-L3IY7FDT.js} +3 -3
- package/dist/{langwatch-api-secrets-RR5DKG2X.js → langwatch-api-secrets-S5HHF3XR.js} +3 -3
- package/dist/{langwatch-api-triggers-2RTNSWQY.js → langwatch-api-triggers-ME33QE26.js} +3 -3
- package/dist/langwatch-api-workflows-4CJQAYP2.js +15 -0
- package/dist/{list-agents-AW3P6FJV.js → list-agents-3HGIBJFM.js} +4 -4
- package/dist/{list-annotations-QNCGWPQ3.js → list-annotations-KWXYVEPI.js} +4 -4
- package/dist/{list-dashboards-R7RK2IXL.js → list-dashboards-VQ2LH666.js} +4 -4
- package/dist/{list-dataset-records-WVCSQP7P.js → list-dataset-records-RNRGROJP.js} +4 -4
- package/dist/{list-datasets-KEXRLDEU.js → list-datasets-I4A2LT2S.js} +4 -4
- package/dist/{list-evaluators-7R2LB4JH.js → list-evaluators-AKKRJ5MX.js} +4 -4
- package/dist/{list-model-providers-OBYJCKBX.js → list-model-providers-DVFEHFHZ.js} +4 -4
- package/dist/{list-prompt-tags-6LY3ZPYI.js → list-prompt-tags-PL5OISUA.js} +3 -3
- package/dist/{list-prompts-VWEZ4CDE.js → list-prompts-7VTFWE2Z.js} +3 -3
- package/dist/{list-scenarios-TXD4W2ZJ.js → list-scenarios-5BZWZ6ZN.js} +4 -4
- package/dist/{list-simulation-runs-RHPOLMFI.js → list-simulation-runs-WCZ6RLPE.js} +4 -4
- package/dist/{list-suites-FSGBX27Z.js → list-suites-RRQ2JX5Y.js} +4 -4
- package/dist/{list-workflows-VRGEZ3EN.js → list-workflows-UQB5FCX5.js} +4 -4
- package/dist/{rename-prompt-tag-VOJJLX4M.js → rename-prompt-tag-TURD6KYU.js} +3 -3
- package/dist/{run-agent-KTCC7TB7.js → run-agent-BEJ4K4CM.js} +4 -4
- package/dist/{run-evaluation-2X3V3Q6L.js → run-evaluation-AJ7WZNQD.js} +3 -3
- package/dist/{run-suite-BTMHGI2D.js → run-suite-U7V432G2.js} +4 -4
- package/dist/{run-workflow-IGAYGKJL.js → run-workflow-5WX7DK5T.js} +4 -4
- package/dist/{search-traces-VYFUIMXH.js → search-traces-ZCHNOMTX.js} +3 -3
- package/dist/{set-model-provider-W5IUI326.js → set-model-provider-6CFHMCNE.js} +4 -4
- package/dist/{update-agent-4BB7EYLR.js → update-agent-UE6UWLZP.js} +4 -4
- package/dist/{update-dataset-CXBKZ4W3.js → update-dataset-4XQZZE4S.js} +4 -4
- package/dist/{update-dataset-record-HOHAMHXG.js → update-dataset-record-GNNM5TKM.js} +4 -4
- package/dist/{update-evaluator-IVOR6FTR.js → update-evaluator-LHVDXIZD.js} +4 -4
- package/dist/{update-prompt-OWQAKE7K.js → update-prompt-3XEHECJ7.js} +3 -3
- package/dist/{update-scenario-GDFVILPN.js → update-scenario-DFPREYCD.js} +4 -4
- package/dist/{update-suite-BXYUYSPT.js → update-suite-RATU5THO.js} +4 -4
- package/package.json +6 -6
- package/src/__tests__/all-tools.integration.test.ts +9 -0
- package/src/__tests__/datasets.integration.test.ts +17 -0
- package/src/__tests__/datasets.unit.test.ts +4 -0
- package/src/__tests__/scenario-tools.unit.test.ts +3 -0
- package/src/config.ts +2 -0
- package/src/langwatch-api.ts +5 -1
- package/uv.lock +188 -530
- package/Dockerfile +0 -22
- package/build.js +0 -12
- package/dist/archive-scenario-WJ2A7ETN.js.map +0 -1
- package/dist/archive-suite-4JOM4SSL.js.map +0 -1
- package/dist/assign-prompt-tag-GL7EAAF3.js.map +0 -1
- package/dist/chunk-2GT7IFWK.js.map +0 -1
- package/dist/chunk-2WPLXEKF.js.map +0 -1
- package/dist/chunk-4AUB2BIA.js.map +0 -1
- package/dist/chunk-BWWY5KEF.js.map +0 -1
- package/dist/chunk-CCWCIJJ3.js.map +0 -1
- package/dist/chunk-E5JYYU3J.js.map +0 -1
- package/dist/chunk-EGH5RPXM.js.map +0 -1
- package/dist/chunk-EUQDVOSU.js.map +0 -1
- package/dist/chunk-HYMIWO3U.js.map +0 -1
- package/dist/chunk-IE4M5OGE.js.map +0 -1
- package/dist/chunk-LUMEZEHL.js.map +0 -1
- package/dist/chunk-NUFPTHKU.js.map +0 -1
- package/dist/chunk-WQG2DFHX.js.map +0 -1
- package/dist/chunk-WVI5CJ6S.js.map +0 -1
- package/dist/chunk-ZVS4UKN2.js.map +0 -1
- package/dist/chunk-ZXKLPC2E.js.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/create-agent-MBOOT3XK.js.map +0 -1
- package/dist/create-annotation-XMV6A7ED.js.map +0 -1
- package/dist/create-dashboard-VRKLFVZJ.js.map +0 -1
- package/dist/create-dataset-7HQPZCRE.js.map +0 -1
- package/dist/create-dataset-records-2NIVFYTV.js.map +0 -1
- package/dist/create-evaluator-WYFRFLRC.js.map +0 -1
- package/dist/create-mcp-server.js.map +0 -1
- package/dist/create-prompt-IEN7O6JT.js.map +0 -1
- package/dist/create-prompt-tag-CAEZ45VO.js.map +0 -1
- package/dist/create-scenario-6YHSMGLP.js.map +0 -1
- package/dist/create-suite-H5XOFDE5.js.map +0 -1
- package/dist/delete-agent-JKTNBWAA.js.map +0 -1
- package/dist/delete-annotation-ACMDV6QO.js.map +0 -1
- package/dist/delete-dashboard-VJSR7CRU.js.map +0 -1
- package/dist/delete-dataset-RTTTWP4D.js.map +0 -1
- package/dist/delete-dataset-records-KNQTIPQK.js.map +0 -1
- package/dist/delete-evaluator-7FVC5WM4.js.map +0 -1
- package/dist/delete-prompt-tag-ZMZUAGFW.js.map +0 -1
- package/dist/delete-workflow-EYQ3T4RQ.js.map +0 -1
- package/dist/discover-evaluator-schema-H23XCLNE.js.map +0 -1
- package/dist/discover-scenario-schema-MEEEVND7.js.map +0 -1
- package/dist/discover-schema-3T52ORPB.js.map +0 -1
- package/dist/get-agent-E3QSTVKG.js.map +0 -1
- package/dist/get-analytics-2OHV763I.js.map +0 -1
- package/dist/get-dashboard-PC7JDHH6.js.map +0 -1
- package/dist/get-dataset-H5IK5FVU.js.map +0 -1
- package/dist/get-evaluator-UWVUPYTM.js.map +0 -1
- package/dist/get-prompt-WZUOLLQC.js.map +0 -1
- package/dist/get-scenario-Q6LCNUYN.js.map +0 -1
- package/dist/get-simulation-run-Z2XKO256.js.map +0 -1
- package/dist/get-suite-BXK5TN7P.js.map +0 -1
- package/dist/get-trace-4EJAYVBG.js.map +0 -1
- package/dist/get-workflow-O34QJLHD.js.map +0 -1
- package/dist/http-server-ISHF7NJX.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/langwatch-api-annotations-ERBG27RF.js.map +0 -1
- package/dist/langwatch-api-dashboards-G6TR7VVO.js.map +0 -1
- package/dist/langwatch-api-monitors-WSXZLS2B.js.map +0 -1
- package/dist/langwatch-api-secrets-RR5DKG2X.js.map +0 -1
- package/dist/langwatch-api-triggers-2RTNSWQY.js.map +0 -1
- package/dist/langwatch-api-workflows-VJRIIDZ7.js +0 -15
- package/dist/langwatch-api-workflows-VJRIIDZ7.js.map +0 -1
- package/dist/list-agents-AW3P6FJV.js.map +0 -1
- package/dist/list-annotations-QNCGWPQ3.js.map +0 -1
- package/dist/list-dashboards-R7RK2IXL.js.map +0 -1
- package/dist/list-dataset-records-WVCSQP7P.js.map +0 -1
- package/dist/list-datasets-KEXRLDEU.js.map +0 -1
- package/dist/list-evaluators-7R2LB4JH.js.map +0 -1
- package/dist/list-model-providers-OBYJCKBX.js.map +0 -1
- package/dist/list-prompt-tags-6LY3ZPYI.js.map +0 -1
- package/dist/list-prompts-VWEZ4CDE.js.map +0 -1
- package/dist/list-scenarios-TXD4W2ZJ.js.map +0 -1
- package/dist/list-simulation-runs-RHPOLMFI.js.map +0 -1
- package/dist/list-suites-FSGBX27Z.js.map +0 -1
- package/dist/list-workflows-VRGEZ3EN.js.map +0 -1
- package/dist/rename-prompt-tag-VOJJLX4M.js.map +0 -1
- package/dist/run-agent-KTCC7TB7.js.map +0 -1
- package/dist/run-evaluation-2X3V3Q6L.js.map +0 -1
- package/dist/run-suite-BTMHGI2D.js.map +0 -1
- package/dist/run-workflow-IGAYGKJL.js.map +0 -1
- package/dist/search-traces-VYFUIMXH.js.map +0 -1
- package/dist/set-model-provider-W5IUI326.js.map +0 -1
- package/dist/update-agent-4BB7EYLR.js.map +0 -1
- package/dist/update-dataset-CXBKZ4W3.js.map +0 -1
- package/dist/update-dataset-record-HOHAMHXG.js.map +0 -1
- package/dist/update-evaluator-IVOR6FTR.js.map +0 -1
- package/dist/update-prompt-OWQAKE7K.js.map +0 -1
- package/dist/update-scenario-GDFVILPN.js.map +0 -1
- package/dist/update-suite-BXYUYSPT.js.map +0 -1
- package/tests/evaluations.ipynb +0 -649
- package/tests/fixtures/azure/azure_openai_stream_bot_expected.py +0 -102
- package/tests/fixtures/azure/azure_openai_stream_bot_input.py +0 -78
- package/tests/fixtures/dspy/dspy_bot_expected.py +0 -61
- package/tests/fixtures/dspy/dspy_bot_input.py +0 -53
- package/tests/fixtures/fastapi/fastapi_app_expected.py +0 -68
- package/tests/fixtures/fastapi/fastapi_app_input.py +0 -60
- package/tests/fixtures/fastapi/prompt_management_fastapi_expected.py +0 -114
- package/tests/fixtures/fastapi/prompt_management_fastapi_input.py +0 -88
- package/tests/fixtures/haystack/haystack_bot_expected.py +0 -141
- package/tests/fixtures/haystack/haystack_bot_input.py +0 -69
- package/tests/fixtures/langchain/langchain_bot_expected.py +0 -53
- package/tests/fixtures/langchain/langchain_bot_input.py +0 -45
- package/tests/fixtures/langchain/langchain_bot_with_memory_expected.py +0 -69
- package/tests/fixtures/langchain/langchain_bot_with_memory_input.py +0 -61
- package/tests/fixtures/langchain/langchain_rag_bot_expected.py +0 -97
- package/tests/fixtures/langchain/langchain_rag_bot_input.py +0 -77
- package/tests/fixtures/langchain/langchain_rag_bot_vertex_ai_expected.py +0 -116
- package/tests/fixtures/langchain/langchain_rag_bot_vertex_ai_input.py +0 -81
- package/tests/fixtures/langchain/langgraph_rag_bot_with_threads_expected.py +0 -331
- package/tests/fixtures/langchain/langgraph_rag_bot_with_threads_input.py +0 -106
- package/tests/fixtures/litellm/litellm_bot_expected.py +0 -40
- package/tests/fixtures/litellm/litellm_bot_input.py +0 -35
- package/tests/fixtures/openai/openai_bot_expected.py +0 -43
- package/tests/fixtures/openai/openai_bot_function_call_expected.py +0 -91
- package/tests/fixtures/openai/openai_bot_function_call_input.py +0 -82
- package/tests/fixtures/openai/openai_bot_input.py +0 -36
- package/tests/fixtures/openai/openai_bot_rag_expected.py +0 -73
- package/tests/fixtures/openai/openai_bot_rag_input.py +0 -51
- package/tests/fixtures/opentelemetry/openinference_dspy_bot_expected.py +0 -63
- package/tests/fixtures/opentelemetry/openinference_dspy_bot_input.py +0 -58
- package/tests/fixtures/opentelemetry/openinference_langchain_bot_expected.py +0 -53
- package/tests/fixtures/opentelemetry/openinference_langchain_bot_input.py +0 -52
- package/tests/fixtures/opentelemetry/openinference_openai_bot_expected.py +0 -49
- package/tests/fixtures/opentelemetry/openinference_openai_bot_input.py +0 -41
- package/tests/fixtures/opentelemetry/openllmetry_openai_bot_expected.py +0 -44
- package/tests/fixtures/opentelemetry/openllmetry_openai_bot_input.py +0 -40
- package/tests/fixtures/strands/strands_bot_expected.py +0 -84
- package/tests/fixtures/strands/strands_bot_input.py +0 -52
- package/tests/scenario-openai.test.ts +0 -160
- package/tsup.config.ts +0 -14
- package/vitest.config.js +0 -7
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/list-dashboards.ts"],"sourcesContent":["import { listDashboards as apiListDashboards } from \"../langwatch-api-dashboards.js\";\n\nexport async function handleListDashboards(): Promise<string> {\n const result = await apiListDashboards();\n const dashboards = result.data;\n\n if (!Array.isArray(dashboards) || dashboards.length === 0) {\n return \"No dashboards found in this project.\\n\\n> Tip: Use `platform_create_dashboard` to create a new dashboard.\";\n }\n\n const lines: string[] = [];\n lines.push(`# Dashboards (${dashboards.length} total)\\n`);\n\n for (const d of dashboards) {\n lines.push(`## ${d.name}`);\n lines.push(`**ID**: ${d.id}`);\n lines.push(`**Graphs**: ${d.graphCount}`);\n lines.push(`**Updated**: ${d.updatedAt}`);\n lines.push(\"\");\n }\n\n lines.push(\n \"> Use `platform_get_dashboard` with the ID to see dashboard details including graphs.\",\n );\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;AAEA,eAAsB,uBAAwC;AAC5D,QAAM,SAAS,MAAM,eAAkB;AACvC,QAAM,aAAa,OAAO;AAE1B,MAAI,CAAC,MAAM,QAAQ,UAAU,KAAK,WAAW,WAAW,GAAG;AACzD,WAAO;AAAA,EACT;AAEA,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,iBAAiB,WAAW,MAAM;AAAA,CAAW;AAExD,aAAW,KAAK,YAAY;AAC1B,UAAM,KAAK,MAAM,EAAE,IAAI,EAAE;AACzB,UAAM,KAAK,WAAW,EAAE,EAAE,EAAE;AAC5B,UAAM,KAAK,eAAe,EAAE,UAAU,EAAE;AACxC,UAAM,KAAK,gBAAgB,EAAE,SAAS,EAAE;AACxC,UAAM,KAAK,EAAE;AAAA,EACf;AAEA,QAAM;AAAA,IACJ;AAAA,EACF;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/list-dataset-records.ts"],"sourcesContent":["import {\n listDatasetRecords as apiListDatasetRecords,\n} from \"../langwatch-api-datasets.js\";\nimport { escapeMarkdown } from \"../utils/escape-markdown.js\";\n\n/**\n * Handles the platform_list_dataset_records MCP tool invocation.\n *\n * Lists records in a dataset with pagination support.\n */\nexport async function handleListDatasetRecords(params: {\n slugOrId: string;\n page?: number;\n limit?: number;\n format?: \"digest\" | \"json\";\n}): Promise<string> {\n const response = await apiListDatasetRecords({\n slugOrId: params.slugOrId,\n page: params.page,\n limit: params.limit,\n });\n\n if (params.format === \"json\") {\n return JSON.stringify(response, null, 2);\n }\n\n const { data: records, pagination } = response;\n\n if (records.length === 0) {\n return \"No records found in this dataset.\";\n }\n\n const lines: string[] = [];\n lines.push(`# Records (page ${pagination.page} of ${pagination.totalPages}, ${pagination.total} total)\\n`);\n\n for (const record of records) {\n lines.push(`**${escapeMarkdown(record.id)}**: ${escapeMarkdown(JSON.stringify(record.entry))}`);\n }\n\n if (pagination.page < pagination.totalPages) {\n lines.push(\"\");\n lines.push(`> Use \\`platform_list_dataset_records\\` with \\`page: ${pagination.page + 1}\\` to see the next page.`);\n }\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;;;;AAUA,eAAsB,yBAAyB,QAK3B;AAClB,QAAM,WAAW,MAAM,mBAAsB;AAAA,IAC3C,UAAU,OAAO;AAAA,IACjB,MAAM,OAAO;AAAA,IACb,OAAO,OAAO;AAAA,EAChB,CAAC;AAED,MAAI,OAAO,WAAW,QAAQ;AAC5B,WAAO,KAAK,UAAU,UAAU,MAAM,CAAC;AAAA,EACzC;AAEA,QAAM,EAAE,MAAM,SAAS,WAAW,IAAI;AAEtC,MAAI,QAAQ,WAAW,GAAG;AACxB,WAAO;AAAA,EACT;AAEA,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,mBAAmB,WAAW,IAAI,OAAO,WAAW,UAAU,KAAK,WAAW,KAAK;AAAA,CAAW;AAEzG,aAAW,UAAU,SAAS;AAC5B,UAAM,KAAK,KAAK,eAAe,OAAO,EAAE,CAAC,OAAO,eAAe,KAAK,UAAU,OAAO,KAAK,CAAC,CAAC,EAAE;AAAA,EAChG;AAEA,MAAI,WAAW,OAAO,WAAW,YAAY;AAC3C,UAAM,KAAK,EAAE;AACb,UAAM,KAAK,wDAAwD,WAAW,OAAO,CAAC,0BAA0B;AAAA,EAClH;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/list-datasets.ts"],"sourcesContent":["import {\n listDatasets as apiListDatasets,\n type DatasetSummary,\n} from \"../langwatch-api-datasets.js\";\nimport { escapeMarkdown } from \"../utils/escape-markdown.js\";\n\n/**\n * Fetches all datasets by paginating through the API until every page\n * has been retrieved.\n *\n * Returns the accumulated dataset summaries along with the total count\n * reported by the server.\n */\nasync function fetchAllDatasets(): Promise<{\n datasets: DatasetSummary[];\n total: number;\n}> {\n const PAGE_SIZE = 100;\n const datasets: DatasetSummary[] = [];\n let page = 1;\n let total = 0;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- loop until break\n while (true) {\n const response = await apiListDatasets({ page, limit: PAGE_SIZE });\n total = response.pagination.total;\n datasets.push(...response.data);\n\n if (datasets.length >= total || response.data.length === 0) {\n break;\n }\n page++;\n }\n\n return { datasets, total };\n}\n\n/**\n * Handles the platform_list_datasets MCP tool invocation.\n *\n * Lists all datasets in the LangWatch project, formatted as an\n * AI-readable digest or raw JSON.\n */\nexport async function handleListDatasets(params: {\n format?: \"digest\" | \"json\";\n} = {}): Promise<string> {\n if (params.format === \"json\") {\n const { datasets, total } = await fetchAllDatasets();\n return JSON.stringify({ data: datasets, total }, null, 2);\n }\n\n const { datasets, total } = await fetchAllDatasets();\n\n if (datasets.length === 0) {\n return \"No datasets found in this project.\\n\\n> Tip: Use `platform_create_dataset` to create your first dataset.\";\n }\n\n const lines: string[] = [];\n lines.push(`# Datasets (${total} total)\\n`);\n\n for (const ds of datasets) {\n lines.push(`## ${escapeMarkdown(ds.name)}`);\n lines.push(`**Slug**: ${escapeMarkdown(ds.slug)}`);\n lines.push(`**ID**: ${ds.id}`);\n if (Array.isArray(ds.columnTypes) && ds.columnTypes.length > 0) {\n const colNames = ds.columnTypes.map((c) => c.name).join(\", \");\n lines.push(`**Columns**: ${colNames}`);\n }\n lines.push(\n `**Records**: ${ds.recordCount ?? \"unknown\"}`,\n );\n lines.push(\"\");\n }\n\n lines.push(\n \"> Use `platform_get_dataset` with the slug to see full dataset details and records.\",\n );\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;;;;AAaA,eAAe,mBAGZ;AACD,QAAM,YAAY;AAClB,QAAM,WAA6B,CAAC;AACpC,MAAI,OAAO;AACX,MAAI,QAAQ;AAGZ,SAAO,MAAM;AACX,UAAM,WAAW,MAAM,aAAgB,EAAE,MAAM,OAAO,UAAU,CAAC;AACjE,YAAQ,SAAS,WAAW;AAC5B,aAAS,KAAK,GAAG,SAAS,IAAI;AAE9B,QAAI,SAAS,UAAU,SAAS,SAAS,KAAK,WAAW,GAAG;AAC1D;AAAA,IACF;AACA;AAAA,EACF;AAEA,SAAO,EAAE,UAAU,MAAM;AAC3B;AAQA,eAAsB,mBAAmB,SAErC,CAAC,GAAoB;AACvB,MAAI,OAAO,WAAW,QAAQ;AAC5B,UAAM,EAAE,UAAAA,WAAU,OAAAC,OAAM,IAAI,MAAM,iBAAiB;AACnD,WAAO,KAAK,UAAU,EAAE,MAAMD,WAAU,OAAAC,OAAM,GAAG,MAAM,CAAC;AAAA,EAC1D;AAEA,QAAM,EAAE,UAAU,MAAM,IAAI,MAAM,iBAAiB;AAEnD,MAAI,SAAS,WAAW,GAAG;AACzB,WAAO;AAAA,EACT;AAEA,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,eAAe,KAAK;AAAA,CAAW;AAE1C,aAAW,MAAM,UAAU;AACzB,UAAM,KAAK,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE;AAC1C,UAAM,KAAK,aAAa,eAAe,GAAG,IAAI,CAAC,EAAE;AACjD,UAAM,KAAK,WAAW,GAAG,EAAE,EAAE;AAC7B,QAAI,MAAM,QAAQ,GAAG,WAAW,KAAK,GAAG,YAAY,SAAS,GAAG;AAC9D,YAAM,WAAW,GAAG,YAAY,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,IAAI;AAC5D,YAAM,KAAK,gBAAgB,QAAQ,EAAE;AAAA,IACvC;AACA,UAAM;AAAA,MACJ,gBAAgB,GAAG,eAAe,SAAS;AAAA,IAC7C;AACA,UAAM,KAAK,EAAE;AAAA,EACf;AAEA,QAAM;AAAA,IACJ;AAAA,EACF;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":["datasets","total"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/list-evaluators.ts"],"sourcesContent":["import {\n listEvaluators as apiListEvaluators,\n getEvaluatorType,\n} from \"../langwatch-api-evaluators.js\";\n\n/**\n * Handles the platform_list_evaluators MCP tool invocation.\n *\n * Lists all evaluators in the LangWatch project, formatted as an\n * AI-readable digest.\n */\nexport async function handleListEvaluators(): Promise<string> {\n const evaluators = await apiListEvaluators();\n\n if (!Array.isArray(evaluators) || evaluators.length === 0) {\n return \"No evaluators found in this project.\\n\\n> Tip: Use `platform_create_evaluator` to create your first evaluator. Call `discover_schema({ category: 'evaluators' })` to see available evaluator types.\";\n }\n\n const lines: string[] = [];\n lines.push(`# Evaluators (${evaluators.length} total)\\n`);\n\n for (const e of evaluators) {\n const evaluatorType = getEvaluatorType(e);\n lines.push(`## ${e.name}`);\n lines.push(`**ID**: ${e.id}`);\n if (e.slug) lines.push(`**Slug**: ${e.slug}`);\n if (evaluatorType) lines.push(`**Type**: ${evaluatorType}`);\n lines.push(`**Kind**: ${e.type}`);\n lines.push(\"\");\n }\n\n lines.push(\n \"> Use `platform_get_evaluator` with the ID or slug to see full evaluator details.\",\n );\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;;AAWA,eAAsB,uBAAwC;AAC5D,QAAM,aAAa,MAAM,eAAkB;AAE3C,MAAI,CAAC,MAAM,QAAQ,UAAU,KAAK,WAAW,WAAW,GAAG;AACzD,WAAO;AAAA,EACT;AAEA,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,iBAAiB,WAAW,MAAM;AAAA,CAAW;AAExD,aAAW,KAAK,YAAY;AAC1B,UAAM,gBAAgB,iBAAiB,CAAC;AACxC,UAAM,KAAK,MAAM,EAAE,IAAI,EAAE;AACzB,UAAM,KAAK,WAAW,EAAE,EAAE,EAAE;AAC5B,QAAI,EAAE,KAAM,OAAM,KAAK,aAAa,EAAE,IAAI,EAAE;AAC5C,QAAI,cAAe,OAAM,KAAK,aAAa,aAAa,EAAE;AAC1D,UAAM,KAAK,aAAa,EAAE,IAAI,EAAE;AAChC,UAAM,KAAK,EAAE;AAAA,EACf;AAEA,QAAM;AAAA,IACJ;AAAA,EACF;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/list-model-providers.ts"],"sourcesContent":["import { listModelProviders as apiListModelProviders } from \"../langwatch-api-model-providers.js\";\n\n/**\n * Handles the platform_list_model_providers MCP tool invocation.\n *\n * Lists all model providers for the project, showing provider name,\n * enabled status, and which key fields are set (masked).\n */\nexport async function handleListModelProviders(): Promise<string> {\n const providers = await apiListModelProviders();\n\n const entries = Object.entries(providers);\n if (entries.length === 0) {\n return \"No model providers configured for this project.\\n\\n> Tip: Use `platform_set_model_provider` to configure an API key for a model provider.\";\n }\n\n const lines: string[] = [];\n lines.push(`# Model Providers (${entries.length} total)\\n`);\n\n for (const [key, provider] of entries) {\n const status = provider.enabled ? \"enabled\" : \"disabled\";\n lines.push(`## ${key}`);\n lines.push(`**Status**: ${status}`);\n\n if (provider.customKeys) {\n const keyFields = Object.entries(provider.customKeys)\n .map(([k, v]) => `${k}: ${v ? \"set\" : \"not set\"}`)\n .join(\", \");\n lines.push(`**Keys**: ${keyFields}`);\n }\n\n if (provider.models && provider.models.length > 0) {\n lines.push(`**Models**: ${provider.models.length} available`);\n }\n\n lines.push(\"\");\n }\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;AAQA,eAAsB,2BAA4C;AAChE,QAAM,YAAY,MAAM,mBAAsB;AAE9C,QAAM,UAAU,OAAO,QAAQ,SAAS;AACxC,MAAI,QAAQ,WAAW,GAAG;AACxB,WAAO;AAAA,EACT;AAEA,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,sBAAsB,QAAQ,MAAM;AAAA,CAAW;AAE1D,aAAW,CAAC,KAAK,QAAQ,KAAK,SAAS;AACrC,UAAM,SAAS,SAAS,UAAU,YAAY;AAC9C,UAAM,KAAK,MAAM,GAAG,EAAE;AACtB,UAAM,KAAK,eAAe,MAAM,EAAE;AAElC,QAAI,SAAS,YAAY;AACvB,YAAM,YAAY,OAAO,QAAQ,SAAS,UAAU,EACjD,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,KAAK,IAAI,QAAQ,SAAS,EAAE,EAChD,KAAK,IAAI;AACZ,YAAM,KAAK,aAAa,SAAS,EAAE;AAAA,IACrC;AAEA,QAAI,SAAS,UAAU,SAAS,OAAO,SAAS,GAAG;AACjD,YAAM,KAAK,eAAe,SAAS,OAAO,MAAM,YAAY;AAAA,IAC9D;AAEA,UAAM,KAAK,EAAE;AAAA,EACf;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/list-prompt-tags.ts"],"sourcesContent":["import { listPromptTags as apiListPromptTags } from \"../langwatch-api.js\";\n\nexport async function handleListPromptTags(): Promise<string> {\n const tags = (await apiListPromptTags()) as Array<{\n id: string;\n name: string;\n createdAt?: string;\n }>;\n\n if (!tags || tags.length === 0) {\n return \"No prompt tags found. The `latest` tag is always available.\";\n }\n\n const lines: string[] = [];\n lines.push(\"# Prompt Tags\\n\");\n for (const tag of tags) {\n const created = tag.createdAt ? ` (created ${tag.createdAt})` : \"\";\n lines.push(`- **${tag.name}**${created}`);\n }\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;AAEA,eAAsB,uBAAwC;AAC5D,QAAM,OAAQ,MAAM,eAAkB;AAMtC,MAAI,CAAC,QAAQ,KAAK,WAAW,GAAG;AAC9B,WAAO;AAAA,EACT;AAEA,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,iBAAiB;AAC5B,aAAW,OAAO,MAAM;AACtB,UAAM,UAAU,IAAI,YAAY,aAAa,IAAI,SAAS,MAAM;AAChE,UAAM,KAAK,OAAO,IAAI,IAAI,KAAK,OAAO,EAAE;AAAA,EAC1C;AACA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/list-prompts.ts"],"sourcesContent":["import { listPrompts as apiListPrompts } from \"../langwatch-api.js\";\n\n/**\n * Handles the platform_list_prompts MCP tool invocation.\n *\n * Lists all prompts in the LangWatch project, formatted as an\n * AI-readable markdown table.\n */\nexport async function handleListPrompts(): Promise<string> {\n const prompts = await apiListPrompts();\n\n if (!Array.isArray(prompts) || prompts.length === 0) {\n return \"No prompts found in this project.\";\n }\n\n const lines: string[] = [];\n lines.push(`# Prompts (${prompts.length} total)\\n`);\n lines.push(\"| Handle | Name | Latest Version |\");\n lines.push(\"|--------|------|----------------|\");\n\n for (const p of prompts) {\n const handle = p.handle || p.id || \"N/A\";\n const name = p.name || \"Untitled\";\n const versionNum = p.latestVersionNumber ?? p.version;\n const version = versionNum != null ? `v${versionNum}` : \"N/A\";\n lines.push(`| ${handle} | ${name} | ${version} |`);\n }\n\n lines.push(\n \"\\n> Use `platform_get_prompt` with the handle or ID to see full prompt details.\"\n );\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;AAQA,eAAsB,oBAAqC;AACzD,QAAM,UAAU,MAAM,YAAe;AAErC,MAAI,CAAC,MAAM,QAAQ,OAAO,KAAK,QAAQ,WAAW,GAAG;AACnD,WAAO;AAAA,EACT;AAEA,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,cAAc,QAAQ,MAAM;AAAA,CAAW;AAClD,QAAM,KAAK,oCAAoC;AAC/C,QAAM,KAAK,oCAAoC;AAE/C,aAAW,KAAK,SAAS;AACvB,UAAM,SAAS,EAAE,UAAU,EAAE,MAAM;AACnC,UAAM,OAAO,EAAE,QAAQ;AACvB,UAAM,aAAa,EAAE,uBAAuB,EAAE;AAC9C,UAAM,UAAU,cAAc,OAAO,IAAI,UAAU,KAAK;AACxD,UAAM,KAAK,KAAK,MAAM,MAAM,IAAI,MAAM,OAAO,IAAI;AAAA,EACnD;AAEA,QAAM;AAAA,IACJ;AAAA,EACF;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/list-scenarios.ts"],"sourcesContent":["import { listScenarios as apiListScenarios } from \"../langwatch-api-scenarios.js\";\n\n/**\n * Handles the platform_list_scenarios MCP tool invocation.\n *\n * Lists all scenarios in the LangWatch project, formatted as an\n * AI-readable digest or raw JSON.\n */\nexport async function handleListScenarios(params: {\n format?: \"digest\" | \"json\";\n}): Promise<string> {\n const scenarios = await apiListScenarios();\n\n if (params.format === \"json\") {\n return JSON.stringify(scenarios, null, 2);\n }\n\n if (!Array.isArray(scenarios) || scenarios.length === 0) {\n return \"No scenarios found in this project.\\n\\n> Tip: Use `platform_create_scenario` to create your first scenario.\";\n }\n\n const lines: string[] = [];\n lines.push(`# Scenarios (${scenarios.length} total)\\n`);\n\n for (const s of scenarios) {\n lines.push(`## ${s.name}`);\n lines.push(`**ID**: ${s.id}`);\n const preview =\n s.situation && s.situation.length > 60\n ? s.situation.slice(0, 60) + \"...\"\n : s.situation;\n lines.push(`**Situation**: ${preview}`);\n lines.push(\n `**Criteria**: ${Array.isArray(s.criteria) ? s.criteria.length : 0} criteria`,\n );\n if (Array.isArray(s.labels) && s.labels.length > 0) {\n lines.push(`**Labels**: ${s.labels.join(\", \")}`);\n }\n lines.push(\"\");\n }\n\n lines.push(\n \"> Use `platform_get_scenario` with the ID to see full scenario details.\",\n );\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;AAQA,eAAsB,oBAAoB,QAEtB;AAClB,QAAM,YAAY,MAAM,cAAiB;AAEzC,MAAI,OAAO,WAAW,QAAQ;AAC5B,WAAO,KAAK,UAAU,WAAW,MAAM,CAAC;AAAA,EAC1C;AAEA,MAAI,CAAC,MAAM,QAAQ,SAAS,KAAK,UAAU,WAAW,GAAG;AACvD,WAAO;AAAA,EACT;AAEA,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,gBAAgB,UAAU,MAAM;AAAA,CAAW;AAEtD,aAAW,KAAK,WAAW;AACzB,UAAM,KAAK,MAAM,EAAE,IAAI,EAAE;AACzB,UAAM,KAAK,WAAW,EAAE,EAAE,EAAE;AAC5B,UAAM,UACJ,EAAE,aAAa,EAAE,UAAU,SAAS,KAChC,EAAE,UAAU,MAAM,GAAG,EAAE,IAAI,QAC3B,EAAE;AACR,UAAM,KAAK,kBAAkB,OAAO,EAAE;AACtC,UAAM;AAAA,MACJ,iBAAiB,MAAM,QAAQ,EAAE,QAAQ,IAAI,EAAE,SAAS,SAAS,CAAC;AAAA,IACpE;AACA,QAAI,MAAM,QAAQ,EAAE,MAAM,KAAK,EAAE,OAAO,SAAS,GAAG;AAClD,YAAM,KAAK,eAAe,EAAE,OAAO,KAAK,IAAI,CAAC,EAAE;AAAA,IACjD;AACA,UAAM,KAAK,EAAE;AAAA,EACf;AAEA,QAAM;AAAA,IACJ;AAAA,EACF;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/list-simulation-runs.ts"],"sourcesContent":["import { listSimulationRuns as apiListSimulationRuns } from \"../langwatch-api-simulation-runs.js\";\n\n/**\n * Handles the platform_list_simulation_runs MCP tool invocation.\n */\nexport async function handleListSimulationRuns(params: {\n scenarioSetId?: string;\n batchRunId?: string;\n limit?: number;\n format?: \"digest\" | \"json\";\n}): Promise<string> {\n const result = await apiListSimulationRuns({\n scenarioSetId: params.scenarioSetId,\n batchRunId: params.batchRunId,\n limit: params.limit,\n });\n\n if (params.format === \"json\") {\n return JSON.stringify(result, null, 2);\n }\n\n const { runs } = result;\n\n if (runs.length === 0) {\n return \"No simulation runs found.\\n\\n> Run a suite first with `platform_run_suite` to create simulation runs.\";\n }\n\n const lines: string[] = [];\n lines.push(`# Simulation Runs (${runs.length} results${result.hasMore ? \", more available\" : \"\"})\\n`);\n\n for (const run of runs) {\n const statusIcon = run.status === \"SUCCESS\" ? \"pass\" : run.status === \"FAILED\" ? \"FAIL\" : run.status;\n const duration = run.durationInMs > 0 ? `${(run.durationInMs / 1000).toFixed(1)}s` : \"—\";\n const verdict = run.results?.verdict ?? \"\";\n\n lines.push(`## ${run.name ?? run.scenarioId} — ${statusIcon}${verdict ? ` (${verdict})` : \"\"}`);\n lines.push(`**Run ID**: ${run.scenarioRunId}`);\n lines.push(`**Batch**: ${run.batchRunId}`);\n lines.push(`**Duration**: ${duration}`);\n if (run.totalCost) {\n lines.push(`**Cost**: $${run.totalCost.toFixed(4)}`);\n }\n lines.push(\"\");\n }\n\n lines.push(\"> Use `platform_get_simulation_run` with a run ID to see full details (messages, results).\");\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;AAKA,eAAsB,yBAAyB,QAK3B;AAClB,QAAM,SAAS,MAAM,mBAAsB;AAAA,IACzC,eAAe,OAAO;AAAA,IACtB,YAAY,OAAO;AAAA,IACnB,OAAO,OAAO;AAAA,EAChB,CAAC;AAED,MAAI,OAAO,WAAW,QAAQ;AAC5B,WAAO,KAAK,UAAU,QAAQ,MAAM,CAAC;AAAA,EACvC;AAEA,QAAM,EAAE,KAAK,IAAI;AAEjB,MAAI,KAAK,WAAW,GAAG;AACrB,WAAO;AAAA,EACT;AAEA,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,sBAAsB,KAAK,MAAM,WAAW,OAAO,UAAU,qBAAqB,EAAE;AAAA,CAAK;AAEpG,aAAW,OAAO,MAAM;AACtB,UAAM,aAAa,IAAI,WAAW,YAAY,SAAS,IAAI,WAAW,WAAW,SAAS,IAAI;AAC9F,UAAM,WAAW,IAAI,eAAe,IAAI,IAAI,IAAI,eAAe,KAAM,QAAQ,CAAC,CAAC,MAAM;AACrF,UAAM,UAAU,IAAI,SAAS,WAAW;AAExC,UAAM,KAAK,MAAM,IAAI,QAAQ,IAAI,UAAU,WAAM,UAAU,GAAG,UAAU,KAAK,OAAO,MAAM,EAAE,EAAE;AAC9F,UAAM,KAAK,eAAe,IAAI,aAAa,EAAE;AAC7C,UAAM,KAAK,cAAc,IAAI,UAAU,EAAE;AACzC,UAAM,KAAK,iBAAiB,QAAQ,EAAE;AACtC,QAAI,IAAI,WAAW;AACjB,YAAM,KAAK,cAAc,IAAI,UAAU,QAAQ,CAAC,CAAC,EAAE;AAAA,IACrD;AACA,UAAM,KAAK,EAAE;AAAA,EACf;AAEA,QAAM,KAAK,4FAA4F;AAEvG,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/list-suites.ts"],"sourcesContent":["import { listSuites as apiListSuites } from \"../langwatch-api-suites.js\";\n\n/**\n * Handles the platform_list_suites MCP tool invocation.\n */\nexport async function handleListSuites(params: {\n format?: \"digest\" | \"json\";\n}): Promise<string> {\n const suites = await apiListSuites();\n\n if (params.format === \"json\") {\n return JSON.stringify(suites, null, 2);\n }\n\n if (!Array.isArray(suites) || suites.length === 0) {\n return \"No suites (run plans) found in this project.\\n\\n> Tip: Use `platform_create_suite` to create your first suite.\";\n }\n\n const lines: string[] = [];\n lines.push(`# Suites / Run Plans (${suites.length} total)\\n`);\n\n for (const s of suites) {\n lines.push(`## ${s.name}`);\n lines.push(`**ID**: ${s.id}`);\n lines.push(`**Slug**: ${s.slug}`);\n lines.push(`**Scenarios**: ${s.scenarioIds.length}`);\n lines.push(`**Targets**: ${s.targets.length} (${s.targets.map((t) => `${t.type}:${t.referenceId}`).join(\", \")})`);\n lines.push(`**Repeat**: ${s.repeatCount}x`);\n if (s.description) {\n lines.push(`**Description**: ${s.description}`);\n }\n if (Array.isArray(s.labels) && s.labels.length > 0) {\n lines.push(`**Labels**: ${s.labels.join(\", \")}`);\n }\n lines.push(\"\");\n }\n\n lines.push(\n \"> Use `platform_get_suite` with the ID to see full details, or `platform_run_suite` to trigger execution.\"\n );\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;AAKA,eAAsB,iBAAiB,QAEnB;AAClB,QAAM,SAAS,MAAM,WAAc;AAEnC,MAAI,OAAO,WAAW,QAAQ;AAC5B,WAAO,KAAK,UAAU,QAAQ,MAAM,CAAC;AAAA,EACvC;AAEA,MAAI,CAAC,MAAM,QAAQ,MAAM,KAAK,OAAO,WAAW,GAAG;AACjD,WAAO;AAAA,EACT;AAEA,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,yBAAyB,OAAO,MAAM;AAAA,CAAW;AAE5D,aAAW,KAAK,QAAQ;AACtB,UAAM,KAAK,MAAM,EAAE,IAAI,EAAE;AACzB,UAAM,KAAK,WAAW,EAAE,EAAE,EAAE;AAC5B,UAAM,KAAK,aAAa,EAAE,IAAI,EAAE;AAChC,UAAM,KAAK,kBAAkB,EAAE,YAAY,MAAM,EAAE;AACnD,UAAM,KAAK,gBAAgB,EAAE,QAAQ,MAAM,KAAK,EAAE,QAAQ,IAAI,CAAC,MAAM,GAAG,EAAE,IAAI,IAAI,EAAE,WAAW,EAAE,EAAE,KAAK,IAAI,CAAC,GAAG;AAChH,UAAM,KAAK,eAAe,EAAE,WAAW,GAAG;AAC1C,QAAI,EAAE,aAAa;AACjB,YAAM,KAAK,oBAAoB,EAAE,WAAW,EAAE;AAAA,IAChD;AACA,QAAI,MAAM,QAAQ,EAAE,MAAM,KAAK,EAAE,OAAO,SAAS,GAAG;AAClD,YAAM,KAAK,eAAe,EAAE,OAAO,KAAK,IAAI,CAAC,EAAE;AAAA,IACjD;AACA,UAAM,KAAK,EAAE;AAAA,EACf;AAEA,QAAM;AAAA,IACJ;AAAA,EACF;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/list-workflows.ts"],"sourcesContent":["import { listWorkflows as apiListWorkflows } from \"../langwatch-api-workflows.js\";\n\nexport async function handleListWorkflows(): Promise<string> {\n const workflows = await apiListWorkflows();\n\n if (!Array.isArray(workflows) || workflows.length === 0) {\n return \"No workflows found in this project.\";\n }\n\n const lines: string[] = [];\n lines.push(`# Workflows (${workflows.length} total)\\n`);\n\n for (const w of workflows) {\n const tags: string[] = [];\n if (w.isEvaluator) tags.push(\"evaluator\");\n if (w.isComponent) tags.push(\"component\");\n const tagStr = tags.length > 0 ? ` [${tags.join(\", \")}]` : \"\";\n\n lines.push(`## ${w.name}${tagStr}`);\n lines.push(`**ID**: ${w.id}`);\n if (w.description) lines.push(`**Description**: ${w.description}`);\n lines.push(`**Updated**: ${w.updatedAt}`);\n lines.push(\"\");\n }\n\n lines.push(\n \"> Use `platform_get_workflow` with the ID to see full workflow details.\",\n );\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;AAEA,eAAsB,sBAAuC;AAC3D,QAAM,YAAY,MAAM,cAAiB;AAEzC,MAAI,CAAC,MAAM,QAAQ,SAAS,KAAK,UAAU,WAAW,GAAG;AACvD,WAAO;AAAA,EACT;AAEA,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,gBAAgB,UAAU,MAAM;AAAA,CAAW;AAEtD,aAAW,KAAK,WAAW;AACzB,UAAM,OAAiB,CAAC;AACxB,QAAI,EAAE,YAAa,MAAK,KAAK,WAAW;AACxC,QAAI,EAAE,YAAa,MAAK,KAAK,WAAW;AACxC,UAAM,SAAS,KAAK,SAAS,IAAI,KAAK,KAAK,KAAK,IAAI,CAAC,MAAM;AAE3D,UAAM,KAAK,MAAM,EAAE,IAAI,GAAG,MAAM,EAAE;AAClC,UAAM,KAAK,WAAW,EAAE,EAAE,EAAE;AAC5B,QAAI,EAAE,YAAa,OAAM,KAAK,oBAAoB,EAAE,WAAW,EAAE;AACjE,UAAM,KAAK,gBAAgB,EAAE,SAAS,EAAE;AACxC,UAAM,KAAK,EAAE;AAAA,EACf;AAEA,QAAM;AAAA,IACJ;AAAA,EACF;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/rename-prompt-tag.ts"],"sourcesContent":["import { renamePromptTag as apiRenamePromptTag } from \"../langwatch-api.js\";\n\nexport async function handleRenamePromptTag(params: {\n tag: string;\n name: string;\n}): Promise<string> {\n await apiRenamePromptTag({ tag: params.tag, name: params.name });\n\n const lines: string[] = [];\n lines.push(\"Tag renamed successfully!\\n\");\n lines.push(`**Old name**: ${params.tag}`);\n lines.push(`**New name**: ${params.name}`);\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;AAEA,eAAsB,sBAAsB,QAGxB;AAClB,QAAM,gBAAmB,EAAE,KAAK,OAAO,KAAK,MAAM,OAAO,KAAK,CAAC;AAE/D,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,6BAA6B;AACxC,QAAM,KAAK,iBAAiB,OAAO,GAAG,EAAE;AACxC,QAAM,KAAK,iBAAiB,OAAO,IAAI,EAAE;AACzC,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/run-agent.ts"],"sourcesContent":["import { runAgent as apiRunAgent } from \"../langwatch-api-agents.js\";\n\n/**\n * Handles the platform_run_agent MCP tool invocation.\n */\nexport async function handleRunAgent(params: {\n id: string;\n input?: string;\n}): Promise<string> {\n let parsedInput: Record<string, unknown> = {};\n if (params.input) {\n try {\n parsedInput = JSON.parse(params.input) as Record<string, unknown>;\n } catch {\n return \"Error: `input` must be a valid JSON object.\";\n }\n }\n\n const { agentType, result } = await apiRunAgent(params.id, parsedInput);\n\n const lines: string[] = [];\n lines.push(`Agent executed successfully (type: ${agentType}).\\n`);\n\n if (typeof result === \"object\" && result !== null) {\n const output = (result as Record<string, unknown>).output;\n if (output !== undefined) {\n lines.push(\"**Output:**\");\n lines.push(typeof output === \"string\" ? output : JSON.stringify(output, null, 2));\n } else {\n lines.push(\"**Result:**\");\n lines.push(JSON.stringify(result, null, 2));\n }\n }\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;AAKA,eAAsB,eAAe,QAGjB;AAClB,MAAI,cAAuC,CAAC;AAC5C,MAAI,OAAO,OAAO;AAChB,QAAI;AACF,oBAAc,KAAK,MAAM,OAAO,KAAK;AAAA,IACvC,QAAQ;AACN,aAAO;AAAA,IACT;AAAA,EACF;AAEA,QAAM,EAAE,WAAW,OAAO,IAAI,MAAM,SAAY,OAAO,IAAI,WAAW;AAEtE,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,sCAAsC,SAAS;AAAA,CAAM;AAEhE,MAAI,OAAO,WAAW,YAAY,WAAW,MAAM;AACjD,UAAM,SAAU,OAAmC;AACnD,QAAI,WAAW,QAAW;AACxB,YAAM,KAAK,aAAa;AACxB,YAAM,KAAK,OAAO,WAAW,WAAW,SAAS,KAAK,UAAU,QAAQ,MAAM,CAAC,CAAC;AAAA,IAClF,OAAO;AACL,YAAM,KAAK,aAAa;AACxB,YAAM,KAAK,KAAK,UAAU,QAAQ,MAAM,CAAC,CAAC;AAAA,IAC5C;AAAA,EACF;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/run-evaluation.ts"],"sourcesContent":["import { makeRequest } from \"../langwatch-api.js\";\n\ninterface EvaluationRunResponse {\n runId: string;\n status: string;\n total: number;\n runUrl?: string;\n}\n\ninterface EvaluationStatusResponse {\n runId: string;\n status: string;\n progress: number;\n total: number;\n startedAt?: number;\n finishedAt?: number;\n summary?: {\n totalCells?: number;\n completedCells?: number;\n failedCells?: number;\n duration?: number;\n runUrl?: string;\n };\n}\n\nexport async function handleRunEvaluation(params: {\n slug: string;\n}): Promise<string> {\n const result = (await makeRequest(\n \"POST\",\n `/api/evaluations/v3/${encodeURIComponent(params.slug)}/run`,\n )) as EvaluationRunResponse;\n\n const lines: string[] = [];\n lines.push(`Evaluation started!\\n`);\n lines.push(`**Run ID**: ${result.runId}`);\n lines.push(`**Status**: ${result.status}`);\n lines.push(`**Total cells**: ${result.total}`);\n if (result.runUrl) lines.push(`**View at**: ${result.runUrl}`);\n lines.push(\"\");\n lines.push(\n `> Use \\`platform_evaluation_status\\` with run ID \"${result.runId}\" to check progress.`,\n );\n\n return lines.join(\"\\n\");\n}\n\nexport async function handleEvaluationStatus(params: {\n runId: string;\n}): Promise<string> {\n const status = (await makeRequest(\n \"GET\",\n `/api/evaluations/v3/runs/${encodeURIComponent(params.runId)}`,\n )) as EvaluationStatusResponse;\n\n const lines: string[] = [];\n lines.push(`# Evaluation Run ${status.runId}\\n`);\n lines.push(`**Status**: ${status.status}`);\n lines.push(`**Progress**: ${status.progress}/${status.total} cells`);\n\n if (status.startedAt) {\n lines.push(`**Started**: ${new Date(status.startedAt).toISOString()}`);\n }\n if (status.finishedAt) {\n lines.push(`**Finished**: ${new Date(status.finishedAt).toISOString()}`);\n }\n\n if (status.summary) {\n lines.push(\"\\n## Summary\\n\");\n if (status.summary.completedCells !== undefined) {\n lines.push(`**Completed**: ${status.summary.completedCells}`);\n }\n if (status.summary.failedCells) {\n lines.push(`**Failed**: ${status.summary.failedCells}`);\n }\n if (status.summary.duration) {\n lines.push(\n `**Duration**: ${(status.summary.duration / 1000).toFixed(1)}s`,\n );\n }\n if (status.summary.runUrl) {\n lines.push(`**View results**: ${status.summary.runUrl}`);\n }\n }\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;AAyBA,eAAsB,oBAAoB,QAEtB;AAClB,QAAM,SAAU,MAAM;AAAA,IACpB;AAAA,IACA,uBAAuB,mBAAmB,OAAO,IAAI,CAAC;AAAA,EACxD;AAEA,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK;AAAA,CAAuB;AAClC,QAAM,KAAK,eAAe,OAAO,KAAK,EAAE;AACxC,QAAM,KAAK,eAAe,OAAO,MAAM,EAAE;AACzC,QAAM,KAAK,oBAAoB,OAAO,KAAK,EAAE;AAC7C,MAAI,OAAO,OAAQ,OAAM,KAAK,gBAAgB,OAAO,MAAM,EAAE;AAC7D,QAAM,KAAK,EAAE;AACb,QAAM;AAAA,IACJ,qDAAqD,OAAO,KAAK;AAAA,EACnE;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;AAEA,eAAsB,uBAAuB,QAEzB;AAClB,QAAM,SAAU,MAAM;AAAA,IACpB;AAAA,IACA,4BAA4B,mBAAmB,OAAO,KAAK,CAAC;AAAA,EAC9D;AAEA,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,oBAAoB,OAAO,KAAK;AAAA,CAAI;AAC/C,QAAM,KAAK,eAAe,OAAO,MAAM,EAAE;AACzC,QAAM,KAAK,iBAAiB,OAAO,QAAQ,IAAI,OAAO,KAAK,QAAQ;AAEnE,MAAI,OAAO,WAAW;AACpB,UAAM,KAAK,gBAAgB,IAAI,KAAK,OAAO,SAAS,EAAE,YAAY,CAAC,EAAE;AAAA,EACvE;AACA,MAAI,OAAO,YAAY;AACrB,UAAM,KAAK,iBAAiB,IAAI,KAAK,OAAO,UAAU,EAAE,YAAY,CAAC,EAAE;AAAA,EACzE;AAEA,MAAI,OAAO,SAAS;AAClB,UAAM,KAAK,gBAAgB;AAC3B,QAAI,OAAO,QAAQ,mBAAmB,QAAW;AAC/C,YAAM,KAAK,kBAAkB,OAAO,QAAQ,cAAc,EAAE;AAAA,IAC9D;AACA,QAAI,OAAO,QAAQ,aAAa;AAC9B,YAAM,KAAK,eAAe,OAAO,QAAQ,WAAW,EAAE;AAAA,IACxD;AACA,QAAI,OAAO,QAAQ,UAAU;AAC3B,YAAM;AAAA,QACJ,kBAAkB,OAAO,QAAQ,WAAW,KAAM,QAAQ,CAAC,CAAC;AAAA,MAC9D;AAAA,IACF;AACA,QAAI,OAAO,QAAQ,QAAQ;AACzB,YAAM,KAAK,qBAAqB,OAAO,QAAQ,MAAM,EAAE;AAAA,IACzD;AAAA,EACF;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/run-suite.ts"],"sourcesContent":["import { runSuite as apiRunSuite } from \"../langwatch-api-suites.js\";\n\n/**\n * Handles the platform_run_suite MCP tool invocation.\n */\nexport async function handleRunSuite(params: {\n id: string;\n}): Promise<string> {\n const result = await apiRunSuite(params.id);\n\n const lines: string[] = [];\n lines.push(`Suite run scheduled successfully.`);\n lines.push(\"\");\n lines.push(`**Batch Run ID**: ${result.batchRunId}`);\n lines.push(`**Jobs**: ${result.jobCount}`);\n lines.push(`**Set ID**: ${result.setId}`);\n\n if (result.skippedArchived.scenarios.length > 0) {\n lines.push(`\\n⚠️ Skipped archived scenarios: ${result.skippedArchived.scenarios.join(\", \")}`);\n }\n if (result.skippedArchived.targets.length > 0) {\n lines.push(`⚠️ Skipped archived targets: ${result.skippedArchived.targets.join(\", \")}`);\n }\n\n lines.push(\"\\nView results in the LangWatch dashboard under Simulations.\");\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;AAKA,eAAsB,eAAe,QAEjB;AAClB,QAAM,SAAS,MAAM,SAAY,OAAO,EAAE;AAE1C,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,mCAAmC;AAC9C,QAAM,KAAK,EAAE;AACb,QAAM,KAAK,qBAAqB,OAAO,UAAU,EAAE;AACnD,QAAM,KAAK,aAAa,OAAO,QAAQ,EAAE;AACzC,QAAM,KAAK,eAAe,OAAO,KAAK,EAAE;AAExC,MAAI,OAAO,gBAAgB,UAAU,SAAS,GAAG;AAC/C,UAAM,KAAK;AAAA,2CAAoC,OAAO,gBAAgB,UAAU,KAAK,IAAI,CAAC,EAAE;AAAA,EAC9F;AACA,MAAI,OAAO,gBAAgB,QAAQ,SAAS,GAAG;AAC7C,UAAM,KAAK,0CAAgC,OAAO,gBAAgB,QAAQ,KAAK,IAAI,CAAC,EAAE;AAAA,EACxF;AAEA,QAAM,KAAK,8DAA8D;AAEzE,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/run-workflow.ts"],"sourcesContent":["import { runWorkflow as apiRunWorkflow } from \"../langwatch-api-workflows.js\";\n\n/**\n * Handles the platform_run_workflow MCP tool invocation.\n */\nexport async function handleRunWorkflow(params: {\n id: string;\n input?: string;\n}): Promise<string> {\n let parsedInput: Record<string, unknown> = {};\n if (params.input) {\n try {\n parsedInput = JSON.parse(params.input) as Record<string, unknown>;\n } catch {\n return \"Error: `input` must be a valid JSON object.\";\n }\n }\n\n const result = await apiRunWorkflow(params.id, parsedInput);\n\n const lines: string[] = [];\n lines.push(`Workflow \"${params.id}\" executed successfully.\\n`);\n\n if (typeof result === \"object\" && result !== null) {\n const output = (result as Record<string, unknown>).output;\n if (output !== undefined) {\n lines.push(\"**Output:**\");\n lines.push(typeof output === \"string\" ? output : JSON.stringify(output, null, 2));\n } else {\n lines.push(\"**Result:**\");\n lines.push(JSON.stringify(result, null, 2));\n }\n }\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;AAKA,eAAsB,kBAAkB,QAGpB;AAClB,MAAI,cAAuC,CAAC;AAC5C,MAAI,OAAO,OAAO;AAChB,QAAI;AACF,oBAAc,KAAK,MAAM,OAAO,KAAK;AAAA,IACvC,QAAQ;AACN,aAAO;AAAA,IACT;AAAA,EACF;AAEA,QAAM,SAAS,MAAM,YAAe,OAAO,IAAI,WAAW;AAE1D,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,aAAa,OAAO,EAAE;AAAA,CAA4B;AAE7D,MAAI,OAAO,WAAW,YAAY,WAAW,MAAM;AACjD,UAAM,SAAU,OAAmC;AACnD,QAAI,WAAW,QAAW;AACxB,YAAM,KAAK,aAAa;AACxB,YAAM,KAAK,OAAO,WAAW,WAAW,SAAS,KAAK,UAAU,QAAQ,MAAM,CAAC,CAAC;AAAA,IAClF,OAAO;AACL,YAAM,KAAK,aAAa;AACxB,YAAM,KAAK,KAAK,UAAU,QAAQ,MAAM,CAAC,CAAC;AAAA,IAC5C;AAAA,EACF;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/search-traces.ts"],"sourcesContent":["import { searchTraces as apiSearchTraces } from \"../langwatch-api.js\";\nimport { parseRelativeDate } from \"../utils/date-parsing.js\";\n\n/**\n * Handles the search_traces MCP tool invocation.\n *\n * Searches LangWatch traces with optional filters, text query, and date range.\n * In digest mode (default), returns AI-readable formatted digests per trace.\n * In json mode, returns the full raw JSON.\n */\nexport async function handleSearchTraces(params: {\n query?: string;\n filters?: Record<string, string[]>;\n startDate?: string;\n endDate?: string;\n pageSize?: number;\n scrollId?: string;\n format?: \"digest\" | \"json\";\n}): Promise<string> {\n const now = Date.now();\n const startDate = params.startDate\n ? parseRelativeDate(params.startDate)\n : now - 86400000;\n const endDate = params.endDate ? parseRelativeDate(params.endDate) : now;\n const format = params.format ?? \"digest\";\n\n const result = await apiSearchTraces({\n query: params.query,\n filters: params.filters,\n startDate,\n endDate,\n pageSize: params.pageSize ?? 25,\n scrollId: params.scrollId,\n format,\n });\n\n const traces = result.traces ?? [];\n if (traces.length === 0) {\n return \"No traces found matching your query.\";\n }\n\n if (format === \"json\") {\n return JSON.stringify(result, null, 2);\n }\n\n const lines: string[] = [];\n lines.push(\n `Found ${result.pagination?.totalHits ?? traces.length} traces:\\n`\n );\n\n for (const trace of traces) {\n lines.push(`### Trace: ${trace.trace_id}`);\n\n if (trace.formatted_trace) {\n lines.push(trace.formatted_trace);\n } else {\n const inputStr = trace.input?.value\n ? String(trace.input.value)\n : \"N/A\";\n const outputStr = trace.output?.value\n ? String(trace.output.value)\n : \"N/A\";\n lines.push(\n `- **Input**: ${inputStr.slice(0, 100)}${inputStr.length > 100 ? \"...\" : \"\"}`\n );\n lines.push(\n `- **Output**: ${outputStr.slice(0, 100)}${outputStr.length > 100 ? \"...\" : \"\"}`\n );\n }\n\n if (trace.timestamps) {\n lines.push(`- **Time**: ${trace.timestamps.started_at || \"N/A\"}`);\n }\n if (trace.error) {\n lines.push(`- **Error**: ${JSON.stringify(trace.error)}`);\n }\n lines.push(\"\");\n }\n\n if (result.pagination?.scrollId) {\n lines.push(\n `\\n**More results available.** Use scrollId: \"${result.pagination.scrollId}\" to get next page.`\n );\n }\n\n lines.push(\n '\\n> Tip: Use `get_trace` with a trace_id for full details. Use `search_traces` with `format: \"json\"` for raw data. Use `discover_schema` to see available filter fields.'\n );\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;;;AAUA,eAAsB,mBAAmB,QAQrB;AAClB,QAAM,MAAM,KAAK,IAAI;AACrB,QAAM,YAAY,OAAO,YACrB,kBAAkB,OAAO,SAAS,IAClC,MAAM;AACV,QAAM,UAAU,OAAO,UAAU,kBAAkB,OAAO,OAAO,IAAI;AACrE,QAAM,SAAS,OAAO,UAAU;AAEhC,QAAM,SAAS,MAAM,aAAgB;AAAA,IACnC,OAAO,OAAO;AAAA,IACd,SAAS,OAAO;AAAA,IAChB;AAAA,IACA;AAAA,IACA,UAAU,OAAO,YAAY;AAAA,IAC7B,UAAU,OAAO;AAAA,IACjB;AAAA,EACF,CAAC;AAED,QAAM,SAAS,OAAO,UAAU,CAAC;AACjC,MAAI,OAAO,WAAW,GAAG;AACvB,WAAO;AAAA,EACT;AAEA,MAAI,WAAW,QAAQ;AACrB,WAAO,KAAK,UAAU,QAAQ,MAAM,CAAC;AAAA,EACvC;AAEA,QAAM,QAAkB,CAAC;AACzB,QAAM;AAAA,IACJ,SAAS,OAAO,YAAY,aAAa,OAAO,MAAM;AAAA;AAAA,EACxD;AAEA,aAAW,SAAS,QAAQ;AAC1B,UAAM,KAAK,cAAc,MAAM,QAAQ,EAAE;AAEzC,QAAI,MAAM,iBAAiB;AACzB,YAAM,KAAK,MAAM,eAAe;AAAA,IAClC,OAAO;AACL,YAAM,WAAW,MAAM,OAAO,QAC1B,OAAO,MAAM,MAAM,KAAK,IACxB;AACJ,YAAM,YAAY,MAAM,QAAQ,QAC5B,OAAO,MAAM,OAAO,KAAK,IACzB;AACJ,YAAM;AAAA,QACJ,gBAAgB,SAAS,MAAM,GAAG,GAAG,CAAC,GAAG,SAAS,SAAS,MAAM,QAAQ,EAAE;AAAA,MAC7E;AACA,YAAM;AAAA,QACJ,iBAAiB,UAAU,MAAM,GAAG,GAAG,CAAC,GAAG,UAAU,SAAS,MAAM,QAAQ,EAAE;AAAA,MAChF;AAAA,IACF;AAEA,QAAI,MAAM,YAAY;AACpB,YAAM,KAAK,eAAe,MAAM,WAAW,cAAc,KAAK,EAAE;AAAA,IAClE;AACA,QAAI,MAAM,OAAO;AACf,YAAM,KAAK,gBAAgB,KAAK,UAAU,MAAM,KAAK,CAAC,EAAE;AAAA,IAC1D;AACA,UAAM,KAAK,EAAE;AAAA,EACf;AAEA,MAAI,OAAO,YAAY,UAAU;AAC/B,UAAM;AAAA,MACJ;AAAA,6CAAgD,OAAO,WAAW,QAAQ;AAAA,IAC5E;AAAA,EACF;AAEA,QAAM;AAAA,IACJ;AAAA,EACF;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/set-model-provider.ts"],"sourcesContent":["import { setModelProvider as apiSetModelProvider } from \"../langwatch-api-model-providers.js\";\n\n/**\n * Handles the platform_set_model_provider MCP tool invocation.\n *\n * Creates or updates a model provider configuration, including API keys.\n * Returns confirmation with the updated provider status.\n */\nexport async function handleSetModelProvider(params: {\n provider: string;\n enabled: boolean;\n customKeys?: Record<string, unknown>;\n defaultModel?: string;\n}): Promise<string> {\n const providers = await apiSetModelProvider(params);\n\n const updated = providers[params.provider];\n\n if (!updated) {\n throw new Error(\n `Model provider \"${params.provider}\" was not found in the response. The provider name may be invalid.`\n );\n }\n\n const lines: string[] = [];\n lines.push(\"Model provider updated successfully!\\n\");\n lines.push(`**Provider**: ${params.provider}`);\n lines.push(`**Status**: ${updated?.enabled ? \"enabled\" : \"disabled\"}`);\n\n if (updated?.customKeys) {\n const keyFields = Object.entries(updated.customKeys)\n .map(([k, v]) => `${k}: ${v ? \"set\" : \"not set\"}`)\n .join(\", \");\n lines.push(`**Keys**: ${keyFields}`);\n }\n\n if (params.defaultModel) {\n // Show the normalized model name (with provider prefix)\n const normalizedModel = params.defaultModel.includes(\"/\")\n ? params.defaultModel\n : `${params.provider}/${params.defaultModel}`;\n lines.push(`**Default Model**: ${normalizedModel}`);\n }\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;AAQA,eAAsB,uBAAuB,QAKzB;AAClB,QAAM,YAAY,MAAM,iBAAoB,MAAM;AAElD,QAAM,UAAU,UAAU,OAAO,QAAQ;AAEzC,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI;AAAA,MACR,mBAAmB,OAAO,QAAQ;AAAA,IACpC;AAAA,EACF;AAEA,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,wCAAwC;AACnD,QAAM,KAAK,iBAAiB,OAAO,QAAQ,EAAE;AAC7C,QAAM,KAAK,eAAe,SAAS,UAAU,YAAY,UAAU,EAAE;AAErE,MAAI,SAAS,YAAY;AACvB,UAAM,YAAY,OAAO,QAAQ,QAAQ,UAAU,EAChD,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,KAAK,IAAI,QAAQ,SAAS,EAAE,EAChD,KAAK,IAAI;AACZ,UAAM,KAAK,aAAa,SAAS,EAAE;AAAA,EACrC;AAEA,MAAI,OAAO,cAAc;AAEvB,UAAM,kBAAkB,OAAO,aAAa,SAAS,GAAG,IACpD,OAAO,eACP,GAAG,OAAO,QAAQ,IAAI,OAAO,YAAY;AAC7C,UAAM,KAAK,sBAAsB,eAAe,EAAE;AAAA,EACpD;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/update-agent.ts"],"sourcesContent":["import { updateAgent as apiUpdateAgent } from \"../langwatch-api-agents.js\";\n\nexport async function handleUpdateAgent(params: {\n id: string;\n name?: string;\n type?: string;\n config?: Record<string, unknown>;\n}): Promise<string> {\n const { id, ...data } = params;\n const agent = await apiUpdateAgent({ id, ...data });\n\n return `Agent updated successfully!\\n\\n**Name**: ${agent.name}\\n**ID**: ${agent.id}\\n**Type**: ${agent.type}`;\n}\n"],"mappings":";;;;;;;AAEA,eAAsB,kBAAkB,QAKpB;AAClB,QAAM,EAAE,IAAI,GAAG,KAAK,IAAI;AACxB,QAAM,QAAQ,MAAM,YAAe,EAAE,IAAI,GAAG,KAAK,CAAC;AAElD,SAAO;AAAA;AAAA,YAA4C,MAAM,IAAI;AAAA,UAAa,MAAM,EAAE;AAAA,YAAe,MAAM,IAAI;AAC7G;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/update-dataset.ts"],"sourcesContent":["import { updateDataset as apiUpdateDataset } from \"../langwatch-api-datasets.js\";\nimport type { DatasetColumnType } from \"../langwatch-api-datasets.js\";\nimport { formatDatasetMutationDetails } from \"./format-dataset-mutation.js\";\n\n/**\n * Handles the platform_update_dataset MCP tool invocation.\n *\n * Updates an existing dataset and returns a confirmation\n * with the updated details.\n */\nexport async function handleUpdateDataset(params: {\n slugOrId: string;\n name?: string;\n columnTypes?: DatasetColumnType[];\n}): Promise<string> {\n const result = await apiUpdateDataset(params);\n\n const lines: string[] = [];\n lines.push(\"Dataset updated successfully!\\n\");\n lines.push(...formatDatasetMutationDetails(result));\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;;;;;AAUA,eAAsB,oBAAoB,QAItB;AAClB,QAAM,SAAS,MAAM,cAAiB,MAAM;AAE5C,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,iCAAiC;AAC5C,QAAM,KAAK,GAAG,6BAA6B,MAAM,CAAC;AAElD,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/update-dataset-record.ts"],"sourcesContent":["import { updateDatasetRecord as apiUpdateDatasetRecord } from \"../langwatch-api-datasets.js\";\n\n/**\n * Handles the platform_update_dataset_record MCP tool invocation.\n *\n * Updates a single record in a dataset and returns confirmation.\n */\nexport async function handleUpdateDatasetRecord(params: {\n slugOrId: string;\n recordId: string;\n entry: Record<string, unknown>;\n}): Promise<string> {\n const result = await apiUpdateDatasetRecord(params);\n\n const lines: string[] = [];\n lines.push(\"Record updated successfully!\\n\");\n lines.push(`**Record ID**: ${result.id}`);\n lines.push(`**Entry**: ${JSON.stringify(result.entry)}`);\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;AAOA,eAAsB,0BAA0B,QAI5B;AAClB,QAAM,SAAS,MAAM,oBAAuB,MAAM;AAElD,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,gCAAgC;AAC3C,QAAM,KAAK,kBAAkB,OAAO,EAAE,EAAE;AACxC,QAAM,KAAK,cAAc,KAAK,UAAU,OAAO,KAAK,CAAC,EAAE;AAEvD,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/update-evaluator.ts"],"sourcesContent":["import {\n updateEvaluator as apiUpdateEvaluator,\n getEvaluatorType,\n} from \"../langwatch-api-evaluators.js\";\n\n/**\n * Handles the platform_update_evaluator MCP tool invocation.\n *\n * Updates an existing evaluator and returns a confirmation\n * with the updated details.\n */\nexport async function handleUpdateEvaluator(params: {\n evaluatorId: string;\n name?: string;\n config?: Record<string, unknown>;\n}): Promise<string> {\n const { evaluatorId, ...data } = params;\n const result = await apiUpdateEvaluator({ id: evaluatorId, ...data });\n\n const evaluatorType = getEvaluatorType(result);\n\n const lines: string[] = [];\n lines.push(\"Evaluator updated successfully!\\n\");\n lines.push(`**ID**: ${result.id}`);\n if (result.slug) lines.push(`**Slug**: ${result.slug}`);\n lines.push(`**Name**: ${result.name}`);\n if (evaluatorType) lines.push(`**Evaluator Type**: ${evaluatorType}`);\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;;AAWA,eAAsB,sBAAsB,QAIxB;AAClB,QAAM,EAAE,aAAa,GAAG,KAAK,IAAI;AACjC,QAAM,SAAS,MAAM,gBAAmB,EAAE,IAAI,aAAa,GAAG,KAAK,CAAC;AAEpE,QAAM,gBAAgB,iBAAiB,MAAM;AAE7C,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,mCAAmC;AAC9C,QAAM,KAAK,WAAW,OAAO,EAAE,EAAE;AACjC,MAAI,OAAO,KAAM,OAAM,KAAK,aAAa,OAAO,IAAI,EAAE;AACtD,QAAM,KAAK,aAAa,OAAO,IAAI,EAAE;AACrC,MAAI,cAAe,OAAM,KAAK,uBAAuB,aAAa,EAAE;AAEpE,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/update-prompt.ts"],"sourcesContent":["import { updatePrompt as apiUpdatePrompt } from \"../langwatch-api.js\";\n\n/**\n * Handles the platform_update_prompt MCP tool invocation.\n *\n * Updates an existing prompt via the PUT endpoint.\n * Every update with a commitMessage creates a new version automatically.\n */\nexport async function handleUpdatePrompt(params: {\n idOrHandle: string;\n messages?: Array<{ role: string; content: string }>;\n model?: string;\n commitMessage: string;\n tags?: string[];\n}): Promise<string> {\n const { idOrHandle, ...data } = params;\n\n const result = await apiUpdatePrompt(idOrHandle, data);\n\n const lines: string[] = [];\n lines.push(\"Prompt updated successfully!\\n\");\n if (result.id) lines.push(`**ID**: ${result.id}`);\n if (result.handle) lines.push(`**Handle**: ${result.handle}`);\n if (result.latestVersionNumber != null)\n lines.push(`**Version**: v${result.latestVersionNumber}`);\n lines.push(`**Commit**: ${params.commitMessage}`);\n if (params.tags && params.tags.length > 0)\n lines.push(`**Tags**: ${params.tags.join(\", \")}`);\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;AAQA,eAAsB,mBAAmB,QAMrB;AAClB,QAAM,EAAE,YAAY,GAAG,KAAK,IAAI;AAEhC,QAAM,SAAS,MAAM,aAAgB,YAAY,IAAI;AAErD,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,gCAAgC;AAC3C,MAAI,OAAO,GAAI,OAAM,KAAK,WAAW,OAAO,EAAE,EAAE;AAChD,MAAI,OAAO,OAAQ,OAAM,KAAK,eAAe,OAAO,MAAM,EAAE;AAC5D,MAAI,OAAO,uBAAuB;AAChC,UAAM,KAAK,iBAAiB,OAAO,mBAAmB,EAAE;AAC1D,QAAM,KAAK,eAAe,OAAO,aAAa,EAAE;AAChD,MAAI,OAAO,QAAQ,OAAO,KAAK,SAAS;AACtC,UAAM,KAAK,aAAa,OAAO,KAAK,KAAK,IAAI,CAAC,EAAE;AAElD,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/update-scenario.ts"],"sourcesContent":["import { updateScenario as apiUpdateScenario } from \"../langwatch-api-scenarios.js\";\n\n/**\n * Handles the platform_update_scenario MCP tool invocation.\n *\n * Updates an existing scenario and returns a confirmation\n * with the updated details.\n */\nexport async function handleUpdateScenario(params: {\n scenarioId: string;\n name?: string;\n situation?: string;\n criteria?: string[];\n labels?: string[];\n}): Promise<string> {\n const { scenarioId, ...data } = params;\n const result = await apiUpdateScenario({ id: scenarioId, ...data });\n\n const lines: string[] = [];\n lines.push(\"Scenario updated successfully!\\n\");\n lines.push(`**ID**: ${result.id}`);\n lines.push(`**Name**: ${result.name}`);\n if (result.situation) lines.push(`**Situation**: ${result.situation}`);\n if (Array.isArray(result.criteria) && result.criteria.length > 0) {\n lines.push(`**Criteria**: ${result.criteria.length} criteria`);\n }\n if (Array.isArray(result.labels) && result.labels.length > 0) {\n lines.push(`**Labels**: ${result.labels.join(\", \")}`);\n }\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;AAQA,eAAsB,qBAAqB,QAMvB;AAClB,QAAM,EAAE,YAAY,GAAG,KAAK,IAAI;AAChC,QAAM,SAAS,MAAM,eAAkB,EAAE,IAAI,YAAY,GAAG,KAAK,CAAC;AAElE,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,kCAAkC;AAC7C,QAAM,KAAK,WAAW,OAAO,EAAE,EAAE;AACjC,QAAM,KAAK,aAAa,OAAO,IAAI,EAAE;AACrC,MAAI,OAAO,UAAW,OAAM,KAAK,kBAAkB,OAAO,SAAS,EAAE;AACrE,MAAI,MAAM,QAAQ,OAAO,QAAQ,KAAK,OAAO,SAAS,SAAS,GAAG;AAChE,UAAM,KAAK,iBAAiB,OAAO,SAAS,MAAM,WAAW;AAAA,EAC/D;AACA,MAAI,MAAM,QAAQ,OAAO,MAAM,KAAK,OAAO,OAAO,SAAS,GAAG;AAC5D,UAAM,KAAK,eAAe,OAAO,OAAO,KAAK,IAAI,CAAC,EAAE;AAAA,EACtD;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools/update-suite.ts"],"sourcesContent":["import { updateSuite as apiUpdateSuite } from \"../langwatch-api-suites.js\";\nimport type { SuiteTarget } from \"../langwatch-api-suites.js\";\n\n/**\n * Handles the platform_update_suite MCP tool invocation.\n */\nexport async function handleUpdateSuite(params: {\n id: string;\n name?: string;\n description?: string;\n scenarioIds?: string[];\n targets?: string;\n repeatCount?: number;\n labels?: string[];\n}): Promise<string> {\n let parsedTargets: SuiteTarget[] | undefined;\n if (params.targets) {\n try {\n parsedTargets = JSON.parse(params.targets) as SuiteTarget[];\n } catch {\n return \"Error: `targets` must be a valid JSON array.\";\n }\n }\n\n const suite = await apiUpdateSuite({\n id: params.id,\n name: params.name,\n description: params.description,\n scenarioIds: params.scenarioIds,\n targets: parsedTargets,\n repeatCount: params.repeatCount,\n labels: params.labels,\n });\n\n return [\n `Suite \"${suite.name}\" updated successfully.`,\n \"\",\n `**ID**: ${suite.id}`,\n `**Slug**: ${suite.slug}`,\n `**Scenarios**: ${suite.scenarioIds.length}`,\n `**Targets**: ${suite.targets.length}`,\n `**Repeat**: ${suite.repeatCount}x`,\n ].join(\"\\n\");\n}\n"],"mappings":";;;;;;;AAMA,eAAsB,kBAAkB,QAQpB;AAClB,MAAI;AACJ,MAAI,OAAO,SAAS;AAClB,QAAI;AACF,sBAAgB,KAAK,MAAM,OAAO,OAAO;AAAA,IAC3C,QAAQ;AACN,aAAO;AAAA,IACT;AAAA,EACF;AAEA,QAAM,QAAQ,MAAM,YAAe;AAAA,IACjC,IAAI,OAAO;AAAA,IACX,MAAM,OAAO;AAAA,IACb,aAAa,OAAO;AAAA,IACpB,aAAa,OAAO;AAAA,IACpB,SAAS;AAAA,IACT,aAAa,OAAO;AAAA,IACpB,QAAQ,OAAO;AAAA,EACjB,CAAC;AAED,SAAO;AAAA,IACL,UAAU,MAAM,IAAI;AAAA,IACpB;AAAA,IACA,WAAW,MAAM,EAAE;AAAA,IACnB,aAAa,MAAM,IAAI;AAAA,IACvB,kBAAkB,MAAM,YAAY,MAAM;AAAA,IAC1C,gBAAgB,MAAM,QAAQ,MAAM;AAAA,IACpC,eAAe,MAAM,WAAW;AAAA,EAClC,EAAE,KAAK,IAAI;AACb;","names":[]}
|