ema-mcp-toolkit 0.2.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 +338 -0
- package/config.example.yaml +32 -0
- package/dist/cli/index.js +333 -0
- package/dist/config.js +136 -0
- package/dist/emaClient.js +398 -0
- package/dist/index.js +109 -0
- package/dist/mcp/handlers-consolidated.js +851 -0
- package/dist/mcp/index.js +15 -0
- package/dist/mcp/prompts.js +1753 -0
- package/dist/mcp/resources.js +624 -0
- package/dist/mcp/server.js +4585 -0
- package/dist/mcp/tools-consolidated.js +590 -0
- package/dist/mcp/tools-legacy.js +736 -0
- package/dist/models.js +8 -0
- package/dist/scheduler.js +21 -0
- package/dist/sdk/client.js +788 -0
- package/dist/sdk/config.js +136 -0
- package/dist/sdk/contracts.js +429 -0
- package/dist/sdk/generation-schema.js +189 -0
- package/dist/sdk/index.js +39 -0
- package/dist/sdk/knowledge.js +2780 -0
- package/dist/sdk/models.js +8 -0
- package/dist/sdk/state.js +88 -0
- package/dist/sdk/sync-options.js +216 -0
- package/dist/sdk/sync.js +220 -0
- package/dist/sdk/validation-rules.js +355 -0
- package/dist/sdk/workflow-generator.js +291 -0
- package/dist/sdk/workflow-intent.js +1585 -0
- package/dist/state.js +88 -0
- package/dist/sync.js +416 -0
- package/dist/syncOptions.js +216 -0
- package/dist/ui.js +334 -0
- package/docs/advisor-comms-assistant-fixes.md +175 -0
- package/docs/api-contracts.md +216 -0
- package/docs/auto-builder-analysis.md +271 -0
- package/docs/data-architecture.md +166 -0
- package/docs/ema-auto-builder-guide.html +394 -0
- package/docs/ema-user-guide.md +1121 -0
- package/docs/mcp-tools-guide.md +149 -0
- package/docs/naming-conventions.md +218 -0
- package/docs/tool-consolidation-proposal.md +427 -0
- package/package.json +95 -0
- package/resources/templates/chat-ai/README.md +119 -0
- package/resources/templates/chat-ai/persona-config.json +111 -0
- package/resources/templates/dashboard-ai/README.md +156 -0
- package/resources/templates/dashboard-ai/persona-config.json +180 -0
- package/resources/templates/voice-ai/README.md +123 -0
- package/resources/templates/voice-ai/persona-config.json +74 -0
- package/resources/templates/voice-ai/workflow-prompt.md +120 -0
|
@@ -0,0 +1,736 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Legacy MCP Tools (DEPRECATED - DISABLED BY DEFAULT)
|
|
3
|
+
*
|
|
4
|
+
* ⚠️ These tools are DISABLED by default to prevent LLM confusion.
|
|
5
|
+
* ⚠️ Only enable for migration period: EMA_ENABLE_LEGACY_TOOLS=true
|
|
6
|
+
*
|
|
7
|
+
* New integrations MUST use the consolidated tools from tools-consolidated.ts.
|
|
8
|
+
*
|
|
9
|
+
* Migration guide:
|
|
10
|
+
* - get_persona, find_personas → persona
|
|
11
|
+
* - get_workflow_action, find_workflow_actions → action
|
|
12
|
+
* - analyze_workflow, detect_workflow_issues, validate_workflow_connections, suggest_workflow_fixes → workflow(mode="analyze")
|
|
13
|
+
* - deploy_workflow, optimize_workflow → workflow(mode="deploy") or workflow(mode="optimize")
|
|
14
|
+
* - list_auto_builder_agents, get_auto_builder_agent, suggest_agents_for_use_case → action
|
|
15
|
+
* - get_workflow_pattern, list_workflow_patterns → template
|
|
16
|
+
* - check_type_compatibility, get_widget_reference, get_qualifying_questions → template
|
|
17
|
+
* - get_voice_persona_template → template(config="voice")
|
|
18
|
+
* - validate_workflow_prompt, get_auto_builder_guidance → reference
|
|
19
|
+
* - get_platform_concept, list_platform_concepts → reference
|
|
20
|
+
* - get_common_mistakes, get_debug_checklist, get_workflow_execution_model → reference
|
|
21
|
+
* - compare_workflow_versions, get_workflow_metrics → workflow(mode="analyze")
|
|
22
|
+
* - compile_workflow → workflow(mode="compile")
|
|
23
|
+
* - upload_data_source, delete_data_source, list_data_sources → knowledge
|
|
24
|
+
* - get_embedding_status, toggle_embedding → knowledge
|
|
25
|
+
* - sync, sync_info → sync
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* Generate legacy tool definitions
|
|
29
|
+
* @param envNames Available environment names
|
|
30
|
+
* @param defaultEnv Default environment name
|
|
31
|
+
*/
|
|
32
|
+
export function generateLegacyTools(envNames, defaultEnv) {
|
|
33
|
+
const envDesc = `Target environment. Available: ${envNames.join(", ") || "demo, staging, dev"}. Default: ${defaultEnv}`;
|
|
34
|
+
return [
|
|
35
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
36
|
+
// ENVIRONMENT
|
|
37
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
38
|
+
{
|
|
39
|
+
name: "list_environments",
|
|
40
|
+
description: "⚠️ DEPRECATED: Use `env` instead.\n\nList all available Ema environments that can be targeted. Shows which environment is the default.",
|
|
41
|
+
inputSchema: { type: "object", properties: {}, required: [] },
|
|
42
|
+
},
|
|
43
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
44
|
+
// PERSONAS (AI Employees)
|
|
45
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
46
|
+
{
|
|
47
|
+
name: "get_persona",
|
|
48
|
+
description: `⚠️ DEPRECATED: Use \`persona(id)\` instead.
|
|
49
|
+
|
|
50
|
+
🎯 UNIFIED persona retrieval. Replaces: get_ai_employee, get_ai_employee_by_name, get_ai_employee_full, get_ai_employee_fingerprint.
|
|
51
|
+
|
|
52
|
+
**Options**:
|
|
53
|
+
- include_workflow: Get full workflow_def (slower, needed for analysis/editing)
|
|
54
|
+
- include_fingerprint: Get config hash for sync detection
|
|
55
|
+
|
|
56
|
+
**Examples**:
|
|
57
|
+
- get_persona(identifier="abc-123") - Basic info by ID
|
|
58
|
+
- get_persona(identifier="IT Support Bot") - Basic info by name
|
|
59
|
+
- get_persona(identifier="abc-123", include_workflow=true) - Full workflow
|
|
60
|
+
- get_persona(identifier="abc-123", include_fingerprint=true) - With hash`,
|
|
61
|
+
inputSchema: {
|
|
62
|
+
type: "object",
|
|
63
|
+
properties: {
|
|
64
|
+
identifier: { type: "string", description: "Persona ID (UUID) or exact name" },
|
|
65
|
+
include_workflow: { type: "boolean", description: "Include full workflow_def (default: false)" },
|
|
66
|
+
include_fingerprint: { type: "boolean", description: "Include config hash (default: false)" },
|
|
67
|
+
env: { type: "string", description: envDesc },
|
|
68
|
+
},
|
|
69
|
+
required: ["identifier"],
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: "find_personas",
|
|
74
|
+
description: `⚠️ DEPRECATED: Use \`persona(all=true)\` instead.
|
|
75
|
+
|
|
76
|
+
🔍 UNIFIED persona search. Replaces: list_ai_employees, search_ai_employees.
|
|
77
|
+
|
|
78
|
+
**Examples**:
|
|
79
|
+
- find_personas() - List all with basic info
|
|
80
|
+
- find_personas(query="support") - Search by name
|
|
81
|
+
- find_personas(status="active") - Filter by status
|
|
82
|
+
- find_personas(limit=10) - Limit results`,
|
|
83
|
+
inputSchema: {
|
|
84
|
+
type: "object",
|
|
85
|
+
properties: {
|
|
86
|
+
query: { type: "string", description: "Search term (name match)" },
|
|
87
|
+
status: { type: "string", description: "Filter: 'active', 'inactive', 'draft'" },
|
|
88
|
+
trigger_type: { type: "string", description: "Filter: 'voice', 'chat', 'dashboard'" },
|
|
89
|
+
limit: { type: "number", description: "Max results (default: 50)" },
|
|
90
|
+
env: { type: "string", description: envDesc },
|
|
91
|
+
},
|
|
92
|
+
required: [],
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "create_ai_employee",
|
|
97
|
+
description: `⚠️ DEPRECATED: Use \`persona(mode="create")\` instead.
|
|
98
|
+
|
|
99
|
+
Create a new AI Employee (persona). REQUIRES either template_id, source_persona_id, OR persona_type.`,
|
|
100
|
+
inputSchema: {
|
|
101
|
+
type: "object",
|
|
102
|
+
properties: {
|
|
103
|
+
name: { type: "string", description: "Name for the new AI Employee" },
|
|
104
|
+
description: { type: "string", description: "Description" },
|
|
105
|
+
template_id: { type: "string", description: "Template ID to use" },
|
|
106
|
+
source_persona_id: { type: "string", description: "Clone from existing persona" },
|
|
107
|
+
persona_type: { type: "string", enum: ["voice", "chat", "dashboard"], description: "Create from default template" },
|
|
108
|
+
env: { type: "string", description: envDesc },
|
|
109
|
+
},
|
|
110
|
+
required: ["name"],
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: "update_ai_employee",
|
|
115
|
+
description: `⚠️ DEPRECATED: Use \`persona(mode="update")\` instead.
|
|
116
|
+
|
|
117
|
+
Update AI Employee METADATA (name, description, settings). For workflow changes, use deploy_workflow instead.`,
|
|
118
|
+
inputSchema: {
|
|
119
|
+
type: "object",
|
|
120
|
+
properties: {
|
|
121
|
+
persona_id: { type: "string", description: "The AI Employee ID to update" },
|
|
122
|
+
name: { type: "string", description: "New name" },
|
|
123
|
+
description: { type: "string", description: "New description" },
|
|
124
|
+
proto_config: { type: "object", description: "Persona configuration (voice settings, etc.)" },
|
|
125
|
+
env: { type: "string", description: envDesc },
|
|
126
|
+
},
|
|
127
|
+
required: ["persona_id"],
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: "compare_ai_employees",
|
|
132
|
+
description: `⚠️ DEPRECATED: Use \`persona(mode="compare")\` instead.
|
|
133
|
+
|
|
134
|
+
Compare two AI Employees to see their differences. Can compare across environments.`,
|
|
135
|
+
inputSchema: {
|
|
136
|
+
type: "object",
|
|
137
|
+
properties: {
|
|
138
|
+
id1: { type: "string", description: "First persona ID" },
|
|
139
|
+
id2: { type: "string", description: "Second persona ID" },
|
|
140
|
+
env1: { type: "string", description: "Environment for first persona" },
|
|
141
|
+
env2: { type: "string", description: "Environment for second persona" },
|
|
142
|
+
},
|
|
143
|
+
required: ["id1", "id2"],
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: "list_ai_employee_templates",
|
|
148
|
+
description: `⚠️ DEPRECATED: Use \`persona(templates=true)\` instead.
|
|
149
|
+
|
|
150
|
+
List all unique AI Employee templates used by existing AI Employees.`,
|
|
151
|
+
inputSchema: {
|
|
152
|
+
type: "object",
|
|
153
|
+
properties: {
|
|
154
|
+
env: { type: "string", description: envDesc },
|
|
155
|
+
},
|
|
156
|
+
required: [],
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
160
|
+
// WORKFLOW OPERATIONS
|
|
161
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
162
|
+
{
|
|
163
|
+
name: "deploy_workflow",
|
|
164
|
+
description: `⚠️ DEPRECATED: Use \`workflow(mode="deploy")\` instead.
|
|
165
|
+
|
|
166
|
+
Deploy a WORKFLOW to an AI Employee. Validates and can auto-fix issues.`,
|
|
167
|
+
inputSchema: {
|
|
168
|
+
type: "object",
|
|
169
|
+
properties: {
|
|
170
|
+
persona_id: { type: "string", description: "Target AI Employee ID" },
|
|
171
|
+
workflow_def: { type: "object", description: "The workflow JSON" },
|
|
172
|
+
proto_config: { type: "object", description: "Persona config to merge" },
|
|
173
|
+
validate_first: { type: "boolean", description: "Validate before deploy (default: true)" },
|
|
174
|
+
auto_fix: { type: "boolean", description: "Auto-fix issues (default: false)" },
|
|
175
|
+
env: { type: "string", description: envDesc },
|
|
176
|
+
},
|
|
177
|
+
required: ["persona_id"],
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
name: "optimize_workflow",
|
|
182
|
+
description: `⚠️ DEPRECATED: Use \`workflow(mode="optimize")\` instead.
|
|
183
|
+
|
|
184
|
+
🔧 ONE-CLICK workflow analyzer & fixer.
|
|
185
|
+
|
|
186
|
+
**Fix existing workflow** (recommended):
|
|
187
|
+
- optimize_workflow("Advisor Communications Assistant")
|
|
188
|
+
- optimize_workflow(persona_id="abc-123", preview=true)
|
|
189
|
+
|
|
190
|
+
Automatically: fetches workflow → analyzes → applies fixes → deploys.`,
|
|
191
|
+
inputSchema: {
|
|
192
|
+
type: "object",
|
|
193
|
+
properties: {
|
|
194
|
+
identifier: { type: "string", description: "Persona name or ID" },
|
|
195
|
+
persona_id: { type: "string", description: "Target persona ID (for generate mode)" },
|
|
196
|
+
prompt: { type: "string", description: "For generating new workflows" },
|
|
197
|
+
type: { type: "string", enum: ["voice", "chat"], description: "Persona type (default: chat)" },
|
|
198
|
+
preview: { type: "boolean", description: "Preview changes without deploying" },
|
|
199
|
+
env: { type: "string", description: envDesc },
|
|
200
|
+
},
|
|
201
|
+
required: [],
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
205
|
+
// ACTIONS (Workflow Nodes/Agents)
|
|
206
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
207
|
+
{
|
|
208
|
+
name: "get_workflow_action",
|
|
209
|
+
description: `⚠️ DEPRECATED: Use \`action(id)\` instead.
|
|
210
|
+
|
|
211
|
+
🎯 UNIFIED action retrieval. Replaces: get_action, get_action_by_name.`,
|
|
212
|
+
inputSchema: {
|
|
213
|
+
type: "object",
|
|
214
|
+
properties: {
|
|
215
|
+
identifier: { type: "string", description: "Action ID or name (e.g., 'chat_categorizer')" },
|
|
216
|
+
env: { type: "string", description: envDesc },
|
|
217
|
+
},
|
|
218
|
+
required: ["identifier"],
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
name: "find_workflow_actions",
|
|
223
|
+
description: `⚠️ DEPRECATED: Use \`action(all=true)\` instead.
|
|
224
|
+
|
|
225
|
+
🔍 UNIFIED action search. Replaces: list_actions, search_actions, list_action_categories.`,
|
|
226
|
+
inputSchema: {
|
|
227
|
+
type: "object",
|
|
228
|
+
properties: {
|
|
229
|
+
query: { type: "string", description: "Search term" },
|
|
230
|
+
category: { type: "string", description: "Filter by category" },
|
|
231
|
+
persona_id: { type: "string", description: "List actions in this workflow" },
|
|
232
|
+
enabled: { type: "boolean", description: "Filter by enabled (default: true)" },
|
|
233
|
+
limit: { type: "number", description: "Max results (default: 50)" },
|
|
234
|
+
categories: { type: "boolean", description: "Just list categories" },
|
|
235
|
+
env: { type: "string", description: envDesc },
|
|
236
|
+
},
|
|
237
|
+
required: [],
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
241
|
+
// SYNC
|
|
242
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
243
|
+
{
|
|
244
|
+
name: "sync_info",
|
|
245
|
+
description: `📊 UNIFIED sync info. Replaces: sync_status, sync_config, sync_options, get_sync_tag, is_persona_synced, list_synced_personas.
|
|
246
|
+
|
|
247
|
+
**Examples**:
|
|
248
|
+
- sync_info(mode="status") - Current sync status
|
|
249
|
+
- sync_info(mode="config") - View sync configuration
|
|
250
|
+
- sync_info(persona_id="abc-123") - Check if persona is synced`,
|
|
251
|
+
inputSchema: {
|
|
252
|
+
type: "object",
|
|
253
|
+
properties: {
|
|
254
|
+
mode: { type: "string", enum: ["status", "config", "options", "tag"], description: "Info type" },
|
|
255
|
+
persona_id: { type: "string", description: "Check specific persona" },
|
|
256
|
+
env: { type: "string", description: envDesc },
|
|
257
|
+
},
|
|
258
|
+
required: [],
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
262
|
+
// AUTO BUILDER REFERENCE (Static Knowledge)
|
|
263
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
264
|
+
{
|
|
265
|
+
name: "list_auto_builder_agents",
|
|
266
|
+
description: `⚠️ DEPRECATED: Use \`action(all=true, include_docs=true)\` instead.
|
|
267
|
+
|
|
268
|
+
📚 REFERENCE: Get Auto Builder agent DOCUMENTATION by category.`,
|
|
269
|
+
inputSchema: {
|
|
270
|
+
type: "object",
|
|
271
|
+
properties: {
|
|
272
|
+
category: { type: "string", description: "Filter by category" },
|
|
273
|
+
},
|
|
274
|
+
required: [],
|
|
275
|
+
},
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
name: "get_auto_builder_agent",
|
|
279
|
+
description: `⚠️ DEPRECATED: Use \`action(id, include_docs=true)\` instead.
|
|
280
|
+
|
|
281
|
+
📚 REFERENCE: Get documentation for a specific Auto Builder agent.`,
|
|
282
|
+
inputSchema: {
|
|
283
|
+
type: "object",
|
|
284
|
+
properties: {
|
|
285
|
+
name: { type: "string", description: "Agent name (e.g., 'chat_categorizer')" },
|
|
286
|
+
},
|
|
287
|
+
required: ["name"],
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
name: "suggest_agents_for_use_case",
|
|
292
|
+
description: `⚠️ DEPRECATED: Use \`action(suggest="use case")\` instead.
|
|
293
|
+
|
|
294
|
+
Get agent recommendations for a use case.`,
|
|
295
|
+
inputSchema: {
|
|
296
|
+
type: "object",
|
|
297
|
+
properties: {
|
|
298
|
+
use_case: { type: "string", description: "Description of the use case" },
|
|
299
|
+
},
|
|
300
|
+
required: ["use_case"],
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
304
|
+
// WORKFLOW PATTERNS & TEMPLATES
|
|
305
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
306
|
+
{
|
|
307
|
+
name: "get_workflow_pattern",
|
|
308
|
+
description: `⚠️ DEPRECATED: Use \`template(pattern="name")\` instead.
|
|
309
|
+
|
|
310
|
+
Get a specific workflow pattern.`,
|
|
311
|
+
inputSchema: {
|
|
312
|
+
type: "object",
|
|
313
|
+
properties: {
|
|
314
|
+
pattern_name: { type: "string", description: "Pattern name" },
|
|
315
|
+
},
|
|
316
|
+
required: ["pattern_name"],
|
|
317
|
+
},
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
name: "list_workflow_patterns",
|
|
321
|
+
description: `⚠️ DEPRECATED: Use \`template(patterns=true)\` instead.
|
|
322
|
+
|
|
323
|
+
List all workflow patterns.`,
|
|
324
|
+
inputSchema: {
|
|
325
|
+
type: "object",
|
|
326
|
+
properties: {
|
|
327
|
+
type: { type: "string", enum: ["voice", "chat", "dashboard"], description: "Filter by type" },
|
|
328
|
+
},
|
|
329
|
+
required: [],
|
|
330
|
+
},
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
name: "check_type_compatibility",
|
|
334
|
+
description: `⚠️ DEPRECATED: Use \`template(type_check={source, target})\` instead.
|
|
335
|
+
|
|
336
|
+
Check if two workflow types are compatible.`,
|
|
337
|
+
inputSchema: {
|
|
338
|
+
type: "object",
|
|
339
|
+
properties: {
|
|
340
|
+
source_type: { type: "string", description: "Source type name" },
|
|
341
|
+
target_type: { type: "string", description: "Target type name" },
|
|
342
|
+
},
|
|
343
|
+
required: ["source_type", "target_type"],
|
|
344
|
+
},
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
name: "get_widget_reference",
|
|
348
|
+
description: `⚠️ DEPRECATED: Use \`template(widgets="type")\` instead.
|
|
349
|
+
|
|
350
|
+
Get widget reference for a persona type.`,
|
|
351
|
+
inputSchema: {
|
|
352
|
+
type: "object",
|
|
353
|
+
properties: {
|
|
354
|
+
persona_type: { type: "string", enum: ["voice", "chat", "dashboard"] },
|
|
355
|
+
},
|
|
356
|
+
required: ["persona_type"],
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
name: "get_qualifying_questions",
|
|
361
|
+
description: `⚠️ DEPRECATED: Use \`template(questions=true)\` instead.
|
|
362
|
+
|
|
363
|
+
Get qualifying questions for requirements gathering.`,
|
|
364
|
+
inputSchema: {
|
|
365
|
+
type: "object",
|
|
366
|
+
properties: {
|
|
367
|
+
category: { type: "string", description: "Filter by category" },
|
|
368
|
+
required_only: { type: "boolean", description: "Only required questions" },
|
|
369
|
+
},
|
|
370
|
+
required: [],
|
|
371
|
+
},
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
name: "get_voice_persona_template",
|
|
375
|
+
description: `⚠️ DEPRECATED: Use \`template(config="voice")\` instead.
|
|
376
|
+
|
|
377
|
+
Get complete Voice AI persona template.`,
|
|
378
|
+
inputSchema: { type: "object", properties: {}, required: [] },
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
name: "validate_workflow_prompt",
|
|
382
|
+
description: `⚠️ DEPRECATED: Use \`reference(validate_prompt="...")\` instead.
|
|
383
|
+
|
|
384
|
+
Validate a workflow generation prompt.`,
|
|
385
|
+
inputSchema: {
|
|
386
|
+
type: "object",
|
|
387
|
+
properties: {
|
|
388
|
+
prompt: { type: "string", description: "The prompt to validate" },
|
|
389
|
+
},
|
|
390
|
+
required: ["prompt"],
|
|
391
|
+
},
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
name: "get_auto_builder_guidance",
|
|
395
|
+
description: `⚠️ DEPRECATED: Use \`reference(topic="...")\` instead.
|
|
396
|
+
|
|
397
|
+
Get guidance on Auto Builder topics.`,
|
|
398
|
+
inputSchema: {
|
|
399
|
+
type: "object",
|
|
400
|
+
properties: {
|
|
401
|
+
topic: { type: "string", description: "Topic name" },
|
|
402
|
+
},
|
|
403
|
+
required: [],
|
|
404
|
+
},
|
|
405
|
+
},
|
|
406
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
407
|
+
// PLATFORM CONCEPTS
|
|
408
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
409
|
+
{
|
|
410
|
+
name: "get_platform_concept",
|
|
411
|
+
description: `⚠️ DEPRECATED: Use \`reference(concept="term")\` instead.
|
|
412
|
+
|
|
413
|
+
Get explanation of a platform concept.`,
|
|
414
|
+
inputSchema: {
|
|
415
|
+
type: "object",
|
|
416
|
+
properties: {
|
|
417
|
+
term: { type: "string", description: "Concept term to look up" },
|
|
418
|
+
},
|
|
419
|
+
required: ["term"],
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
name: "list_platform_concepts",
|
|
424
|
+
description: `⚠️ DEPRECATED: Use \`reference(concepts=true)\` instead.
|
|
425
|
+
|
|
426
|
+
List all platform concepts.`,
|
|
427
|
+
inputSchema: { type: "object", properties: {}, required: [] },
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
name: "get_common_mistakes",
|
|
431
|
+
description: `⚠️ DEPRECATED: Use \`reference(mistakes=true)\` instead.
|
|
432
|
+
|
|
433
|
+
Get common workflow mistakes and how to avoid them.`,
|
|
434
|
+
inputSchema: { type: "object", properties: {}, required: [] },
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
name: "get_debug_checklist",
|
|
438
|
+
description: `⚠️ DEPRECATED: Use \`reference(debug=true)\` instead.
|
|
439
|
+
|
|
440
|
+
Get workflow debugging checklist.`,
|
|
441
|
+
inputSchema: { type: "object", properties: {}, required: [] },
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
name: "get_workflow_execution_model",
|
|
445
|
+
description: `⚠️ DEPRECATED: Use \`reference(execution_model=true)\` instead.
|
|
446
|
+
|
|
447
|
+
Get workflow execution model documentation.`,
|
|
448
|
+
inputSchema: { type: "object", properties: {}, required: [] },
|
|
449
|
+
},
|
|
450
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
451
|
+
// WORKFLOW ANALYSIS (Individual tools - now unified in workflow)
|
|
452
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
453
|
+
{
|
|
454
|
+
name: "analyze_workflow",
|
|
455
|
+
description: `⚠️ DEPRECATED: Use \`workflow(persona_id, mode="analyze")\` instead.
|
|
456
|
+
|
|
457
|
+
Full workflow analysis with issues, connections, fixes, and metrics.`,
|
|
458
|
+
inputSchema: {
|
|
459
|
+
type: "object",
|
|
460
|
+
properties: {
|
|
461
|
+
persona_id: { type: "string", description: "Persona ID to analyze" },
|
|
462
|
+
workflow_def: { type: "object", description: "Or provide workflow JSON directly" },
|
|
463
|
+
env: { type: "string", description: envDesc },
|
|
464
|
+
},
|
|
465
|
+
required: [],
|
|
466
|
+
},
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
name: "detect_workflow_issues",
|
|
470
|
+
description: `⚠️ DEPRECATED: Use \`workflow(mode="analyze", include=["issues"])\` instead.
|
|
471
|
+
|
|
472
|
+
Detect issues in a workflow.`,
|
|
473
|
+
inputSchema: {
|
|
474
|
+
type: "object",
|
|
475
|
+
properties: {
|
|
476
|
+
persona_id: { type: "string", description: "Persona ID" },
|
|
477
|
+
workflow_def: { type: "object", description: "Workflow JSON" },
|
|
478
|
+
env: { type: "string", description: envDesc },
|
|
479
|
+
},
|
|
480
|
+
required: [],
|
|
481
|
+
},
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
name: "validate_workflow_connections",
|
|
485
|
+
description: `⚠️ DEPRECATED: Use \`workflow(mode="analyze", include=["connections"])\` instead.
|
|
486
|
+
|
|
487
|
+
Validate edge connections for type compatibility.`,
|
|
488
|
+
inputSchema: {
|
|
489
|
+
type: "object",
|
|
490
|
+
properties: {
|
|
491
|
+
persona_id: { type: "string", description: "Persona ID" },
|
|
492
|
+
workflow_def: { type: "object", description: "Workflow JSON" },
|
|
493
|
+
env: { type: "string", description: envDesc },
|
|
494
|
+
},
|
|
495
|
+
required: [],
|
|
496
|
+
},
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
name: "suggest_workflow_fixes",
|
|
500
|
+
description: `⚠️ DEPRECATED: Use \`workflow(mode="analyze", include=["fixes"])\` instead.
|
|
501
|
+
|
|
502
|
+
Get fix suggestions for workflow issues.`,
|
|
503
|
+
inputSchema: {
|
|
504
|
+
type: "object",
|
|
505
|
+
properties: {
|
|
506
|
+
persona_id: { type: "string", description: "Persona ID" },
|
|
507
|
+
workflow_def: { type: "object", description: "Workflow JSON" },
|
|
508
|
+
issues: { type: "array", description: "Issues to fix" },
|
|
509
|
+
env: { type: "string", description: envDesc },
|
|
510
|
+
},
|
|
511
|
+
required: [],
|
|
512
|
+
},
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
name: "compare_workflow_versions",
|
|
516
|
+
description: `⚠️ DEPRECATED: Use \`workflow(mode="compare")\` instead.
|
|
517
|
+
|
|
518
|
+
Compare two workflow versions.`,
|
|
519
|
+
inputSchema: {
|
|
520
|
+
type: "object",
|
|
521
|
+
properties: {
|
|
522
|
+
id_before: { type: "string", description: "Before persona ID" },
|
|
523
|
+
id_after: { type: "string", description: "After persona ID" },
|
|
524
|
+
env: { type: "string", description: envDesc },
|
|
525
|
+
},
|
|
526
|
+
required: ["id_before", "id_after"],
|
|
527
|
+
},
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
name: "get_workflow_metrics",
|
|
531
|
+
description: `⚠️ DEPRECATED: Use \`workflow(mode="analyze", include=["metrics"])\` instead.
|
|
532
|
+
|
|
533
|
+
Get workflow metrics (complexity, depth, etc.).`,
|
|
534
|
+
inputSchema: {
|
|
535
|
+
type: "object",
|
|
536
|
+
properties: {
|
|
537
|
+
persona_id: { type: "string", description: "Persona ID" },
|
|
538
|
+
workflow_def: { type: "object", description: "Workflow JSON" },
|
|
539
|
+
env: { type: "string", description: envDesc },
|
|
540
|
+
},
|
|
541
|
+
required: [],
|
|
542
|
+
},
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
name: "compile_workflow",
|
|
546
|
+
description: `⚠️ DEPRECATED: Use \`workflow(mode="compile")\` instead.
|
|
547
|
+
|
|
548
|
+
Compile a workflow spec into deployable workflow_def.`,
|
|
549
|
+
inputSchema: {
|
|
550
|
+
type: "object",
|
|
551
|
+
properties: {
|
|
552
|
+
name: { type: "string", description: "Workflow name" },
|
|
553
|
+
description: { type: "string", description: "Workflow description" },
|
|
554
|
+
persona_type: { type: "string", enum: ["voice", "chat"] },
|
|
555
|
+
nodes: { type: "array", description: "Node definitions" },
|
|
556
|
+
result_mappings: { type: "array", description: "Output mappings" },
|
|
557
|
+
},
|
|
558
|
+
required: ["name", "description", "persona_type", "nodes", "result_mappings"],
|
|
559
|
+
},
|
|
560
|
+
},
|
|
561
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
562
|
+
// DATA SOURCES (Knowledge)
|
|
563
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
564
|
+
{
|
|
565
|
+
name: "upload_data_source",
|
|
566
|
+
description: `⚠️ DEPRECATED: Use \`knowledge(mode="upload")\` instead.
|
|
567
|
+
|
|
568
|
+
Upload a file to an AI Employee's knowledge base.`,
|
|
569
|
+
inputSchema: {
|
|
570
|
+
type: "object",
|
|
571
|
+
properties: {
|
|
572
|
+
persona_id: { type: "string", description: "AI Employee ID" },
|
|
573
|
+
file_path: { type: "string", description: "Local file path" },
|
|
574
|
+
tags: { type: "string", description: "Tags for categorizing" },
|
|
575
|
+
env: { type: "string", description: envDesc },
|
|
576
|
+
},
|
|
577
|
+
required: ["persona_id", "file_path"],
|
|
578
|
+
},
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
name: "delete_data_source",
|
|
582
|
+
description: `⚠️ DEPRECATED: Use \`knowledge(mode="delete")\` instead.
|
|
583
|
+
|
|
584
|
+
Delete a file from an AI Employee's knowledge base.`,
|
|
585
|
+
inputSchema: {
|
|
586
|
+
type: "object",
|
|
587
|
+
properties: {
|
|
588
|
+
persona_id: { type: "string", description: "AI Employee ID" },
|
|
589
|
+
file_id: { type: "string", description: "File ID to delete" },
|
|
590
|
+
env: { type: "string", description: envDesc },
|
|
591
|
+
},
|
|
592
|
+
required: ["persona_id", "file_id"],
|
|
593
|
+
},
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
name: "list_data_sources",
|
|
597
|
+
description: `⚠️ DEPRECATED: Use \`knowledge(persona_id)\` instead.
|
|
598
|
+
|
|
599
|
+
List data sources for an AI Employee.`,
|
|
600
|
+
inputSchema: {
|
|
601
|
+
type: "object",
|
|
602
|
+
properties: {
|
|
603
|
+
persona_id: { type: "string", description: "AI Employee ID" },
|
|
604
|
+
env: { type: "string", description: envDesc },
|
|
605
|
+
},
|
|
606
|
+
required: ["persona_id"],
|
|
607
|
+
},
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
name: "get_embedding_status",
|
|
611
|
+
description: `⚠️ DEPRECATED: Use \`knowledge(persona_id, status=true)\` instead.
|
|
612
|
+
|
|
613
|
+
Get embedding/indexing status for a persona's data sources.`,
|
|
614
|
+
inputSchema: {
|
|
615
|
+
type: "object",
|
|
616
|
+
properties: {
|
|
617
|
+
persona_id: { type: "string", description: "AI Employee ID" },
|
|
618
|
+
env: { type: "string", description: envDesc },
|
|
619
|
+
},
|
|
620
|
+
required: ["persona_id"],
|
|
621
|
+
},
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
name: "toggle_embedding",
|
|
625
|
+
description: `⚠️ DEPRECATED: Use \`knowledge(mode="embedding")\` instead.
|
|
626
|
+
|
|
627
|
+
Enable or disable embedding for a persona.`,
|
|
628
|
+
inputSchema: {
|
|
629
|
+
type: "object",
|
|
630
|
+
properties: {
|
|
631
|
+
persona_id: { type: "string", description: "AI Employee ID" },
|
|
632
|
+
enabled: { type: "boolean", description: "Enable or disable" },
|
|
633
|
+
env: { type: "string", description: envDesc },
|
|
634
|
+
},
|
|
635
|
+
required: ["persona_id", "enabled"],
|
|
636
|
+
},
|
|
637
|
+
},
|
|
638
|
+
];
|
|
639
|
+
}
|
|
640
|
+
/**
|
|
641
|
+
* Get list of legacy tool names that have been deprecated
|
|
642
|
+
*/
|
|
643
|
+
export function getDeprecatedToolNames() {
|
|
644
|
+
return [
|
|
645
|
+
"list_environments",
|
|
646
|
+
"get_persona",
|
|
647
|
+
"find_personas",
|
|
648
|
+
"create_ai_employee",
|
|
649
|
+
"update_ai_employee",
|
|
650
|
+
"compare_ai_employees",
|
|
651
|
+
"list_ai_employee_templates",
|
|
652
|
+
"deploy_workflow",
|
|
653
|
+
"optimize_workflow",
|
|
654
|
+
"get_workflow_action",
|
|
655
|
+
"find_workflow_actions",
|
|
656
|
+
"list_auto_builder_agents",
|
|
657
|
+
"get_auto_builder_agent",
|
|
658
|
+
"suggest_agents_for_use_case",
|
|
659
|
+
"get_workflow_pattern",
|
|
660
|
+
"list_workflow_patterns",
|
|
661
|
+
"check_type_compatibility",
|
|
662
|
+
"get_widget_reference",
|
|
663
|
+
"get_qualifying_questions",
|
|
664
|
+
"get_voice_persona_template",
|
|
665
|
+
"validate_workflow_prompt",
|
|
666
|
+
"get_auto_builder_guidance",
|
|
667
|
+
"get_platform_concept",
|
|
668
|
+
"list_platform_concepts",
|
|
669
|
+
"get_common_mistakes",
|
|
670
|
+
"get_debug_checklist",
|
|
671
|
+
"get_workflow_execution_model",
|
|
672
|
+
"analyze_workflow",
|
|
673
|
+
"detect_workflow_issues",
|
|
674
|
+
"validate_workflow_connections",
|
|
675
|
+
"suggest_workflow_fixes",
|
|
676
|
+
"compare_workflow_versions",
|
|
677
|
+
"get_workflow_metrics",
|
|
678
|
+
"compile_workflow",
|
|
679
|
+
"upload_data_source",
|
|
680
|
+
"delete_data_source",
|
|
681
|
+
"list_data_sources",
|
|
682
|
+
"get_embedding_status",
|
|
683
|
+
"toggle_embedding",
|
|
684
|
+
];
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* Mapping from legacy tool names to consolidated equivalents
|
|
688
|
+
*/
|
|
689
|
+
export const LEGACY_TO_CONSOLIDATED = {
|
|
690
|
+
// Environment
|
|
691
|
+
"list_environments": "env",
|
|
692
|
+
// Personas
|
|
693
|
+
"get_persona": "persona(id)",
|
|
694
|
+
"find_personas": "persona(all=true)",
|
|
695
|
+
"create_ai_employee": "persona(mode='create')",
|
|
696
|
+
"update_ai_employee": "persona(mode='update')",
|
|
697
|
+
"compare_ai_employees": "persona(mode='compare')",
|
|
698
|
+
"list_ai_employee_templates": "persona(templates=true)",
|
|
699
|
+
// Workflow operations
|
|
700
|
+
"deploy_workflow": "workflow(mode='deploy')",
|
|
701
|
+
"optimize_workflow": "workflow(mode='optimize')",
|
|
702
|
+
"analyze_workflow": "workflow(mode='analyze')",
|
|
703
|
+
"detect_workflow_issues": "workflow(mode='analyze', include=['issues'])",
|
|
704
|
+
"validate_workflow_connections": "workflow(mode='analyze', include=['connections'])",
|
|
705
|
+
"suggest_workflow_fixes": "workflow(mode='analyze', include=['fixes'])",
|
|
706
|
+
"compare_workflow_versions": "workflow(mode='compare')",
|
|
707
|
+
"get_workflow_metrics": "workflow(mode='analyze', include=['metrics'])",
|
|
708
|
+
"compile_workflow": "workflow(mode='compile')",
|
|
709
|
+
// Actions
|
|
710
|
+
"get_workflow_action": "action(id)",
|
|
711
|
+
"find_workflow_actions": "action(all=true)",
|
|
712
|
+
"list_auto_builder_agents": "action(all=true, include_docs=true)",
|
|
713
|
+
"get_auto_builder_agent": "action(id, include_docs=true)",
|
|
714
|
+
"suggest_agents_for_use_case": "action(suggest='...')",
|
|
715
|
+
// Templates
|
|
716
|
+
"get_workflow_pattern": "template(pattern='...')",
|
|
717
|
+
"list_workflow_patterns": "template(patterns=true)",
|
|
718
|
+
"check_type_compatibility": "template(type_check={...})",
|
|
719
|
+
"get_widget_reference": "template(widgets='...')",
|
|
720
|
+
"get_qualifying_questions": "template(questions=true)",
|
|
721
|
+
"get_voice_persona_template": "template(config='voice')",
|
|
722
|
+
// Reference
|
|
723
|
+
"validate_workflow_prompt": "reference(validate_prompt='...')",
|
|
724
|
+
"get_auto_builder_guidance": "reference(topic='...')",
|
|
725
|
+
"get_platform_concept": "reference(concept='...')",
|
|
726
|
+
"list_platform_concepts": "reference(concepts=true)",
|
|
727
|
+
"get_common_mistakes": "reference(mistakes=true)",
|
|
728
|
+
"get_debug_checklist": "reference(debug=true)",
|
|
729
|
+
"get_workflow_execution_model": "reference(execution_model=true)",
|
|
730
|
+
// Knowledge
|
|
731
|
+
"upload_data_source": "knowledge(mode='upload')",
|
|
732
|
+
"delete_data_source": "knowledge(mode='delete')",
|
|
733
|
+
"list_data_sources": "knowledge(persona_id)",
|
|
734
|
+
"get_embedding_status": "knowledge(status=true)",
|
|
735
|
+
"toggle_embedding": "knowledge(mode='embedding')",
|
|
736
|
+
};
|