@promptlayer/mcp-server 1.2.0 → 1.3.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.
@@ -1,101 +0,0 @@
1
- /**
2
- * Pretty-prints all MCP tool names, descriptions, and annotations.
3
- *
4
- * Usage: npx tsx scripts/show-descriptions.ts
5
- */
6
-
7
- import { TOOL_DEFINITIONS } from "../src/types.js";
8
-
9
- const CATEGORY_ORDER = [
10
- "Prompt Templates",
11
- "Tracking",
12
- "Datasets",
13
- "Evaluations",
14
- "Agents / Workflows",
15
- "Folders",
16
- ];
17
-
18
- // Derive categories from the comment markers in TOOL_DEFINITIONS
19
- const TOOL_CATEGORIES: Record<string, string> = {
20
- "get-prompt-template": "Prompt Templates",
21
- "get-prompt-template-raw": "Prompt Templates",
22
- "list-prompt-templates": "Prompt Templates",
23
- "publish-prompt-template": "Prompt Templates",
24
- "list-prompt-template-labels": "Prompt Templates",
25
- "create-prompt-label": "Prompt Templates",
26
- "move-prompt-label": "Prompt Templates",
27
- "delete-prompt-label": "Prompt Templates",
28
- "get-snippet-usage": "Prompt Templates",
29
- "log-request": "Tracking",
30
- "create-spans-bulk": "Tracking",
31
- "list-datasets": "Datasets",
32
- "create-dataset-group": "Datasets",
33
- "create-dataset-version-from-file": "Datasets",
34
- "create-dataset-version-from-filter-params": "Datasets",
35
- "list-evaluations": "Evaluations",
36
- "create-report": "Evaluations",
37
- "run-report": "Evaluations",
38
- "get-report": "Evaluations",
39
- "get-report-score": "Evaluations",
40
- "update-report-score-card": "Evaluations",
41
- "delete-reports-by-name": "Evaluations",
42
- "list-workflows": "Agents / Workflows",
43
- "get-workflow": "Agents / Workflows",
44
- "create-workflow": "Agents / Workflows",
45
- "patch-workflow": "Agents / Workflows",
46
- "run-workflow": "Agents / Workflows",
47
- "get-workflow-version-execution-results": "Agents / Workflows",
48
- "create-folder": "Folders",
49
- "edit-folder": "Folders",
50
- "get-folder-entities": "Folders",
51
- "move-folder-entities": "Folders",
52
- "delete-folder-entities": "Folders",
53
- "resolve-folder-id": "Folders",
54
- };
55
-
56
- // Group tools by category
57
- const grouped = new Map<string, { name: string; description: string; readOnly: boolean }[]>();
58
- for (const cat of CATEGORY_ORDER) grouped.set(cat, []);
59
-
60
- for (const [name, def] of Object.entries(TOOL_DEFINITIONS)) {
61
- const cat = TOOL_CATEGORIES[name] ?? "Other";
62
- if (!grouped.has(cat)) grouped.set(cat, []);
63
- grouped.get(cat)!.push({
64
- name,
65
- description: def.description,
66
- readOnly: (def.annotations as { readOnlyHint?: boolean })?.readOnlyHint ?? false,
67
- });
68
- }
69
-
70
- // Print
71
- const SEP = "─".repeat(80);
72
-
73
- for (const [category, tools] of grouped) {
74
- if (tools.length === 0) continue;
75
- console.log(`\n${"═".repeat(80)}`);
76
- console.log(` ${category.toUpperCase()} (${tools.length} tools)`);
77
- console.log(`${"═".repeat(80)}`);
78
-
79
- for (const tool of tools) {
80
- const badge = tool.readOnly ? "📖 read" : "✏️ write";
81
- console.log(`\n${SEP}`);
82
- console.log(` ${tool.name} [${badge}]`);
83
- console.log(SEP);
84
- // Word-wrap description at ~76 chars
85
- const words = tool.description.split(" ");
86
- let line = " ";
87
- for (const word of words) {
88
- if (line.length + word.length + 1 > 78) {
89
- console.log(line);
90
- line = " " + word;
91
- } else {
92
- line += (line.length > 2 ? " " : "") + word;
93
- }
94
- }
95
- if (line.trim()) console.log(line);
96
- }
97
- }
98
-
99
- console.log(`\n${"═".repeat(80)}`);
100
- console.log(` TOTAL: ${Object.keys(TOOL_DEFINITIONS).length} tools`);
101
- console.log(`${"═".repeat(80)}\n`);