@promptlayer/mcp-server 1.13.0 → 1.15.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/README.md +56 -3
- package/build/client.d.ts +39 -22
- package/build/client.d.ts.map +1 -1
- package/build/client.js +46 -24
- package/build/client.js.map +1 -1
- package/build/handlers.d.ts.map +1 -1
- package/build/handlers.js +62 -24
- package/build/handlers.js.map +1 -1
- package/build/index.js +10 -5
- package/build/index.js.map +1 -1
- package/build/types.d.ts +1984 -837
- package/build/types.d.ts.map +1 -1
- package/build/types.js +561 -269
- package/build/types.js.map +1 -1
- package/build/utils.d.ts.map +1 -1
- package/build/utils.js +10 -1
- package/build/utils.js.map +1 -1
- package/gcp/src/index.ts +95 -38
- package/package.json +1 -1
- package/src/client.ts +46 -25
- package/src/handlers.ts +136 -52
- package/src/index.ts +10 -5
- package/src/types.ts +615 -318
- package/src/utils.ts +8 -1
package/src/types.ts
CHANGED
|
@@ -191,39 +191,7 @@ export const CreateSpansBulkArgsSchema = z.object({
|
|
|
191
191
|
});
|
|
192
192
|
|
|
193
193
|
|
|
194
|
-
// ──
|
|
195
|
-
|
|
196
|
-
export const ListDatasetsArgsSchema = z.object({
|
|
197
|
-
page: z.number().int().optional().describe("Page number (default: 1)"),
|
|
198
|
-
per_page: z.number().int().optional().describe("Items per page (default: 10)"),
|
|
199
|
-
name: z.string().optional().describe("Filter by dataset group name (case-insensitive partial match)"),
|
|
200
|
-
status: z.enum(["active", "deleted", "all"]).optional().describe("Filter by status (default: 'active')"),
|
|
201
|
-
dataset_group_id: z.number().int().optional().describe("Filter by dataset group ID"),
|
|
202
|
-
prompt_id: z.number().int().optional().describe("Filter by prompt ID"),
|
|
203
|
-
prompt_version_id: z.number().int().optional().describe("Filter by prompt version ID"),
|
|
204
|
-
prompt_label_id: z.number().int().optional().describe("Filter by prompt label ID"),
|
|
205
|
-
report_id: z.number().int().optional().describe("Filter by report ID"),
|
|
206
|
-
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
207
|
-
});
|
|
208
|
-
|
|
209
|
-
// ── Create Dataset Group (POST /api/public/v2/dataset-groups) ────────────
|
|
210
|
-
|
|
211
|
-
export const CreateDatasetGroupArgsSchema = z.object({
|
|
212
|
-
name: z.string().optional().describe("Dataset group name (unique within workspace). Auto-generated if omitted."),
|
|
213
|
-
folder_id: z.number().int().optional().describe("Folder ID to place the dataset group into"),
|
|
214
|
-
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
215
|
-
});
|
|
216
|
-
|
|
217
|
-
// ── Create Dataset Version from File (POST /api/public/v2/dataset-versions/from-file)
|
|
218
|
-
|
|
219
|
-
export const CreateDatasetVersionFromFileArgsSchema = z.object({
|
|
220
|
-
dataset_group_id: z.number().int().describe("Dataset group ID"),
|
|
221
|
-
file_name: z.string().describe("File name with extension (e.g. 'data.csv' or 'data.json')"),
|
|
222
|
-
file_content_base64: z.string().describe("Base64-encoded file content"),
|
|
223
|
-
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
224
|
-
});
|
|
225
|
-
|
|
226
|
-
// ── Structured filter primitives (shared by request search + dataset-from-history) ──
|
|
194
|
+
// ── Structured filter primitives (shared by request search + Smart Table imports) ──
|
|
227
195
|
// NOTE: value/filters use loose types (z.unknown()) because the backend validates
|
|
228
196
|
// operator-field compatibility at runtime. This is tracked as a known exception in
|
|
229
197
|
// scripts/diff-endpoints.ts.
|
|
@@ -256,194 +224,6 @@ const StructuredFilterGroupSchema: z.ZodType = z.object({
|
|
|
256
224
|
filters: z.array(z.union([StructuredFilterSchema, z.lazy(() => StructuredFilterGroupSchema)])).describe("Filters or nested filter groups"),
|
|
257
225
|
});
|
|
258
226
|
|
|
259
|
-
// ── Create Dataset Version from Filter Params (POST /api/public/v2/dataset-versions/from-filter-params)
|
|
260
|
-
|
|
261
|
-
export const CreateDatasetVersionFromFilterParamsArgsSchema = z.object({
|
|
262
|
-
dataset_group_id: z.number().int().describe("Dataset group ID to create the new version under"),
|
|
263
|
-
request_log_ids: z.array(z.number().int().positive()).optional().describe(
|
|
264
|
-
"Static snapshot mode: pin the dataset to an explicit list of request log IDs (capped at 50,000). " +
|
|
265
|
-
"≤50 IDs run synchronously; >50 are processed asynchronously. " +
|
|
266
|
-
"Datasets created this way are not refreshable."
|
|
267
|
-
),
|
|
268
|
-
filter_group: StructuredFilterGroupSchema.optional().describe(
|
|
269
|
-
"Structured filter mode: same shape as search-request-logs (AND/OR groups of field/operator/value filters). " +
|
|
270
|
-
"Always processed asynchronously. Persisted on the dataset so refresh_dataset can replay it."
|
|
271
|
-
),
|
|
272
|
-
q: z.string().optional().describe("Free-text search query applied alongside filter_group"),
|
|
273
|
-
sort_by: z.enum([
|
|
274
|
-
"request_start_time", "input_tokens", "output_tokens", "cost",
|
|
275
|
-
"latency_ms", "status", "turn_count", "tool_call_count",
|
|
276
|
-
]).optional().describe("Sort field"),
|
|
277
|
-
sort_order: z.enum(["asc", "desc"]).optional().describe("Sort direction (defaults to desc when sort_by is set)"),
|
|
278
|
-
variables_to_parse: z.array(z.string()).optional().describe("Input variable names to extract as dataset columns"),
|
|
279
|
-
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
280
|
-
});
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
// ── Get Dataset Rows (GET /api/public/v2/datasets/{dataset_id}/rows) ─────
|
|
284
|
-
|
|
285
|
-
export const GetDatasetRowsArgsSchema = z.object({
|
|
286
|
-
dataset_id: z.number().int().describe("The ID of the dataset to retrieve rows from"),
|
|
287
|
-
page: z.number().int().optional().describe("Page number (default: 1)"),
|
|
288
|
-
per_page: z.number().int().optional().describe("Rows per page (default: 10, max: 100)"),
|
|
289
|
-
q: z.string().optional().describe("Search query for filtering rows"),
|
|
290
|
-
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
291
|
-
});
|
|
292
|
-
|
|
293
|
-
// ── Create Draft Dataset Version (POST /api/public/v2/dataset-versions/create-draft) ─────
|
|
294
|
-
|
|
295
|
-
export const CreateDraftDatasetVersionArgsSchema = z.object({
|
|
296
|
-
dataset_group_id: z.number().int().describe("ID of the dataset group to create a draft version for"),
|
|
297
|
-
source_dataset_id: z.number().int().optional().describe("Optional ID of an existing dataset version to copy rows from. Must belong to the same dataset group."),
|
|
298
|
-
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
299
|
-
});
|
|
300
|
-
|
|
301
|
-
// ── Add Request Log to Draft Dataset (POST /api/public/v2/dataset-versions/add-request-log) ─────
|
|
302
|
-
|
|
303
|
-
export const AddRequestLogToDatasetVersionArgsSchema = z.object({
|
|
304
|
-
dataset_group_id: z.number().int().describe("ID of the dataset group containing the draft"),
|
|
305
|
-
request_log_id: z.number().int().describe("ID of the request log to add as a dataset row"),
|
|
306
|
-
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
307
|
-
});
|
|
308
|
-
|
|
309
|
-
// ── Save Draft Dataset Version (POST /api/public/v2/dataset-versions/save-draft) ─────
|
|
310
|
-
|
|
311
|
-
export const SaveDraftDatasetVersionArgsSchema = z.object({
|
|
312
|
-
dataset_group_id: z.number().int().describe("ID of the dataset group containing the draft to save"),
|
|
313
|
-
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
314
|
-
});
|
|
315
|
-
|
|
316
|
-
// ── Add Trace to Draft Dataset (POST /api/public/v2/dataset-versions/add-trace) ─────
|
|
317
|
-
|
|
318
|
-
export const AddTraceToDatasetVersionArgsSchema = z.object({
|
|
319
|
-
dataset_group_id: z.number().int().min(1).describe("ID of the dataset group containing the draft"),
|
|
320
|
-
trace_id: z.string().min(1).describe("ID of the trace to add as a dataset row"),
|
|
321
|
-
span_id: z.string().min(1).optional().describe("Optional span ID to anchor the row on a specific span subtree instead of the full trace"),
|
|
322
|
-
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
323
|
-
});
|
|
324
|
-
|
|
325
|
-
// ── List Evaluations (GET /api/public/v2/evaluations) ────────────────────
|
|
326
|
-
|
|
327
|
-
export const ListEvaluationsArgsSchema = z.object({
|
|
328
|
-
page: z.number().int().optional().describe("Page number (default: 1)"),
|
|
329
|
-
per_page: z.number().int().optional().describe("Items per page (default: 10)"),
|
|
330
|
-
name: z.string().optional().describe("Filter by name (case-insensitive partial match)"),
|
|
331
|
-
status: z.enum(["active", "deleted", "all"]).optional().describe("Filter by status (default: 'active')"),
|
|
332
|
-
include_runs: z.boolean().optional().describe("If true, include batch runs nested under each evaluation with status and cell status counts (default: false)"),
|
|
333
|
-
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
334
|
-
});
|
|
335
|
-
|
|
336
|
-
// ── Get Evaluation Rows (GET /api/public/v2/evaluations/{evaluation_id}/rows)
|
|
337
|
-
|
|
338
|
-
export const GetEvaluationRowsArgsSchema = z.object({
|
|
339
|
-
evaluation_id: z.number().int().describe("The ID of the evaluation to retrieve rows from"),
|
|
340
|
-
page: z.number().int().optional().describe("Page number (default: 1)"),
|
|
341
|
-
per_page: z.number().int().optional().describe("Rows per page (default: 10, max: 100)"),
|
|
342
|
-
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
343
|
-
});
|
|
344
|
-
|
|
345
|
-
// ── Create Evaluation Pipeline / Report (POST /reports) ──────────────────
|
|
346
|
-
|
|
347
|
-
export const CreateReportArgsSchema = z.object({
|
|
348
|
-
dataset_group_id: z.number().int().describe("Dataset group ID"),
|
|
349
|
-
name: z.string().optional().describe("Pipeline name (auto-generated if omitted)"),
|
|
350
|
-
folder_id: z.number().int().optional().describe("Folder ID for organization"),
|
|
351
|
-
dataset_version_number: z.number().int().optional().describe("Dataset version (uses latest if omitted)"),
|
|
352
|
-
columns: z.array(z.record(z.unknown())).optional().describe("Evaluation columns (each: column_type, name, configuration)"),
|
|
353
|
-
score_configuration: z.record(z.unknown()).optional().describe("Custom scoring logic configuration"),
|
|
354
|
-
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
355
|
-
});
|
|
356
|
-
|
|
357
|
-
// ── Run Evaluation (POST /reports/{report_id}/run) ───────────────────────
|
|
358
|
-
|
|
359
|
-
export const RunReportArgsSchema = z.object({
|
|
360
|
-
report_id: z.number().int().describe("Evaluation pipeline ID"),
|
|
361
|
-
name: z.string().describe("Name for this evaluation run"),
|
|
362
|
-
dataset_id: z.number().int().optional().describe("Override dataset ID"),
|
|
363
|
-
refresh_dataset: z.boolean().optional().describe("Refresh the dataset before running"),
|
|
364
|
-
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
365
|
-
});
|
|
366
|
-
|
|
367
|
-
// ── Get Evaluation (GET /reports/{report_id}) ────────────────────────────
|
|
368
|
-
|
|
369
|
-
export const GetReportArgsSchema = z.object({
|
|
370
|
-
report_id: z.number().int().describe("Evaluation pipeline ID"),
|
|
371
|
-
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
372
|
-
});
|
|
373
|
-
|
|
374
|
-
// ── Get Evaluation Score (GET /reports/{report_id}/score) ────────────────
|
|
375
|
-
|
|
376
|
-
export const GetReportScoreArgsSchema = z.object({
|
|
377
|
-
report_id: z.number().int().describe("Evaluation pipeline ID"),
|
|
378
|
-
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
379
|
-
});
|
|
380
|
-
|
|
381
|
-
// ── Configure Custom Scoring (PATCH /reports/{report_id}/score-card) ─────
|
|
382
|
-
// NOTE: This endpoint is in the PromptLayer reference docs but NOT in the
|
|
383
|
-
// OpenAPI spec. Tracked as a known exception in scripts/diff-endpoints.ts.
|
|
384
|
-
// See: https://docs.promptlayer.com/reference/update-report-score-card
|
|
385
|
-
|
|
386
|
-
export const UpdateReportScoreCardArgsSchema = z.object({
|
|
387
|
-
report_id: z.number().int().describe("Evaluation pipeline ID"),
|
|
388
|
-
column_names: z.array(z.string()).describe("Column names to include in score"),
|
|
389
|
-
code: z.string().optional().describe("Custom Python/JavaScript code for score calculation"),
|
|
390
|
-
code_language: z.enum(["PYTHON", "JAVASCRIPT"]).optional().describe("Code language (default: PYTHON)"),
|
|
391
|
-
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
392
|
-
});
|
|
393
|
-
|
|
394
|
-
// ── Delete Reports by Name (DELETE /reports/name/{report_name}) ──────────
|
|
395
|
-
|
|
396
|
-
export const DeleteReportsByNameArgsSchema = z.object({
|
|
397
|
-
report_name: z.string().describe("Name of reports to archive"),
|
|
398
|
-
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
399
|
-
});
|
|
400
|
-
|
|
401
|
-
// ── Delete Report by ID (DELETE /reports/{report_id}) ────────────────────
|
|
402
|
-
|
|
403
|
-
export const DeleteReportArgsSchema = z.object({
|
|
404
|
-
report_id: z.number().int().describe("Evaluation pipeline ID to archive"),
|
|
405
|
-
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
406
|
-
});
|
|
407
|
-
|
|
408
|
-
// ── Rename Report (PATCH /reports/{report_id}/rename) ────────────────────
|
|
409
|
-
|
|
410
|
-
export const RenameReportArgsSchema = z.object({
|
|
411
|
-
report_id: z.number().int().describe("Evaluation pipeline ID to rename"),
|
|
412
|
-
name: z.string().min(1).max(255).optional().describe("New name for the evaluation pipeline. Provide name, tags, or both."),
|
|
413
|
-
tags: z.array(z.string()).optional().describe("Replace the pipeline's tags. Pass an empty array to clear them. Provide name, tags, or both."),
|
|
414
|
-
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
415
|
-
});
|
|
416
|
-
|
|
417
|
-
// ── Add Report Column (POST /report-columns) ─────────────────────────────
|
|
418
|
-
|
|
419
|
-
export const AddReportColumnArgsSchema = z.object({
|
|
420
|
-
report_id: z.number().int().describe("Evaluation pipeline ID to add the column to"),
|
|
421
|
-
column_type: z.string().describe("Column type (e.g. LLM_ASSERTION, CODE_EXECUTION, PROMPT_TEMPLATE). See https://docs.promptlayer.com/features/evaluations/column-types"),
|
|
422
|
-
name: z.string().min(1).describe("Unique column name within the pipeline"),
|
|
423
|
-
configuration: z.record(z.unknown()).describe("Column-type-specific configuration"),
|
|
424
|
-
position: z.number().int().positive().optional().describe("Position in the pipeline (auto-assigned if omitted). Cannot overwrite dataset columns."),
|
|
425
|
-
is_part_of_score: z.boolean().optional().describe("Whether this column contributes to the score (default false)"),
|
|
426
|
-
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
427
|
-
});
|
|
428
|
-
|
|
429
|
-
// ── Edit Report Column (PATCH /report-columns/{report_column_id}) ────────
|
|
430
|
-
|
|
431
|
-
export const EditReportColumnArgsSchema = z.object({
|
|
432
|
-
report_column_id: z.number().int().describe("Report column ID to edit"),
|
|
433
|
-
report_id: z.number().int().describe("Parent evaluation pipeline ID (must match the column's report)"),
|
|
434
|
-
column_type: z.string().describe("Column type (e.g. LLM_ASSERTION, CODE_EXECUTION, PROMPT_TEMPLATE). DATASET is not allowed."),
|
|
435
|
-
configuration: z.record(z.unknown()).optional().describe("Replacement column configuration"),
|
|
436
|
-
name: z.string().min(1).optional().describe("New column name (must be unique within the pipeline)"),
|
|
437
|
-
position: z.number().int().positive().optional().describe("New position. Cannot overwrite dataset columns."),
|
|
438
|
-
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
439
|
-
});
|
|
440
|
-
|
|
441
|
-
// ── Delete Report Column (DELETE /report-columns/{report_column_id}) ─────
|
|
442
|
-
|
|
443
|
-
export const DeleteReportColumnArgsSchema = z.object({
|
|
444
|
-
report_column_id: z.number().int().describe("Report column ID to delete. Cannot be a DATASET column."),
|
|
445
|
-
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
446
|
-
});
|
|
447
227
|
|
|
448
228
|
|
|
449
229
|
// ── List Agents (GET /workflows) ─────────────────────────────────────────
|
|
@@ -572,6 +352,28 @@ export const TestExecuteToolRegistryArgsSchema = z.object({
|
|
|
572
352
|
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
573
353
|
});
|
|
574
354
|
|
|
355
|
+
// ── Env Vars ─────────────────────────────────────────────────────────────
|
|
356
|
+
|
|
357
|
+
export const ListWorkspaceEnvVarsArgsSchema = z.object({
|
|
358
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
export const CreateWorkspaceEnvVarArgsSchema = z.object({
|
|
362
|
+
key: z.string().describe("Env var name. Must match ^[A-Za-z_][A-Za-z0-9_]*$ and not be a reserved runtime name (PATH, LD_PRELOAD, PYTHONSTARTUP, NODE_OPTIONS, etc.)"),
|
|
363
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
364
|
+
});
|
|
365
|
+
|
|
366
|
+
export const ListToolEnvVarsArgsSchema = z.object({
|
|
367
|
+
identifier: z.string().describe("Tool ID (numeric) or name"),
|
|
368
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
369
|
+
});
|
|
370
|
+
|
|
371
|
+
export const CreateToolEnvVarArgsSchema = z.object({
|
|
372
|
+
identifier: z.string().describe("Tool ID (numeric) or name"),
|
|
373
|
+
key: z.string().describe("Env var name. Must match ^[A-Za-z_][A-Za-z0-9_]*$ and not be a reserved runtime name."),
|
|
374
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
375
|
+
});
|
|
376
|
+
|
|
575
377
|
export const CreateFolderArgsSchema = z.object({
|
|
576
378
|
name: z.string().describe("Folder name (unique within parent)"),
|
|
577
379
|
parent_id: z.number().int().optional().describe("Parent folder ID (root if omitted)"),
|
|
@@ -798,6 +600,363 @@ export const GetRequestSearchSuggestionsArgsSchema = z.object({
|
|
|
798
600
|
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
799
601
|
});
|
|
800
602
|
|
|
603
|
+
// ── Smart Tables (public v2) ────────────────────────────────────────────
|
|
604
|
+
|
|
605
|
+
const UuidSchema = z.string().uuid();
|
|
606
|
+
const CursorPaginationShape = {
|
|
607
|
+
cursor: z.string().optional().describe("Pagination cursor from a previous response"),
|
|
608
|
+
limit: z.number().int().min(1).max(100).optional().describe("Items per page (1-100)"),
|
|
609
|
+
};
|
|
610
|
+
const SmartTablePromptFilterShape = {
|
|
611
|
+
prompt_id: z.number().int().positive().optional().describe("Filter to tables/sheets that reference this prompt"),
|
|
612
|
+
prompt_version_id: z.number().int().positive().optional().describe("Filter to tables/sheets that reference this prompt version"),
|
|
613
|
+
prompt_label_id: z.number().int().positive().optional().describe("Filter to tables/sheets that reference this prompt label"),
|
|
614
|
+
};
|
|
615
|
+
const SmartTableColumnTypeSchema = z.enum([
|
|
616
|
+
"TEXT",
|
|
617
|
+
"ABSOLUTE_NUMERIC_DISTANCE",
|
|
618
|
+
"AI_DATA_EXTRACTION",
|
|
619
|
+
"APPLY_DIFF",
|
|
620
|
+
"ASSERT_VALID",
|
|
621
|
+
"COALESCE",
|
|
622
|
+
"CONDITION",
|
|
623
|
+
"CODE_EXECUTION",
|
|
624
|
+
"COMBINE_COLUMNS",
|
|
625
|
+
"COMPARE",
|
|
626
|
+
"COMPOSITION",
|
|
627
|
+
"CONTAINS",
|
|
628
|
+
"CONVERSATION_SIMULATOR",
|
|
629
|
+
"COSINE_SIMILARITY",
|
|
630
|
+
"COUNT",
|
|
631
|
+
"DATASET",
|
|
632
|
+
"ENDPOINT",
|
|
633
|
+
"FOR_LOOP",
|
|
634
|
+
"HUMAN",
|
|
635
|
+
"JSON_PATH",
|
|
636
|
+
"LLM_ASSERTION",
|
|
637
|
+
"MATH_OPERATOR",
|
|
638
|
+
"MCP",
|
|
639
|
+
"MIN_MAX",
|
|
640
|
+
"PARSE_VALUE",
|
|
641
|
+
"PROMPT_TEMPLATE",
|
|
642
|
+
"REGEX",
|
|
643
|
+
"REGEX_EXTRACTION",
|
|
644
|
+
"VARIABLE",
|
|
645
|
+
"WHILE_LOOP",
|
|
646
|
+
"WORKFLOW",
|
|
647
|
+
"XML_PATH",
|
|
648
|
+
]).describe("Smart Table column type. Use uppercase backend enum values.");
|
|
649
|
+
const SmartCellStatusSchema = z.enum(["STALE", "QUEUED", "DISPATCHED", "RUNNING", "COMPLETED", "FAILED"]);
|
|
650
|
+
const SmartTableColumnDependencySchema = z.object({
|
|
651
|
+
column_id: UuidSchema.describe("Source column UUID"),
|
|
652
|
+
reference_type: z.string().optional().describe("Dependency reference type, usually 'value'"),
|
|
653
|
+
config_key: z.string().optional().describe("Optional config key this dependency feeds"),
|
|
654
|
+
config_meta: z.record(z.unknown()).optional().describe("Optional dependency metadata"),
|
|
655
|
+
});
|
|
656
|
+
const SmartTableRequestLogImportBaseShape = {
|
|
657
|
+
request_log_ids: z.array(z.number().int().positive()).optional().describe("Explicit request log IDs to import"),
|
|
658
|
+
filter_group: StructuredFilterGroupSchema.optional().describe("Structured request log filters. Provide this or request_log_ids."),
|
|
659
|
+
q: z.string().optional().describe("Free-text request log search applied with filter_group"),
|
|
660
|
+
sort_by: z.string().optional().describe("Request log sort field"),
|
|
661
|
+
sort_order: z.enum(["asc", "desc"]).optional().describe("Request log sort direction"),
|
|
662
|
+
metadata_cost_breakdown_key: z.string().optional().describe("Optional metadata key used for cost breakdown filtering"),
|
|
663
|
+
variables_to_parse: z.array(z.string()).optional().describe("Input variable names to extract as columns"),
|
|
664
|
+
include_fields: z.array(z.string()).optional().describe("Additional request fields to include as imported columns"),
|
|
665
|
+
limit: z.number().int().positive().optional().describe("Maximum number of matching request logs to import"),
|
|
666
|
+
};
|
|
667
|
+
const SmartTableSheetFileSourceSchema = z.object({
|
|
668
|
+
type: z.literal("file"),
|
|
669
|
+
file_name: z.string().min(1).max(255).describe("CSV or JSON file name for a new sheet import"),
|
|
670
|
+
file_content_base64: z.string().min(1).describe("Base64-encoded file content"),
|
|
671
|
+
});
|
|
672
|
+
const SmartTableSheetRequestLogsSourceSchema = z.object({
|
|
673
|
+
type: z.literal("request_logs"),
|
|
674
|
+
...SmartTableRequestLogImportBaseShape,
|
|
675
|
+
});
|
|
676
|
+
|
|
677
|
+
export const ListSmartTablesArgsSchema = z.object({
|
|
678
|
+
folder_id: z.number().int().positive().optional().describe("Filter by folder ID"),
|
|
679
|
+
name: z.string().optional().describe("Filter by table title"),
|
|
680
|
+
...CursorPaginationShape,
|
|
681
|
+
sort: z.enum(["created_at"]).optional().describe("Sort field (default: created_at)"),
|
|
682
|
+
order: z.enum(["asc", "desc"]).optional().describe("Sort direction (default: desc)"),
|
|
683
|
+
...SmartTablePromptFilterShape,
|
|
684
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
685
|
+
});
|
|
686
|
+
|
|
687
|
+
export const CreateSmartTableArgsSchema = z.object({
|
|
688
|
+
title: z.string().min(1).max(255).optional().describe("Table title. Omit for an auto-generated Untitled Table name."),
|
|
689
|
+
folder_id: z.number().int().positive().optional().describe("Folder ID to place the table into"),
|
|
690
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
691
|
+
});
|
|
692
|
+
|
|
693
|
+
export const GetSmartTableArgsSchema = z.object({
|
|
694
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
695
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
696
|
+
});
|
|
697
|
+
|
|
698
|
+
export const UpdateSmartTableArgsSchema = z.object({
|
|
699
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
700
|
+
title: z.string().min(1).max(255).optional().describe("New table title"),
|
|
701
|
+
folder_id: z.number().int().positive().optional().describe("Folder ID, or omit to leave unchanged"),
|
|
702
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
703
|
+
});
|
|
704
|
+
|
|
705
|
+
export const ListSmartTableSheetsArgsSchema = z.object({
|
|
706
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
707
|
+
...CursorPaginationShape,
|
|
708
|
+
sort: z.enum(["index"]).optional().describe("Sort field (default: index)"),
|
|
709
|
+
order: z.enum(["asc", "desc"]).optional().describe("Sort direction (default: asc)"),
|
|
710
|
+
...SmartTablePromptFilterShape,
|
|
711
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
712
|
+
});
|
|
713
|
+
|
|
714
|
+
export const CreateSmartTableSheetArgsSchema = z.object({
|
|
715
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
716
|
+
title: z.string().min(1).max(255).optional().describe("Sheet title"),
|
|
717
|
+
index: z.number().int().min(0).optional().describe("Sheet index"),
|
|
718
|
+
operation_id: z.string().min(1).max(255).optional().describe("Optional idempotency/status operation ID"),
|
|
719
|
+
source: z.discriminatedUnion("type", [
|
|
720
|
+
SmartTableSheetFileSourceSchema,
|
|
721
|
+
SmartTableSheetRequestLogsSourceSchema,
|
|
722
|
+
]).describe("Source for the new sheet: file or request_logs"),
|
|
723
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
724
|
+
});
|
|
725
|
+
|
|
726
|
+
export const GetSmartTableSheetArgsSchema = z.object({
|
|
727
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
728
|
+
sheet_id: UuidSchema.describe("Sheet UUID"),
|
|
729
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
730
|
+
});
|
|
731
|
+
|
|
732
|
+
export const UpdateSmartTableSheetArgsSchema = z.object({
|
|
733
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
734
|
+
sheet_id: UuidSchema.describe("Sheet UUID"),
|
|
735
|
+
title: z.string().min(1).max(255).optional().describe("New sheet title"),
|
|
736
|
+
index: z.number().int().min(0).optional().describe("New sheet index"),
|
|
737
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
738
|
+
});
|
|
739
|
+
|
|
740
|
+
export const GetSmartTableSheetImportOperationArgsSchema = z.object({
|
|
741
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
742
|
+
operation_id: z.string().min(1).describe("Import operation ID"),
|
|
743
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
744
|
+
});
|
|
745
|
+
|
|
746
|
+
export const ImportSmartTableSheetFileArgsSchema = z.object({
|
|
747
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
748
|
+
sheet_id: UuidSchema.describe("Sheet UUID"),
|
|
749
|
+
operation_id: z.string().optional().describe("Optional idempotency/status operation ID"),
|
|
750
|
+
file_name: z.string().min(1).max(255).describe("CSV file name"),
|
|
751
|
+
file_content_base64: z.string().min(1).describe("Base64-encoded CSV content"),
|
|
752
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
753
|
+
});
|
|
754
|
+
|
|
755
|
+
export const ImportSmartTableSheetRequestLogsArgsSchema = z.object({
|
|
756
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
757
|
+
sheet_id: UuidSchema.describe("Sheet UUID"),
|
|
758
|
+
operation_id: z.string().optional().describe("Optional idempotency/status operation ID"),
|
|
759
|
+
...SmartTableRequestLogImportBaseShape,
|
|
760
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
761
|
+
});
|
|
762
|
+
|
|
763
|
+
export const ListSmartTableColumnsArgsSchema = z.object({
|
|
764
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
765
|
+
sheet_id: UuidSchema.describe("Sheet UUID"),
|
|
766
|
+
...CursorPaginationShape,
|
|
767
|
+
sort: z.enum(["position_rank"]).optional().describe("Sort field (default: position_rank)"),
|
|
768
|
+
order: z.enum(["asc", "desc"]).optional().describe("Sort direction (default: asc)"),
|
|
769
|
+
include_system_columns: z.boolean().optional().describe("Include system columns in the response"),
|
|
770
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
771
|
+
});
|
|
772
|
+
|
|
773
|
+
export const CreateSmartTableColumnArgsSchema = z.object({
|
|
774
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
775
|
+
sheet_id: UuidSchema.describe("Sheet UUID"),
|
|
776
|
+
title: z.string().min(1).max(255).describe("Column title"),
|
|
777
|
+
type: SmartTableColumnTypeSchema,
|
|
778
|
+
config: z.record(z.unknown()).nullable().optional().describe("Column-type-specific configuration"),
|
|
779
|
+
dependencies: z.array(SmartTableColumnDependencySchema).nullable().optional().describe("Column dependencies"),
|
|
780
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
781
|
+
});
|
|
782
|
+
|
|
783
|
+
export const UpdateSmartTableColumnArgsSchema = z.object({
|
|
784
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
785
|
+
sheet_id: UuidSchema.describe("Sheet UUID"),
|
|
786
|
+
column_id: UuidSchema.describe("Column UUID"),
|
|
787
|
+
title: z.string().min(1).max(255).optional().describe("New column title"),
|
|
788
|
+
config: z.record(z.unknown()).nullable().optional().describe("Replacement column configuration"),
|
|
789
|
+
dependencies: z.array(SmartTableColumnDependencySchema).nullable().optional().describe("Replacement column dependencies"),
|
|
790
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
791
|
+
});
|
|
792
|
+
|
|
793
|
+
export const ListSmartTableRowsArgsSchema = z.object({
|
|
794
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
795
|
+
sheet_id: UuidSchema.describe("Sheet UUID"),
|
|
796
|
+
...CursorPaginationShape,
|
|
797
|
+
sort: z.enum(["row_index"]).optional().describe("Sort field (default: row_index)"),
|
|
798
|
+
order: z.enum(["asc", "desc"]).optional().describe("Sort direction (default: asc)"),
|
|
799
|
+
include_columns: z.boolean().optional().describe("Include column metadata"),
|
|
800
|
+
include_row_count: z.boolean().optional().describe("Include total row count"),
|
|
801
|
+
include_system_columns: z.boolean().optional().describe("Include system columns"),
|
|
802
|
+
include_execution_metadata_aggregates: z.boolean().optional().describe("Include execution metadata aggregates"),
|
|
803
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
804
|
+
});
|
|
805
|
+
|
|
806
|
+
export const AddSmartTableRowsArgsSchema = z.object({
|
|
807
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
808
|
+
sheet_id: UuidSchema.describe("Sheet UUID"),
|
|
809
|
+
count: z.number().int().min(1).max(100).optional().describe("Number of rows to add (default: 1, max: 100)"),
|
|
810
|
+
values: z.array(z.record(z.unknown())).max(100).optional().describe("Optional row values, keyed by column UUID"),
|
|
811
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
812
|
+
});
|
|
813
|
+
|
|
814
|
+
export const GetSmartTableCellArgsSchema = z.object({
|
|
815
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
816
|
+
sheet_id: UuidSchema.describe("Sheet UUID"),
|
|
817
|
+
cell_id: UuidSchema.describe("Cell UUID"),
|
|
818
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
819
|
+
});
|
|
820
|
+
|
|
821
|
+
export const UpdateSmartTableCellArgsSchema = z.object({
|
|
822
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
823
|
+
sheet_id: UuidSchema.describe("Sheet UUID"),
|
|
824
|
+
cell_id: UuidSchema.describe("Cell UUID"),
|
|
825
|
+
display_value: z.string().nullable().optional().describe("Text to display for a text cell"),
|
|
826
|
+
value: z.unknown().optional().describe("Structured cell value"),
|
|
827
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
828
|
+
});
|
|
829
|
+
|
|
830
|
+
export const RecalculateSmartTableCellArgsSchema = z.object({
|
|
831
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
832
|
+
sheet_id: UuidSchema.describe("Sheet UUID"),
|
|
833
|
+
cell_id: UuidSchema.describe("Cell UUID"),
|
|
834
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
835
|
+
});
|
|
836
|
+
|
|
837
|
+
export const RecalculateSmartTableCellsArgsSchema = z.object({
|
|
838
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
839
|
+
sheet_id: UuidSchema.describe("Sheet UUID"),
|
|
840
|
+
cell_ids: z.array(UuidSchema).min(1).describe("Cell UUIDs to recalculate"),
|
|
841
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
842
|
+
});
|
|
843
|
+
|
|
844
|
+
export const ListSmartTableOperationsArgsSchema = z.object({
|
|
845
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
846
|
+
sheet_id: UuidSchema.describe("Sheet UUID"),
|
|
847
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
848
|
+
});
|
|
849
|
+
|
|
850
|
+
export const CreateSmartTableOperationArgsSchema = z.object({
|
|
851
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
852
|
+
sheet_id: UuidSchema.describe("Sheet UUID"),
|
|
853
|
+
operation: z.enum(["recalculate"]).optional().describe("Operation to run (default: recalculate)"),
|
|
854
|
+
column_ids: z.array(UuidSchema).optional().describe("Limit recalculation to these column UUIDs"),
|
|
855
|
+
row_ids: z.array(z.number().int()).optional().describe("Limit recalculation to these row IDs"),
|
|
856
|
+
statuses: z.array(SmartCellStatusSchema).optional().describe("Cell statuses to recalculate. Empty array means no status filter."),
|
|
857
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
858
|
+
});
|
|
859
|
+
|
|
860
|
+
export const GetSmartTableOperationArgsSchema = z.object({
|
|
861
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
862
|
+
sheet_id: UuidSchema.describe("Sheet UUID"),
|
|
863
|
+
operation_id: z.string().min(1).describe("Operation/execution ID"),
|
|
864
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
865
|
+
});
|
|
866
|
+
|
|
867
|
+
export const CancelSmartTableOperationArgsSchema = GetSmartTableOperationArgsSchema;
|
|
868
|
+
|
|
869
|
+
export const GetSmartTableScoreArgsSchema = z.object({
|
|
870
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
871
|
+
sheet_id: UuidSchema.describe("Sheet UUID"),
|
|
872
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
873
|
+
});
|
|
874
|
+
|
|
875
|
+
export const ConfigureSmartTableScoreArgsSchema = z.object({
|
|
876
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
877
|
+
sheet_id: UuidSchema.describe("Sheet UUID"),
|
|
878
|
+
score_type: z.enum(["auto", "boolean", "numeric", "custom"]).optional().describe("Score configuration type"),
|
|
879
|
+
score_config: z.record(z.unknown()).optional().describe("Full backend score configuration"),
|
|
880
|
+
column_ids: z.array(UuidSchema).optional().describe("Column UUIDs to include in the score"),
|
|
881
|
+
column_names: z.array(z.string()).optional().describe("Column names to include in the score"),
|
|
882
|
+
code: z.string().min(1).max(50000).optional().describe("Custom score code. Implies score_type=custom."),
|
|
883
|
+
code_language: z.enum(["PYTHON", "JAVASCRIPT"]).optional().describe("Custom score code language (default: PYTHON)"),
|
|
884
|
+
true_values: z.array(z.string()).optional().describe("Values treated as true for boolean scoring"),
|
|
885
|
+
false_values: z.array(z.string()).optional().describe("Values treated as false for boolean scoring"),
|
|
886
|
+
assertion_aggregation: z.enum(["all", "any", "mean"]).optional().describe("How boolean assertions are aggregated"),
|
|
887
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
888
|
+
});
|
|
889
|
+
|
|
890
|
+
export const RecalculateSmartTableScoreArgsSchema = GetSmartTableScoreArgsSchema;
|
|
891
|
+
|
|
892
|
+
export const ListSmartTableVersionsArgsSchema = z.object({
|
|
893
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
894
|
+
sheet_id: UuidSchema.describe("Sheet UUID"),
|
|
895
|
+
...CursorPaginationShape,
|
|
896
|
+
sort: z.enum(["version_number"]).optional().describe("Sort field (default: version_number)"),
|
|
897
|
+
order: z.enum(["asc", "desc"]).optional().describe("Sort direction (default: desc)"),
|
|
898
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
899
|
+
});
|
|
900
|
+
|
|
901
|
+
export const GetSmartTableVersionArgsSchema = z.object({
|
|
902
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
903
|
+
sheet_id: UuidSchema.describe("Sheet UUID"),
|
|
904
|
+
version_id: UuidSchema.describe("Version UUID"),
|
|
905
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
906
|
+
});
|
|
907
|
+
|
|
908
|
+
export const CreateSmartTableVersionArgsSchema = z.object({
|
|
909
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
910
|
+
sheet_id: UuidSchema.describe("Sheet UUID"),
|
|
911
|
+
name: z.string().min(1).max(255).optional().describe("Name for a new snapshot version"),
|
|
912
|
+
source_version_id: UuidSchema.optional().describe("Existing version UUID to restore"),
|
|
913
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
914
|
+
});
|
|
915
|
+
|
|
916
|
+
export const GetSmartTableScoreHistoryArgsSchema = z.object({
|
|
917
|
+
table_id: UuidSchema.describe("Smart Table UUID"),
|
|
918
|
+
sheet_id: UuidSchema.describe("Sheet UUID"),
|
|
919
|
+
max_points: z.number().int().min(50).max(5000).optional().describe("Maximum score-history points (default: 1200)"),
|
|
920
|
+
range: z.string().optional().describe("Score-history range, e.g. all, last_25, last_50, last_100, last_250"),
|
|
921
|
+
resolution: z.string().optional().describe("Score-history resolution (default: auto)"),
|
|
922
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
923
|
+
});
|
|
924
|
+
|
|
925
|
+
const LegacySmartTableMigrationSourceTypeSchema = z.enum(["dataset_group", "dataset", "report"]);
|
|
926
|
+
|
|
927
|
+
export const ListLegacySmartTableMigrationsArgsSchema = z.object({
|
|
928
|
+
source_type: LegacySmartTableMigrationSourceTypeSchema.optional().describe("Legacy source type to filter by"),
|
|
929
|
+
source_id: z.union([
|
|
930
|
+
z.number().int().positive(),
|
|
931
|
+
z.array(z.number().int().positive()),
|
|
932
|
+
]).optional().describe("One or more legacy source IDs. Requires source_type."),
|
|
933
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
934
|
+
});
|
|
935
|
+
|
|
936
|
+
export const PreviewLegacySmartTableMigrationArgsSchema = z.object({
|
|
937
|
+
source_type: LegacySmartTableMigrationSourceTypeSchema.describe("Legacy source type"),
|
|
938
|
+
source_id: z.number().int().positive().describe("Legacy source ID"),
|
|
939
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
940
|
+
});
|
|
941
|
+
|
|
942
|
+
export const MigrateLegacyToSmartTableArgsSchema = z.object({
|
|
943
|
+
source_type: LegacySmartTableMigrationSourceTypeSchema.describe("Legacy source type"),
|
|
944
|
+
source_id: z.number().int().positive().describe("Legacy source ID"),
|
|
945
|
+
force: z.boolean().optional().describe("Force remigration of an already migrated source"),
|
|
946
|
+
dry_run: z.boolean().optional().describe("Preview migration work without writing data"),
|
|
947
|
+
resume: z.boolean().optional().describe("Resume prior migration progress when available"),
|
|
948
|
+
continue_on_error: z.boolean().optional().describe("Continue migration after row/column-level errors"),
|
|
949
|
+
include_reports_with_missing_datasets: z.boolean().optional().describe("Include reports even if their datasets are missing"),
|
|
950
|
+
max_version_snapshot_cells: z.number().int().min(0).optional().describe("Maximum cells to snapshot per migrated version"),
|
|
951
|
+
report_preview_row_limit: z.number().int().min(0).optional().describe("Rows to include in migrated report previews"),
|
|
952
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
953
|
+
});
|
|
954
|
+
|
|
955
|
+
export const GetLegacySmartTableMigrationJobArgsSchema = z.object({
|
|
956
|
+
job_id: z.string().min(1).describe("Legacy Smart Table migration job ID"),
|
|
957
|
+
api_key: z.string().optional().describe("PromptLayer API key (optional, defaults to PROMPTLAYER_API_KEY env var)"),
|
|
958
|
+
});
|
|
959
|
+
|
|
801
960
|
|
|
802
961
|
export type GetPromptTemplateParams = Omit<
|
|
803
962
|
z.infer<typeof GetPromptTemplateArgsSchema>,
|
|
@@ -959,146 +1118,258 @@ export const TOOL_DEFINITIONS = {
|
|
|
959
1118
|
annotations: { readOnlyHint: false },
|
|
960
1119
|
},
|
|
961
1120
|
|
|
962
|
-
// ──
|
|
963
|
-
"list-
|
|
964
|
-
name: "list-
|
|
965
|
-
description:
|
|
966
|
-
|
|
1121
|
+
// ── Smart Tables ───────────────────────────────────────────────────
|
|
1122
|
+
"list-smart-tables": {
|
|
1123
|
+
name: "list-smart-tables",
|
|
1124
|
+
description:
|
|
1125
|
+
"List Smart Tables with cursor pagination. Smart Tables are PromptLayer's general-purpose data and " +
|
|
1126
|
+
"computation layer — use them to organise test datasets, run prompt templates across rows, assert " +
|
|
1127
|
+
"on outputs, compare results, build evaluations, or track regression over time. " +
|
|
1128
|
+
"Filter by folder, title, or referenced prompt.",
|
|
1129
|
+
inputSchema: ListSmartTablesArgsSchema,
|
|
967
1130
|
annotations: { readOnlyHint: true },
|
|
968
1131
|
},
|
|
969
|
-
"create-
|
|
970
|
-
name: "create-
|
|
971
|
-
description:
|
|
972
|
-
|
|
1132
|
+
"create-smart-table": {
|
|
1133
|
+
name: "create-smart-table",
|
|
1134
|
+
description:
|
|
1135
|
+
"Create a Smart Table. Tables are general-purpose — they can hold any tabular data and run " +
|
|
1136
|
+
"computed columns (PROMPT_TEMPLATE, LLM_ASSERTION, CODE_EXECUTION, COMPARE, etc.) over rows. " +
|
|
1137
|
+
"Common uses include evaluations, regression testing, prompt comparisons, and dataset curation. " +
|
|
1138
|
+
"After creating a table, add a sheet, then add columns and rows (or import request logs).",
|
|
1139
|
+
inputSchema: CreateSmartTableArgsSchema,
|
|
973
1140
|
annotations: { readOnlyHint: false },
|
|
974
1141
|
},
|
|
975
|
-
"
|
|
976
|
-
name: "
|
|
977
|
-
description: "
|
|
978
|
-
inputSchema:
|
|
1142
|
+
"get-smart-table": {
|
|
1143
|
+
name: "get-smart-table",
|
|
1144
|
+
description: "Get a Smart Table by UUID, including sheet counts and row counts.",
|
|
1145
|
+
inputSchema: GetSmartTableArgsSchema,
|
|
1146
|
+
annotations: { readOnlyHint: true },
|
|
1147
|
+
},
|
|
1148
|
+
"update-smart-table": {
|
|
1149
|
+
name: "update-smart-table",
|
|
1150
|
+
description: "Update a Smart Table title or folder.",
|
|
1151
|
+
inputSchema: UpdateSmartTableArgsSchema,
|
|
979
1152
|
annotations: { readOnlyHint: false },
|
|
980
1153
|
},
|
|
981
|
-
"
|
|
982
|
-
name: "
|
|
1154
|
+
"list-smart-table-sheets": {
|
|
1155
|
+
name: "list-smart-table-sheets",
|
|
1156
|
+
description: "List sheets in a Smart Table with cursor pagination.",
|
|
1157
|
+
inputSchema: ListSmartTableSheetsArgsSchema,
|
|
1158
|
+
annotations: { readOnlyHint: true },
|
|
1159
|
+
},
|
|
1160
|
+
"create-smart-table-sheet": {
|
|
1161
|
+
name: "create-smart-table-sheet",
|
|
983
1162
|
description:
|
|
984
|
-
"
|
|
985
|
-
"
|
|
986
|
-
"
|
|
987
|
-
"
|
|
988
|
-
|
|
989
|
-
inputSchema: CreateDatasetVersionFromFilterParamsArgsSchema,
|
|
1163
|
+
"Add a sheet (tab) to a Smart Table. Two source types:\n" +
|
|
1164
|
+
" - file: seed rows from a base64-encoded CSV or JSON file.\n" +
|
|
1165
|
+
" - request_logs: import historical request logs from PromptLayer by filter or explicit IDs — " +
|
|
1166
|
+
" use this to build datasets from real production traffic for evaluation or analysis.",
|
|
1167
|
+
inputSchema: CreateSmartTableSheetArgsSchema,
|
|
990
1168
|
annotations: { readOnlyHint: false },
|
|
991
1169
|
},
|
|
992
|
-
"get-
|
|
993
|
-
name: "get-
|
|
994
|
-
description: "Get
|
|
995
|
-
inputSchema:
|
|
1170
|
+
"get-smart-table-sheet": {
|
|
1171
|
+
name: "get-smart-table-sheet",
|
|
1172
|
+
description: "Get a single Smart Table sheet.",
|
|
1173
|
+
inputSchema: GetSmartTableSheetArgsSchema,
|
|
996
1174
|
annotations: { readOnlyHint: true },
|
|
997
1175
|
},
|
|
998
|
-
"
|
|
999
|
-
name: "
|
|
1000
|
-
description: "
|
|
1001
|
-
inputSchema:
|
|
1176
|
+
"update-smart-table-sheet": {
|
|
1177
|
+
name: "update-smart-table-sheet",
|
|
1178
|
+
description: "Update a Smart Table sheet title or index.",
|
|
1179
|
+
inputSchema: UpdateSmartTableSheetArgsSchema,
|
|
1002
1180
|
annotations: { readOnlyHint: false },
|
|
1003
1181
|
},
|
|
1004
|
-
"
|
|
1005
|
-
name: "
|
|
1006
|
-
description: "
|
|
1007
|
-
inputSchema:
|
|
1182
|
+
"get-smart-table-sheet-import-operation": {
|
|
1183
|
+
name: "get-smart-table-sheet-import-operation",
|
|
1184
|
+
description: "Get status for a Smart Table sheet import operation.",
|
|
1185
|
+
inputSchema: GetSmartTableSheetImportOperationArgsSchema,
|
|
1186
|
+
annotations: { readOnlyHint: true },
|
|
1187
|
+
},
|
|
1188
|
+
"import-smart-table-sheet-file": {
|
|
1189
|
+
name: "import-smart-table-sheet-file",
|
|
1190
|
+
description: "Import base64 CSV content into an existing Smart Table sheet.",
|
|
1191
|
+
inputSchema: ImportSmartTableSheetFileArgsSchema,
|
|
1008
1192
|
annotations: { readOnlyHint: false },
|
|
1009
1193
|
},
|
|
1010
|
-
"
|
|
1011
|
-
name: "
|
|
1012
|
-
description:
|
|
1013
|
-
|
|
1194
|
+
"import-smart-table-sheet-request-logs": {
|
|
1195
|
+
name: "import-smart-table-sheet-request-logs",
|
|
1196
|
+
description:
|
|
1197
|
+
"Import historical request logs from PromptLayer into a Smart Table sheet. Provide either explicit " +
|
|
1198
|
+
"request_log_ids or a filter_group (same syntax as search-request-logs — filter by model, prompt, " +
|
|
1199
|
+
"metadata, date range, status, etc.). Use this to add production traffic rows to a table for " +
|
|
1200
|
+
"evaluation, comparison, or any other analysis.",
|
|
1201
|
+
inputSchema: ImportSmartTableSheetRequestLogsArgsSchema,
|
|
1014
1202
|
annotations: { readOnlyHint: false },
|
|
1015
1203
|
},
|
|
1016
|
-
"
|
|
1017
|
-
name: "
|
|
1018
|
-
description: "
|
|
1019
|
-
inputSchema:
|
|
1204
|
+
"list-smart-table-columns": {
|
|
1205
|
+
name: "list-smart-table-columns",
|
|
1206
|
+
description: "List columns in a Smart Table sheet.",
|
|
1207
|
+
inputSchema: ListSmartTableColumnsArgsSchema,
|
|
1208
|
+
annotations: { readOnlyHint: true },
|
|
1209
|
+
},
|
|
1210
|
+
"create-smart-table-column": {
|
|
1211
|
+
name: "create-smart-table-column",
|
|
1212
|
+
description:
|
|
1213
|
+
"Add a column to a Smart Table sheet. Common types:\n" +
|
|
1214
|
+
" - PROMPT_TEMPLATE: run a prompt template against each row (e.g. regression testing or A/B comparison).\n" +
|
|
1215
|
+
" - LLM_ASSERTION: use an LLM to judge or assert something about a row's values.\n" +
|
|
1216
|
+
" - CODE_EXECUTION: run custom Python/JS logic per row.\n" +
|
|
1217
|
+
" - COMPARE: compare two column values side-by-side.\n" +
|
|
1218
|
+
" - CONTAINS / REGEX: string-matching checks.\n" +
|
|
1219
|
+
" - TEXT: static or manually entered text.\n" +
|
|
1220
|
+
" - DATASET: read a field from the imported dataset rows.\n" +
|
|
1221
|
+
"Use uppercase type values. Columns can depend on other columns via the dependencies field.",
|
|
1222
|
+
inputSchema: CreateSmartTableColumnArgsSchema,
|
|
1020
1223
|
annotations: { readOnlyHint: false },
|
|
1021
1224
|
},
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1225
|
+
"update-smart-table-column": {
|
|
1226
|
+
name: "update-smart-table-column",
|
|
1227
|
+
description: "Update a Smart Table column title, config, or dependencies. Column type and position are not changed by this tool.",
|
|
1228
|
+
inputSchema: UpdateSmartTableColumnArgsSchema,
|
|
1229
|
+
annotations: { readOnlyHint: false },
|
|
1230
|
+
},
|
|
1231
|
+
"list-smart-table-rows": {
|
|
1232
|
+
name: "list-smart-table-rows",
|
|
1233
|
+
description: "List rows in a Smart Table sheet with optional column metadata and row counts.",
|
|
1234
|
+
inputSchema: ListSmartTableRowsArgsSchema,
|
|
1028
1235
|
annotations: { readOnlyHint: true },
|
|
1029
1236
|
},
|
|
1030
|
-
"
|
|
1031
|
-
name: "
|
|
1032
|
-
description: "
|
|
1033
|
-
inputSchema:
|
|
1237
|
+
"add-smart-table-rows": {
|
|
1238
|
+
name: "add-smart-table-rows",
|
|
1239
|
+
description: "Add up to 100 rows to a Smart Table sheet, optionally with values keyed by column UUID.",
|
|
1240
|
+
inputSchema: AddSmartTableRowsArgsSchema,
|
|
1241
|
+
annotations: { readOnlyHint: false },
|
|
1242
|
+
},
|
|
1243
|
+
"get-smart-table-cell": {
|
|
1244
|
+
name: "get-smart-table-cell",
|
|
1245
|
+
description: "Get a Smart Table cell by UUID.",
|
|
1246
|
+
inputSchema: GetSmartTableCellArgsSchema,
|
|
1034
1247
|
annotations: { readOnlyHint: true },
|
|
1035
1248
|
},
|
|
1036
|
-
"
|
|
1037
|
-
name: "
|
|
1038
|
-
description: "
|
|
1039
|
-
inputSchema:
|
|
1249
|
+
"update-smart-table-cell": {
|
|
1250
|
+
name: "update-smart-table-cell",
|
|
1251
|
+
description: "Update a Smart Table text cell. Computed cells should be recalculated instead.",
|
|
1252
|
+
inputSchema: UpdateSmartTableCellArgsSchema,
|
|
1040
1253
|
annotations: { readOnlyHint: false },
|
|
1041
1254
|
},
|
|
1042
|
-
"
|
|
1043
|
-
name: "
|
|
1044
|
-
description: "
|
|
1045
|
-
inputSchema:
|
|
1255
|
+
"recalculate-smart-table-cell": {
|
|
1256
|
+
name: "recalculate-smart-table-cell",
|
|
1257
|
+
description: "Queue recalculation for one Smart Table computed cell.",
|
|
1258
|
+
inputSchema: RecalculateSmartTableCellArgsSchema,
|
|
1046
1259
|
annotations: { readOnlyHint: false },
|
|
1047
1260
|
},
|
|
1048
|
-
"
|
|
1049
|
-
name: "
|
|
1050
|
-
description: "
|
|
1051
|
-
inputSchema:
|
|
1052
|
-
annotations: { readOnlyHint:
|
|
1261
|
+
"recalculate-smart-table-cells": {
|
|
1262
|
+
name: "recalculate-smart-table-cells",
|
|
1263
|
+
description: "Queue recalculation for multiple Smart Table computed cells.",
|
|
1264
|
+
inputSchema: RecalculateSmartTableCellsArgsSchema,
|
|
1265
|
+
annotations: { readOnlyHint: false },
|
|
1053
1266
|
},
|
|
1054
|
-
"
|
|
1055
|
-
name: "
|
|
1056
|
-
description: "
|
|
1057
|
-
inputSchema:
|
|
1267
|
+
"list-smart-table-operations": {
|
|
1268
|
+
name: "list-smart-table-operations",
|
|
1269
|
+
description: "List active Smart Table sheet operations and cell status counts.",
|
|
1270
|
+
inputSchema: ListSmartTableOperationsArgsSchema,
|
|
1058
1271
|
annotations: { readOnlyHint: true },
|
|
1059
1272
|
},
|
|
1060
|
-
"
|
|
1061
|
-
name: "
|
|
1062
|
-
description:
|
|
1063
|
-
|
|
1273
|
+
"create-smart-table-operation": {
|
|
1274
|
+
name: "create-smart-table-operation",
|
|
1275
|
+
description:
|
|
1276
|
+
"Trigger a recalculate operation on a Smart Table sheet — executes all computed columns " +
|
|
1277
|
+
"(PROMPT_TEMPLATE, LLM_ASSERTION, CODE_EXECUTION, etc.) for the selected rows and columns. " +
|
|
1278
|
+
"Scope the run with column_ids, row_ids, or statuses (e.g. only STALE cells). " +
|
|
1279
|
+
"Returns an operation_id to poll with get-smart-table-operation.",
|
|
1280
|
+
inputSchema: CreateSmartTableOperationArgsSchema,
|
|
1064
1281
|
annotations: { readOnlyHint: false },
|
|
1065
1282
|
},
|
|
1066
|
-
"
|
|
1067
|
-
name: "
|
|
1068
|
-
description: "
|
|
1069
|
-
inputSchema:
|
|
1070
|
-
annotations: { readOnlyHint:
|
|
1283
|
+
"get-smart-table-operation": {
|
|
1284
|
+
name: "get-smart-table-operation",
|
|
1285
|
+
description: "Get status for a Smart Table sheet operation.",
|
|
1286
|
+
inputSchema: GetSmartTableOperationArgsSchema,
|
|
1287
|
+
annotations: { readOnlyHint: true },
|
|
1071
1288
|
},
|
|
1072
|
-
"
|
|
1073
|
-
name: "
|
|
1074
|
-
description: "
|
|
1075
|
-
inputSchema:
|
|
1289
|
+
"cancel-smart-table-operation": {
|
|
1290
|
+
name: "cancel-smart-table-operation",
|
|
1291
|
+
description: "Cancel an active Smart Table sheet operation.",
|
|
1292
|
+
inputSchema: CancelSmartTableOperationArgsSchema,
|
|
1076
1293
|
annotations: { readOnlyHint: false },
|
|
1077
1294
|
},
|
|
1078
|
-
"
|
|
1079
|
-
name: "
|
|
1080
|
-
description:
|
|
1081
|
-
|
|
1295
|
+
"get-smart-table-score": {
|
|
1296
|
+
name: "get-smart-table-score",
|
|
1297
|
+
description:
|
|
1298
|
+
"Get the configured score and current aggregate result for a Smart Table sheet. " +
|
|
1299
|
+
"Useful when the sheet is being used as an evaluation — the score summarises how well the " +
|
|
1300
|
+
"assertion/computation columns performed across all rows.",
|
|
1301
|
+
inputSchema: GetSmartTableScoreArgsSchema,
|
|
1302
|
+
annotations: { readOnlyHint: true },
|
|
1303
|
+
},
|
|
1304
|
+
"configure-smart-table-score": {
|
|
1305
|
+
name: "configure-smart-table-score",
|
|
1306
|
+
description:
|
|
1307
|
+
"Configure scoring for a Smart Table sheet. Choose which columns contribute, set score_type " +
|
|
1308
|
+
"(auto, boolean, numeric, or custom), supply custom Python/JS aggregation code, or pass a full " +
|
|
1309
|
+
"score_config object.",
|
|
1310
|
+
inputSchema: ConfigureSmartTableScoreArgsSchema,
|
|
1082
1311
|
annotations: { readOnlyHint: false },
|
|
1083
1312
|
},
|
|
1084
|
-
"
|
|
1085
|
-
name: "
|
|
1086
|
-
description: "
|
|
1087
|
-
inputSchema:
|
|
1313
|
+
"recalculate-smart-table-score": {
|
|
1314
|
+
name: "recalculate-smart-table-score",
|
|
1315
|
+
description: "Recompute the aggregate score for a Smart Table sheet.",
|
|
1316
|
+
inputSchema: RecalculateSmartTableScoreArgsSchema,
|
|
1088
1317
|
annotations: { readOnlyHint: false },
|
|
1089
1318
|
},
|
|
1090
|
-
"
|
|
1091
|
-
name: "
|
|
1092
|
-
description:
|
|
1093
|
-
|
|
1319
|
+
"list-smart-table-versions": {
|
|
1320
|
+
name: "list-smart-table-versions",
|
|
1321
|
+
description:
|
|
1322
|
+
"List saved snapshots (versions) for a Smart Table sheet. Versions capture the state of all rows " +
|
|
1323
|
+
"and cells at a point in time — useful for tracking how results change across prompt updates or runs.",
|
|
1324
|
+
inputSchema: ListSmartTableVersionsArgsSchema,
|
|
1325
|
+
annotations: { readOnlyHint: true },
|
|
1326
|
+
},
|
|
1327
|
+
"get-smart-table-version": {
|
|
1328
|
+
name: "get-smart-table-version",
|
|
1329
|
+
description: "Get a saved Smart Table sheet version, including its full snapshot of cell values.",
|
|
1330
|
+
inputSchema: GetSmartTableVersionArgsSchema,
|
|
1331
|
+
annotations: { readOnlyHint: true },
|
|
1332
|
+
},
|
|
1333
|
+
"create-smart-table-version": {
|
|
1334
|
+
name: "create-smart-table-version",
|
|
1335
|
+
description:
|
|
1336
|
+
"Save a named snapshot of a Smart Table sheet's current state — useful for capturing results " +
|
|
1337
|
+
"before making changes so you can compare later. Pass source_version_id to restore a prior snapshot.",
|
|
1338
|
+
inputSchema: CreateSmartTableVersionArgsSchema,
|
|
1094
1339
|
annotations: { readOnlyHint: false },
|
|
1095
1340
|
},
|
|
1096
|
-
"
|
|
1097
|
-
name: "
|
|
1098
|
-
description:
|
|
1099
|
-
|
|
1341
|
+
"get-smart-table-score-history": {
|
|
1342
|
+
name: "get-smart-table-score-history",
|
|
1343
|
+
description:
|
|
1344
|
+
"Get score history across saved versions for a Smart Table sheet. Use this to track how scores " +
|
|
1345
|
+
"change over time — useful for regression monitoring when the sheet is used as an evaluation.",
|
|
1346
|
+
inputSchema: GetSmartTableScoreHistoryArgsSchema,
|
|
1347
|
+
annotations: { readOnlyHint: true },
|
|
1348
|
+
},
|
|
1349
|
+
"list-legacy-smart-table-migrations": {
|
|
1350
|
+
name: "list-legacy-smart-table-migrations",
|
|
1351
|
+
description: "List successful legacy dataset/evaluation to Smart Table migration mappings.",
|
|
1352
|
+
inputSchema: ListLegacySmartTableMigrationsArgsSchema,
|
|
1353
|
+
annotations: { readOnlyHint: true },
|
|
1354
|
+
},
|
|
1355
|
+
"preview-legacy-smart-table-migration": {
|
|
1356
|
+
name: "preview-legacy-smart-table-migration",
|
|
1357
|
+
description: "Preview conversion of a legacy dataset group, dataset, or report into a Smart Table.",
|
|
1358
|
+
inputSchema: PreviewLegacySmartTableMigrationArgsSchema,
|
|
1359
|
+
annotations: { readOnlyHint: true },
|
|
1360
|
+
},
|
|
1361
|
+
"migrate-legacy-to-smart-table": {
|
|
1362
|
+
name: "migrate-legacy-to-smart-table",
|
|
1363
|
+
description: "Start or dry-run conversion of a legacy dataset group, dataset, or report into a Smart Table.",
|
|
1364
|
+
inputSchema: MigrateLegacyToSmartTableArgsSchema,
|
|
1100
1365
|
annotations: { readOnlyHint: false },
|
|
1101
1366
|
},
|
|
1367
|
+
"get-legacy-smart-table-migration-job": {
|
|
1368
|
+
name: "get-legacy-smart-table-migration-job",
|
|
1369
|
+
description: "Get status and result details for a legacy Smart Table migration job.",
|
|
1370
|
+
inputSchema: GetLegacySmartTableMigrationJobArgsSchema,
|
|
1371
|
+
annotations: { readOnlyHint: true },
|
|
1372
|
+
},
|
|
1102
1373
|
|
|
1103
1374
|
// ── Agents / Workflows ──────────────────────────────────────────────
|
|
1104
1375
|
"list-workflows": {
|
|
@@ -1176,6 +1447,32 @@ export const TOOL_DEFINITIONS = {
|
|
|
1176
1447
|
annotations: { readOnlyHint: false },
|
|
1177
1448
|
},
|
|
1178
1449
|
|
|
1450
|
+
// ── Env Vars ────────────────────────────────────────────────────────
|
|
1451
|
+
"list-workspace-env-vars": {
|
|
1452
|
+
name: "list-workspace-env-vars",
|
|
1453
|
+
description: "List workspace-scoped environment variables. Returned values are masked (only `value_suffix` — last 4 chars). Workspace vars auto-inject into every auto-executing tool in this workspace; tool-scoped vars override them on the same key.",
|
|
1454
|
+
inputSchema: ListWorkspaceEnvVarsArgsSchema,
|
|
1455
|
+
annotations: { readOnlyHint: true },
|
|
1456
|
+
},
|
|
1457
|
+
"create-workspace-env-var": {
|
|
1458
|
+
name: "create-workspace-env-var",
|
|
1459
|
+
description: "Scaffold a workspace-scoped environment variable placeholder. Auto-injected into every auto-executing tool in this workspace. The value is always created empty; the user fills in the real value via Settings, Environment Variables. Key must match ^[A-Za-z_][A-Za-z0-9_]*$ and not collide with reserved runtime names.",
|
|
1460
|
+
inputSchema: CreateWorkspaceEnvVarArgsSchema,
|
|
1461
|
+
annotations: { readOnlyHint: false },
|
|
1462
|
+
},
|
|
1463
|
+
"list-tool-env-vars": {
|
|
1464
|
+
name: "list-tool-env-vars",
|
|
1465
|
+
description: "List tool-scoped environment variables for a specific tool (by ID or name). Returned values are masked (only `value_suffix`). Tool-scoped vars override workspace-scoped vars on the same key during sandbox execution.",
|
|
1466
|
+
inputSchema: ListToolEnvVarsArgsSchema,
|
|
1467
|
+
annotations: { readOnlyHint: true },
|
|
1468
|
+
},
|
|
1469
|
+
"create-tool-env-var": {
|
|
1470
|
+
name: "create-tool-env-var",
|
|
1471
|
+
description: "Scaffold a tool-scoped environment variable placeholder on a specific tool. Auto-injected only into THIS tool's sandbox execution and overrides any workspace-scoped var with the same key. The value is always created empty; the user fills in the real value via Settings.",
|
|
1472
|
+
inputSchema: CreateToolEnvVarArgsSchema,
|
|
1473
|
+
annotations: { readOnlyHint: false },
|
|
1474
|
+
},
|
|
1475
|
+
|
|
1179
1476
|
// ── Folders ─────────────────────────────────────────────────────────
|
|
1180
1477
|
"create-folder": {
|
|
1181
1478
|
name: "create-folder",
|