langsmith-mcp-server 0.1.1
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/LICENSE +21 -0
- package/README.md +199 -0
- package/dist/common/formatters.d.ts +28 -0
- package/dist/common/formatters.d.ts.map +1 -0
- package/dist/common/formatters.js +150 -0
- package/dist/common/formatters.js.map +1 -0
- package/dist/common/helpers.d.ts +91 -0
- package/dist/common/helpers.d.ts.map +1 -0
- package/dist/common/helpers.js +341 -0
- package/dist/common/helpers.js.map +1 -0
- package/dist/common/pagination.d.ts +36 -0
- package/dist/common/pagination.d.ts.map +1 -0
- package/dist/common/pagination.js +187 -0
- package/dist/common/pagination.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +16 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +20 -0
- package/dist/server.js.map +1 -0
- package/dist/services/register-tools.d.ts +9 -0
- package/dist/services/register-tools.d.ts.map +1 -0
- package/dist/services/register-tools.js +589 -0
- package/dist/services/register-tools.js.map +1 -0
- package/dist/services/tools/datasets.d.ts +60 -0
- package/dist/services/tools/datasets.d.ts.map +1 -0
- package/dist/services/tools/datasets.js +221 -0
- package/dist/services/tools/datasets.js.map +1 -0
- package/dist/services/tools/experiments.d.ts +18 -0
- package/dist/services/tools/experiments.d.ts.map +1 -0
- package/dist/services/tools/experiments.js +81 -0
- package/dist/services/tools/experiments.js.map +1 -0
- package/dist/services/tools/prompts.d.ts +26 -0
- package/dist/services/tools/prompts.d.ts.map +1 -0
- package/dist/services/tools/prompts.js +87 -0
- package/dist/services/tools/prompts.js.map +1 -0
- package/dist/services/tools/traces.d.ts +80 -0
- package/dist/services/tools/traces.d.ts.map +1 -0
- package/dist/services/tools/traces.js +271 -0
- package/dist/services/tools/traces.js.map +1 -0
- package/dist/services/tools/usage.d.ts +16 -0
- package/dist/services/tools/usage.d.ts.map +1 -0
- package/dist/services/tools/usage.js +170 -0
- package/dist/services/tools/usage.js.map +1 -0
- package/package.json +36 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,oBAAoB;AACpB,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,SAAS,CACjC,EAAE,IAAI,EAAE,0BAA0B,EAAE,OAAO,EAAE,OAAO,EAAE,EACtD,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,CAClC,CAAC;AAEF,qCAAqC;AACrC,aAAa,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registration module for LangSmith MCP tools.
|
|
3
|
+
*/
|
|
4
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
5
|
+
/**
|
|
6
|
+
* Register all LangSmith tool-related functionality with the MCP server.
|
|
7
|
+
*/
|
|
8
|
+
export declare function registerTools(server: McpServer): void;
|
|
9
|
+
//# sourceMappingURL=register-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-tools.d.ts","sourceRoot":"","sources":["../../src/services/register-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA8CpE;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAotBrD"}
|
|
@@ -0,0 +1,589 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registration module for LangSmith MCP tools.
|
|
3
|
+
*/
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { getLangSmithClient, getApiKeyAndEndpoint, parseJsonArray, parseJsonObject, parseBoolString, } from "../common/helpers.js";
|
|
6
|
+
import { listDatasetsTool, listExamplesTool, readDatasetTool, readExampleTool, } from "./tools/datasets.js";
|
|
7
|
+
import { listExperimentsTool } from "./tools/experiments.js";
|
|
8
|
+
import { getPromptTool, listPromptsTool } from "./tools/prompts.js";
|
|
9
|
+
import { fetchRunsTool, getThreadHistoryTool, listProjectsTool, } from "./tools/traces.js";
|
|
10
|
+
import { getBillingUsageTool } from "./tools/usage.js";
|
|
11
|
+
/**
|
|
12
|
+
* Helper to return tool result as text content.
|
|
13
|
+
*/
|
|
14
|
+
function toolResult(data) {
|
|
15
|
+
return { content: [{ type: "text", text: JSON.stringify(data) }] };
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Helper to return tool error result.
|
|
19
|
+
*/
|
|
20
|
+
function toolError(message) {
|
|
21
|
+
return {
|
|
22
|
+
content: [{ type: "text", text: JSON.stringify({ error: message }) }],
|
|
23
|
+
isError: true,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Register all LangSmith tool-related functionality with the MCP server.
|
|
28
|
+
*/
|
|
29
|
+
export function registerTools(server) {
|
|
30
|
+
// ── Prompt tools ──────────────────────────────────────────────────
|
|
31
|
+
server.tool("list_prompts", `Fetch prompts from LangSmith with optional filtering.
|
|
32
|
+
|
|
33
|
+
Args:
|
|
34
|
+
is_public (str): Filter by prompt visibility - "true" for public prompts, "false" for private prompts (default: "false")
|
|
35
|
+
limit (int): Maximum number of prompts to return (default: 20)
|
|
36
|
+
|
|
37
|
+
Returns:
|
|
38
|
+
Dict with prompts and metadata`, {
|
|
39
|
+
is_public: z
|
|
40
|
+
.string()
|
|
41
|
+
.optional()
|
|
42
|
+
.default("false")
|
|
43
|
+
.describe('Filter by prompt visibility - "true" for public prompts, "false" for private prompts'),
|
|
44
|
+
limit: z
|
|
45
|
+
.number()
|
|
46
|
+
.optional()
|
|
47
|
+
.default(20)
|
|
48
|
+
.describe("Maximum number of prompts to return"),
|
|
49
|
+
}, async ({ is_public, limit }) => {
|
|
50
|
+
try {
|
|
51
|
+
const client = getLangSmithClient();
|
|
52
|
+
const isPublicBool = is_public.toLowerCase() === "true";
|
|
53
|
+
const result = await listPromptsTool(client, isPublicBool, limit);
|
|
54
|
+
return toolResult(result);
|
|
55
|
+
}
|
|
56
|
+
catch (e) {
|
|
57
|
+
return toolError(e instanceof Error ? e.message : String(e));
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
server.tool("get_prompt_by_name", `Get a specific prompt by its exact name.
|
|
61
|
+
|
|
62
|
+
Args:
|
|
63
|
+
prompt_name (str): The exact name of the prompt to retrieve
|
|
64
|
+
|
|
65
|
+
Returns:
|
|
66
|
+
Dict containing the prompt details and template, or an error message`, {
|
|
67
|
+
prompt_name: z
|
|
68
|
+
.string()
|
|
69
|
+
.describe("The exact name of the prompt to retrieve"),
|
|
70
|
+
}, async ({ prompt_name }) => {
|
|
71
|
+
try {
|
|
72
|
+
const client = getLangSmithClient();
|
|
73
|
+
const result = await getPromptTool(client, prompt_name);
|
|
74
|
+
return toolResult(result);
|
|
75
|
+
}
|
|
76
|
+
catch (e) {
|
|
77
|
+
return toolError(e instanceof Error ? e.message : String(e));
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
server.tool("push_prompt", `Call this tool when you need to understand how to create and push prompts to LangSmith.
|
|
81
|
+
|
|
82
|
+
This is a documentation-only tool that explains how to:
|
|
83
|
+
- Create prompts using LangChain's prompt templates
|
|
84
|
+
- Push prompts to LangSmith for version control and management
|
|
85
|
+
- Handle prompt creation vs. version updates
|
|
86
|
+
|
|
87
|
+
Use the LangSmith Client's push_prompt() method. See LangSmith documentation for details.`, {}, async () => {
|
|
88
|
+
return toolResult({
|
|
89
|
+
documentation: "See LangSmith documentation for creating and pushing prompts. " +
|
|
90
|
+
"Use the LangSmith Client's pushPrompt() method with a prompt identifier and object.",
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
// ── Thread / conversation tools ───────────────────────────────────
|
|
94
|
+
server.tool("get_thread_history", `Retrieve one page of message history for a specific conversation thread.
|
|
95
|
+
|
|
96
|
+
Uses char-based pagination: pages are built by character budget (max_chars_per_page).
|
|
97
|
+
Long strings are truncated to preview_chars. Supply page_number (1-based) on every call;
|
|
98
|
+
use the returned total_pages to request further pages.
|
|
99
|
+
|
|
100
|
+
Args:
|
|
101
|
+
thread_id (str): The unique ID of the thread to fetch history for
|
|
102
|
+
project_name (str): The name of the project containing the thread
|
|
103
|
+
page_number (int): 1-based page index (required)
|
|
104
|
+
max_chars_per_page (int): Max character count per page, capped at 30000 (default: 25000)
|
|
105
|
+
preview_chars (int): Truncate long strings to this length (default: 150)
|
|
106
|
+
|
|
107
|
+
Returns:
|
|
108
|
+
Dict with result (list of messages), page_number, total_pages, etc.`, {
|
|
109
|
+
thread_id: z
|
|
110
|
+
.string()
|
|
111
|
+
.describe("The unique ID of the thread to fetch history for"),
|
|
112
|
+
project_name: z
|
|
113
|
+
.string()
|
|
114
|
+
.describe("The name of the project containing the thread"),
|
|
115
|
+
page_number: z.number().describe("1-based page index (required)"),
|
|
116
|
+
max_chars_per_page: z
|
|
117
|
+
.number()
|
|
118
|
+
.optional()
|
|
119
|
+
.default(25000)
|
|
120
|
+
.describe("Max character count per page, capped at 30000"),
|
|
121
|
+
preview_chars: z
|
|
122
|
+
.number()
|
|
123
|
+
.optional()
|
|
124
|
+
.default(150)
|
|
125
|
+
.describe("Truncate long strings to this length"),
|
|
126
|
+
}, async ({ thread_id, project_name, page_number, max_chars_per_page, preview_chars, }) => {
|
|
127
|
+
try {
|
|
128
|
+
const client = getLangSmithClient();
|
|
129
|
+
const result = await getThreadHistoryTool(client, thread_id, project_name, page_number, max_chars_per_page, preview_chars);
|
|
130
|
+
return toolResult(result);
|
|
131
|
+
}
|
|
132
|
+
catch (e) {
|
|
133
|
+
return toolError(e instanceof Error ? e.message : String(e));
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
// ── Run / trace tools ─────────────────────────────────────────────
|
|
137
|
+
server.tool("fetch_runs", `Fetch LangSmith runs from one or more projects with flexible filters and automatic pagination.
|
|
138
|
+
|
|
139
|
+
All results are paginated by character budget to keep responses manageable. Use page_number
|
|
140
|
+
and total_pages from the response to iterate through multiple pages.
|
|
141
|
+
|
|
142
|
+
Args:
|
|
143
|
+
project_name (str): The project name. For multiple projects, use JSON array string.
|
|
144
|
+
limit (int): Max runs to fetch from LangSmith API (capped at 100). These runs are then paginated by character budget into pages.
|
|
145
|
+
page_number (int): 1-based page index. Use with total_pages from response to iterate through pages.
|
|
146
|
+
trace_id (str, optional): Return only runs that belong to this trace.
|
|
147
|
+
run_type (str, optional): Filter by type: "llm", "chain", "tool", "retriever".
|
|
148
|
+
error (str, optional): "true" for errored runs, "false" for successful.
|
|
149
|
+
is_root (str, optional): "true" for only top-level traces.
|
|
150
|
+
filter (str, optional): Filter Query Language (FQL) expression.
|
|
151
|
+
trace_filter (str, optional): Filter applied to the root run.
|
|
152
|
+
tree_filter (str, optional): Filter applied to any run in the trace tree.
|
|
153
|
+
order_by (str, optional): Sort field; prefix with "-" for descending. Default "-start_time".
|
|
154
|
+
reference_example_id (str, optional): Filter runs by reference example ID.
|
|
155
|
+
max_chars_per_page (int): Max chars per page, capped at 30000. Default 25000.
|
|
156
|
+
preview_chars (int): Truncate long strings to this length. Default 150.`, {
|
|
157
|
+
project_name: z.string().describe("The project name to fetch runs from"),
|
|
158
|
+
limit: z.number().describe("Maximum number of runs to fetch from LangSmith API (capped at 100)"),
|
|
159
|
+
page_number: z.number().optional().default(1).describe("1-based page index"),
|
|
160
|
+
trace_id: z
|
|
161
|
+
.string()
|
|
162
|
+
.optional()
|
|
163
|
+
.describe("Return only runs belonging to this trace UUID"),
|
|
164
|
+
run_type: z
|
|
165
|
+
.string()
|
|
166
|
+
.optional()
|
|
167
|
+
.describe('Filter by type: "llm", "chain", "tool", "retriever"'),
|
|
168
|
+
error: z
|
|
169
|
+
.string()
|
|
170
|
+
.optional()
|
|
171
|
+
.describe('"true" for errored runs, "false" for successful'),
|
|
172
|
+
is_root: z
|
|
173
|
+
.string()
|
|
174
|
+
.optional()
|
|
175
|
+
.describe('"true" for only top-level traces'),
|
|
176
|
+
filter: z
|
|
177
|
+
.string()
|
|
178
|
+
.optional()
|
|
179
|
+
.describe("Filter Query Language (FQL) expression"),
|
|
180
|
+
trace_filter: z
|
|
181
|
+
.string()
|
|
182
|
+
.optional()
|
|
183
|
+
.describe("Filter applied to the root run in each trace tree"),
|
|
184
|
+
tree_filter: z
|
|
185
|
+
.string()
|
|
186
|
+
.optional()
|
|
187
|
+
.describe("Filter applied to any run in the trace tree"),
|
|
188
|
+
order_by: z
|
|
189
|
+
.string()
|
|
190
|
+
.optional()
|
|
191
|
+
.default("-start_time")
|
|
192
|
+
.describe("Sort field; prefix with '-' for descending"),
|
|
193
|
+
reference_example_id: z
|
|
194
|
+
.string()
|
|
195
|
+
.optional()
|
|
196
|
+
.describe("Filter runs by reference example ID"),
|
|
197
|
+
max_chars_per_page: z
|
|
198
|
+
.number()
|
|
199
|
+
.optional()
|
|
200
|
+
.default(25000)
|
|
201
|
+
.describe("Max character count per page, capped at 30000"),
|
|
202
|
+
preview_chars: z
|
|
203
|
+
.number()
|
|
204
|
+
.optional()
|
|
205
|
+
.default(150)
|
|
206
|
+
.describe("Truncate long strings to this length"),
|
|
207
|
+
}, async ({ project_name, limit, page_number, trace_id, run_type, error: errorStr, is_root, filter, trace_filter, tree_filter, order_by, reference_example_id, max_chars_per_page, preview_chars, }) => {
|
|
208
|
+
try {
|
|
209
|
+
const client = getLangSmithClient();
|
|
210
|
+
let parsedProjectName = project_name;
|
|
211
|
+
if (project_name && project_name.startsWith("[")) {
|
|
212
|
+
try {
|
|
213
|
+
parsedProjectName = JSON.parse(project_name);
|
|
214
|
+
}
|
|
215
|
+
catch {
|
|
216
|
+
// keep as string
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
const parsedError = parseBoolString(errorStr);
|
|
220
|
+
const parsedIsRoot = parseBoolString(is_root);
|
|
221
|
+
const result = await fetchRunsTool(client, {
|
|
222
|
+
projectName: parsedProjectName,
|
|
223
|
+
pageNumber: page_number,
|
|
224
|
+
maxCharsPerPage: max_chars_per_page,
|
|
225
|
+
previewChars: preview_chars,
|
|
226
|
+
traceId: trace_id,
|
|
227
|
+
runType: run_type,
|
|
228
|
+
error: parsedError,
|
|
229
|
+
isRoot: parsedIsRoot,
|
|
230
|
+
filter,
|
|
231
|
+
traceFilter: trace_filter,
|
|
232
|
+
treeFilter: tree_filter,
|
|
233
|
+
orderBy: order_by ?? "-start_time",
|
|
234
|
+
limit,
|
|
235
|
+
referenceExampleId: reference_example_id,
|
|
236
|
+
});
|
|
237
|
+
return toolResult(result);
|
|
238
|
+
}
|
|
239
|
+
catch (e) {
|
|
240
|
+
return toolError(e instanceof Error ? e.message : String(e));
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
// ── Project tools ─────────────────────────────────────────────────
|
|
244
|
+
server.tool("list_projects", `List LangSmith projects with optional filtering and detail level control.
|
|
245
|
+
|
|
246
|
+
Args:
|
|
247
|
+
limit (int): Maximum number of projects to return (default: 5)
|
|
248
|
+
project_name (str, optional): Filter projects by name (partial match)
|
|
249
|
+
more_info (str): "true" for full details, "false" for simplified (default: "false")
|
|
250
|
+
reference_dataset_id (str, optional): Filter by reference dataset ID
|
|
251
|
+
reference_dataset_name (str, optional): Filter by reference dataset name`, {
|
|
252
|
+
limit: z
|
|
253
|
+
.number()
|
|
254
|
+
.optional()
|
|
255
|
+
.default(5)
|
|
256
|
+
.describe("Maximum number of projects to return"),
|
|
257
|
+
project_name: z
|
|
258
|
+
.string()
|
|
259
|
+
.optional()
|
|
260
|
+
.describe("Filter projects by name using partial matching"),
|
|
261
|
+
more_info: z
|
|
262
|
+
.string()
|
|
263
|
+
.optional()
|
|
264
|
+
.default("false")
|
|
265
|
+
.describe('"true" for full details, "false" for simplified'),
|
|
266
|
+
reference_dataset_id: z
|
|
267
|
+
.string()
|
|
268
|
+
.optional()
|
|
269
|
+
.describe("Filter by reference dataset ID"),
|
|
270
|
+
reference_dataset_name: z
|
|
271
|
+
.string()
|
|
272
|
+
.optional()
|
|
273
|
+
.describe("Filter by reference dataset name"),
|
|
274
|
+
}, async ({ limit, project_name, more_info, reference_dataset_id, reference_dataset_name, }) => {
|
|
275
|
+
try {
|
|
276
|
+
const client = getLangSmithClient();
|
|
277
|
+
let parsedMoreInfo = more_info.toLowerCase() === "true";
|
|
278
|
+
if (reference_dataset_id !== undefined &&
|
|
279
|
+
reference_dataset_name !== undefined) {
|
|
280
|
+
parsedMoreInfo = true;
|
|
281
|
+
}
|
|
282
|
+
const result = await listProjectsTool(client, {
|
|
283
|
+
limit,
|
|
284
|
+
projectName: project_name,
|
|
285
|
+
moreInfo: parsedMoreInfo,
|
|
286
|
+
referenceDatasetId: reference_dataset_id,
|
|
287
|
+
referenceDatasetName: reference_dataset_name,
|
|
288
|
+
});
|
|
289
|
+
return toolResult(result);
|
|
290
|
+
}
|
|
291
|
+
catch (e) {
|
|
292
|
+
return toolError(e instanceof Error ? e.message : String(e));
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
// ── Billing / usage tools ─────────────────────────────────────────
|
|
296
|
+
server.tool("get_billing_usage", `Fetch organization billing usage (trace counts) with workspace names inline.
|
|
297
|
+
|
|
298
|
+
Args:
|
|
299
|
+
starting_on (str): Start of date range (ISO 8601)
|
|
300
|
+
ending_before (str): End of date range (ISO 8601)
|
|
301
|
+
workspace (str, optional): Optional workspace UUID or display name to filter
|
|
302
|
+
on_current_plan (str): "true" to include only usage on current plan (default: "true")`, {
|
|
303
|
+
starting_on: z
|
|
304
|
+
.string()
|
|
305
|
+
.describe("Start of date range (ISO 8601)"),
|
|
306
|
+
ending_before: z
|
|
307
|
+
.string()
|
|
308
|
+
.describe("End of date range (ISO 8601)"),
|
|
309
|
+
workspace: z
|
|
310
|
+
.string()
|
|
311
|
+
.optional()
|
|
312
|
+
.describe("Optional workspace UUID or display name to filter"),
|
|
313
|
+
on_current_plan: z
|
|
314
|
+
.string()
|
|
315
|
+
.optional()
|
|
316
|
+
.default("true")
|
|
317
|
+
.describe('"true" to include only usage on current plan'),
|
|
318
|
+
}, async ({ starting_on, ending_before, workspace, on_current_plan }) => {
|
|
319
|
+
try {
|
|
320
|
+
const [apiKey, endpoint] = getApiKeyAndEndpoint();
|
|
321
|
+
const onCurrent = on_current_plan.toLowerCase() === "true";
|
|
322
|
+
const result = await getBillingUsageTool(apiKey, endpoint, starting_on, ending_before, onCurrent, workspace);
|
|
323
|
+
if (!Array.isArray(result) &&
|
|
324
|
+
typeof result === "object" &&
|
|
325
|
+
"error" in result) {
|
|
326
|
+
return toolResult(result);
|
|
327
|
+
}
|
|
328
|
+
return toolResult({ usage: result });
|
|
329
|
+
}
|
|
330
|
+
catch (e) {
|
|
331
|
+
return toolError(e instanceof Error ? e.message : String(e));
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
// ── Experiment tools ──────────────────────────────────────────────
|
|
335
|
+
server.tool("list_experiments", `List LangSmith experiment projects (reference projects) with mandatory dataset filtering.
|
|
336
|
+
|
|
337
|
+
Requires either reference_dataset_id or reference_dataset_name.
|
|
338
|
+
|
|
339
|
+
Args:
|
|
340
|
+
reference_dataset_id (str, optional): Dataset ID to filter experiments by
|
|
341
|
+
reference_dataset_name (str, optional): Dataset name to filter experiments by
|
|
342
|
+
limit (int): Maximum number of experiments to return (default: 5)
|
|
343
|
+
project_name (str, optional): Filter by name (partial match)`, {
|
|
344
|
+
reference_dataset_id: z
|
|
345
|
+
.string()
|
|
346
|
+
.optional()
|
|
347
|
+
.describe("The ID of the reference dataset to filter experiments by"),
|
|
348
|
+
reference_dataset_name: z
|
|
349
|
+
.string()
|
|
350
|
+
.optional()
|
|
351
|
+
.describe("The name of the reference dataset to filter experiments by"),
|
|
352
|
+
limit: z
|
|
353
|
+
.number()
|
|
354
|
+
.optional()
|
|
355
|
+
.default(5)
|
|
356
|
+
.describe("Maximum number of experiments to return"),
|
|
357
|
+
project_name: z
|
|
358
|
+
.string()
|
|
359
|
+
.optional()
|
|
360
|
+
.describe("Filter projects by name using partial matching"),
|
|
361
|
+
}, async ({ reference_dataset_id, reference_dataset_name, limit, project_name, }) => {
|
|
362
|
+
try {
|
|
363
|
+
const client = getLangSmithClient();
|
|
364
|
+
const result = await listExperimentsTool(client, {
|
|
365
|
+
referenceDatasetId: reference_dataset_id,
|
|
366
|
+
referenceDatasetName: reference_dataset_name,
|
|
367
|
+
limit,
|
|
368
|
+
projectName: project_name,
|
|
369
|
+
});
|
|
370
|
+
return toolResult(result);
|
|
371
|
+
}
|
|
372
|
+
catch (e) {
|
|
373
|
+
return toolError(e instanceof Error ? e.message : String(e));
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
// ── Dataset tools ─────────────────────────────────────────────────
|
|
377
|
+
server.tool("list_datasets", `Fetch LangSmith datasets.
|
|
378
|
+
|
|
379
|
+
If no arguments are provided, all datasets will be returned.
|
|
380
|
+
|
|
381
|
+
Args:
|
|
382
|
+
dataset_ids (str, optional): Dataset IDs as JSON array string or single ID
|
|
383
|
+
data_type (str, optional): Filter by dataset data type (e.g., 'chat', 'kv')
|
|
384
|
+
dataset_name (str, optional): Filter by exact dataset name
|
|
385
|
+
dataset_name_contains (str, optional): Filter by substring in dataset name
|
|
386
|
+
metadata (str, optional): Filter by metadata as JSON object string
|
|
387
|
+
limit (int): Max number of datasets to return (default: 20)`, {
|
|
388
|
+
dataset_ids: z
|
|
389
|
+
.string()
|
|
390
|
+
.optional()
|
|
391
|
+
.describe("Dataset IDs as JSON array string or single ID"),
|
|
392
|
+
data_type: z
|
|
393
|
+
.string()
|
|
394
|
+
.optional()
|
|
395
|
+
.describe("Filter by dataset data type"),
|
|
396
|
+
dataset_name: z
|
|
397
|
+
.string()
|
|
398
|
+
.optional()
|
|
399
|
+
.describe("Filter by exact dataset name"),
|
|
400
|
+
dataset_name_contains: z
|
|
401
|
+
.string()
|
|
402
|
+
.optional()
|
|
403
|
+
.describe("Filter by substring in dataset name"),
|
|
404
|
+
metadata: z
|
|
405
|
+
.string()
|
|
406
|
+
.optional()
|
|
407
|
+
.describe("Filter by metadata as JSON object string"),
|
|
408
|
+
limit: z
|
|
409
|
+
.number()
|
|
410
|
+
.optional()
|
|
411
|
+
.default(20)
|
|
412
|
+
.describe("Max number of datasets to return"),
|
|
413
|
+
}, async ({ dataset_ids, data_type, dataset_name, dataset_name_contains, metadata, limit, }) => {
|
|
414
|
+
try {
|
|
415
|
+
const client = getLangSmithClient();
|
|
416
|
+
const parsedDatasetIds = parseJsonArray(dataset_ids);
|
|
417
|
+
const parsedMetadata = parseJsonObject(metadata);
|
|
418
|
+
const result = await listDatasetsTool(client, {
|
|
419
|
+
datasetIds: parsedDatasetIds,
|
|
420
|
+
dataType: data_type,
|
|
421
|
+
datasetName: dataset_name,
|
|
422
|
+
datasetNameContains: dataset_name_contains,
|
|
423
|
+
metadata: parsedMetadata,
|
|
424
|
+
limit,
|
|
425
|
+
});
|
|
426
|
+
return toolResult(result);
|
|
427
|
+
}
|
|
428
|
+
catch (e) {
|
|
429
|
+
return toolError(e instanceof Error ? e.message : String(e));
|
|
430
|
+
}
|
|
431
|
+
});
|
|
432
|
+
server.tool("list_examples", `Fetch examples from a LangSmith dataset with advanced filtering options.
|
|
433
|
+
|
|
434
|
+
Either dataset_id, dataset_name, or example_ids must be provided.
|
|
435
|
+
|
|
436
|
+
Args:
|
|
437
|
+
dataset_id (str, optional): Dataset ID to retrieve examples from
|
|
438
|
+
dataset_name (str, optional): Dataset name to retrieve examples from
|
|
439
|
+
example_ids (str, optional): Example IDs as JSON array string or single ID
|
|
440
|
+
filter (str, optional): Filter string using LangSmith query syntax
|
|
441
|
+
metadata (str, optional): Metadata filter as JSON object string
|
|
442
|
+
splits (str, optional): Dataset splits as JSON array string or single split
|
|
443
|
+
inline_s3_urls (str, optional): "true" or "false"
|
|
444
|
+
include_attachments (str, optional): "true" or "false"
|
|
445
|
+
as_of (str, optional): Dataset version tag or ISO timestamp
|
|
446
|
+
limit (int): Max examples to return (default: 10)
|
|
447
|
+
offset (str, optional): Number of examples to skip`, {
|
|
448
|
+
dataset_id: z
|
|
449
|
+
.string()
|
|
450
|
+
.optional()
|
|
451
|
+
.describe("Dataset ID to retrieve examples from"),
|
|
452
|
+
dataset_name: z
|
|
453
|
+
.string()
|
|
454
|
+
.optional()
|
|
455
|
+
.describe("Dataset name to retrieve examples from"),
|
|
456
|
+
example_ids: z
|
|
457
|
+
.string()
|
|
458
|
+
.optional()
|
|
459
|
+
.describe("Example IDs as JSON array string or single ID"),
|
|
460
|
+
filter: z
|
|
461
|
+
.string()
|
|
462
|
+
.optional()
|
|
463
|
+
.describe("Filter string using LangSmith query syntax"),
|
|
464
|
+
metadata: z
|
|
465
|
+
.string()
|
|
466
|
+
.optional()
|
|
467
|
+
.describe("Metadata filter as JSON object string"),
|
|
468
|
+
splits: z
|
|
469
|
+
.string()
|
|
470
|
+
.optional()
|
|
471
|
+
.describe("Dataset splits as JSON array string or single split"),
|
|
472
|
+
inline_s3_urls: z
|
|
473
|
+
.string()
|
|
474
|
+
.optional()
|
|
475
|
+
.describe('"true" or "false"'),
|
|
476
|
+
include_attachments: z
|
|
477
|
+
.string()
|
|
478
|
+
.optional()
|
|
479
|
+
.describe('"true" or "false"'),
|
|
480
|
+
as_of: z
|
|
481
|
+
.string()
|
|
482
|
+
.optional()
|
|
483
|
+
.describe("Dataset version tag or ISO timestamp"),
|
|
484
|
+
limit: z
|
|
485
|
+
.number()
|
|
486
|
+
.optional()
|
|
487
|
+
.default(10)
|
|
488
|
+
.describe("Maximum number of examples to return"),
|
|
489
|
+
offset: z
|
|
490
|
+
.string()
|
|
491
|
+
.optional()
|
|
492
|
+
.describe("Number of examples to skip"),
|
|
493
|
+
}, async ({ dataset_id, dataset_name, example_ids, filter, metadata, splits, inline_s3_urls, include_attachments, as_of, limit, offset, }) => {
|
|
494
|
+
try {
|
|
495
|
+
const client = getLangSmithClient();
|
|
496
|
+
const parsedExampleIds = parseJsonArray(example_ids);
|
|
497
|
+
const parsedSplits = parseJsonArray(splits);
|
|
498
|
+
const parsedMetadata = parseJsonObject(metadata);
|
|
499
|
+
const parsedInlineS3Urls = parseBoolString(inline_s3_urls);
|
|
500
|
+
const parsedIncludeAttachments = parseBoolString(include_attachments);
|
|
501
|
+
const parsedOffset = offset ? parseInt(offset, 10) : undefined;
|
|
502
|
+
const result = await listExamplesTool(client, {
|
|
503
|
+
datasetId: dataset_id,
|
|
504
|
+
datasetName: dataset_name,
|
|
505
|
+
exampleIds: parsedExampleIds,
|
|
506
|
+
filter,
|
|
507
|
+
metadata: parsedMetadata,
|
|
508
|
+
splits: parsedSplits,
|
|
509
|
+
inlineS3Urls: parsedInlineS3Urls,
|
|
510
|
+
includeAttachments: parsedIncludeAttachments,
|
|
511
|
+
asOf: as_of,
|
|
512
|
+
limit,
|
|
513
|
+
offset: parsedOffset,
|
|
514
|
+
});
|
|
515
|
+
return toolResult(result);
|
|
516
|
+
}
|
|
517
|
+
catch (e) {
|
|
518
|
+
return toolError(e instanceof Error ? e.message : String(e));
|
|
519
|
+
}
|
|
520
|
+
});
|
|
521
|
+
server.tool("read_dataset", `Read a specific dataset from LangSmith.
|
|
522
|
+
|
|
523
|
+
Either dataset_id or dataset_name must be provided.
|
|
524
|
+
|
|
525
|
+
Args:
|
|
526
|
+
dataset_id (str, optional): Dataset ID to retrieve
|
|
527
|
+
dataset_name (str, optional): Dataset name to retrieve`, {
|
|
528
|
+
dataset_id: z.string().optional().describe("Dataset ID to retrieve"),
|
|
529
|
+
dataset_name: z
|
|
530
|
+
.string()
|
|
531
|
+
.optional()
|
|
532
|
+
.describe("Dataset name to retrieve"),
|
|
533
|
+
}, async ({ dataset_id, dataset_name }) => {
|
|
534
|
+
try {
|
|
535
|
+
const client = getLangSmithClient();
|
|
536
|
+
const result = await readDatasetTool(client, {
|
|
537
|
+
datasetId: dataset_id,
|
|
538
|
+
datasetName: dataset_name,
|
|
539
|
+
});
|
|
540
|
+
return toolResult(result);
|
|
541
|
+
}
|
|
542
|
+
catch (e) {
|
|
543
|
+
return toolError(e instanceof Error ? e.message : String(e));
|
|
544
|
+
}
|
|
545
|
+
});
|
|
546
|
+
server.tool("read_example", `Read a specific example from LangSmith.
|
|
547
|
+
|
|
548
|
+
Args:
|
|
549
|
+
example_id (str): Example ID to retrieve
|
|
550
|
+
as_of (str, optional): Dataset version tag or ISO timestamp`, {
|
|
551
|
+
example_id: z.string().describe("Example ID to retrieve"),
|
|
552
|
+
as_of: z
|
|
553
|
+
.string()
|
|
554
|
+
.optional()
|
|
555
|
+
.describe("Dataset version tag or ISO timestamp"),
|
|
556
|
+
}, async ({ example_id, as_of }) => {
|
|
557
|
+
try {
|
|
558
|
+
const client = getLangSmithClient();
|
|
559
|
+
const result = await readExampleTool(client, example_id, as_of);
|
|
560
|
+
return toolResult(result);
|
|
561
|
+
}
|
|
562
|
+
catch (e) {
|
|
563
|
+
return toolError(e instanceof Error ? e.message : String(e));
|
|
564
|
+
}
|
|
565
|
+
});
|
|
566
|
+
// ── Documentation-only tools ──────────────────────────────────────
|
|
567
|
+
server.tool("create_dataset", `Call this tool when you need to understand how to create datasets in LangSmith.
|
|
568
|
+
This is a documentation-only tool.`, {}, async () => {
|
|
569
|
+
return toolResult({
|
|
570
|
+
documentation: "See LangSmith documentation for creating datasets. " +
|
|
571
|
+
"Use the LangSmith Client's createDataset() and createExamples() methods.",
|
|
572
|
+
});
|
|
573
|
+
});
|
|
574
|
+
server.tool("update_examples", `Call this tool when you need to understand how to update dataset examples in LangSmith.
|
|
575
|
+
This is a documentation-only tool.`, {}, async () => {
|
|
576
|
+
return toolResult({
|
|
577
|
+
documentation: "See LangSmith documentation for updating examples. " +
|
|
578
|
+
"Use the LangSmith Client's updateExample() or updateExamples() methods.",
|
|
579
|
+
});
|
|
580
|
+
});
|
|
581
|
+
server.tool("run_experiment", `Call this tool when you need to understand how to run experiments and evaluations in LangSmith.
|
|
582
|
+
This is a documentation-only tool.`, {}, async () => {
|
|
583
|
+
return toolResult({
|
|
584
|
+
documentation: "See LangSmith documentation for running experiments. " +
|
|
585
|
+
"Use the LangSmith Client's evaluate() method with custom evaluators.",
|
|
586
|
+
});
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
//# sourceMappingURL=register-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-tools.js","sourceRoot":"","sources":["../../src/services/register-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;GAEG;AACH,SAAS,UAAU,CAAC,IAAa;IAG/B,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;AAC9E,CAAC;AAED;;GAEG;AACH,SAAS,SAAS,CAAC,OAAe;IAIhC,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,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