@ema.co/mcp-toolkit 2026.2.5 → 2026.2.19
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.
Potentially problematic release.
This version of @ema.co/mcp-toolkit might be problematic. Click here for more details.
- package/.context/public/guides/ema-user-guide.md +12 -16
- package/.context/public/guides/mcp-tools-guide.md +203 -334
- package/LICENSE +29 -21
- package/README.md +58 -35
- package/dist/mcp/domain/loop-detection.js +97 -0
- package/dist/mcp/domain/proto-constraints.js +284 -0
- package/dist/mcp/domain/structural-rules.js +12 -5
- package/dist/mcp/domain/validation-rules.js +107 -20
- package/dist/mcp/domain/workflow-graph-optimizer.js +235 -0
- package/dist/mcp/domain/workflow-graph-transforms.js +808 -0
- package/dist/mcp/domain/workflow-graph.js +374 -0
- package/dist/mcp/domain/workflow-optimizer.js +10 -4
- package/dist/mcp/guidance.js +54 -31
- package/dist/mcp/handlers/feedback/index.js +139 -0
- package/dist/mcp/handlers/feedback/store.js +262 -0
- package/dist/mcp/handlers/persona/index.js +237 -8
- package/dist/mcp/handlers/persona/schema.js +27 -0
- package/dist/mcp/handlers/reference/index.js +6 -4
- package/dist/mcp/handlers/workflow/index.js +25 -28
- package/dist/mcp/handlers/workflow/optimize.js +73 -33
- package/dist/mcp/handlers/workflow/validation.js +1 -1
- package/dist/mcp/knowledge-types.js +7 -0
- package/dist/mcp/knowledge.js +146 -834
- package/dist/mcp/resources.js +610 -18
- package/dist/mcp/server.js +233 -2156
- package/dist/mcp/tools.js +91 -5
- package/dist/sdk/generated/agent-catalog.js +615 -0
- package/dist/sdk/generated/deprecated-actions.js +182 -96
- package/dist/sdk/generated/proto-fields.js +2 -1
- package/dist/sdk/generated/protos/service/agent_qa/v1/agent_qa_pb.js +460 -21
- package/dist/sdk/generated/protos/service/auth/v1/auth_pb.js +11 -1
- package/dist/sdk/generated/protos/service/dataingest/v1/dataingest_pb.js +173 -66
- package/dist/sdk/generated/protos/service/feedback/v1/feedback_pb.js +43 -1
- package/dist/sdk/generated/protos/service/llmservice/v1/llmservice_pb.js +26 -21
- package/dist/sdk/generated/protos/service/persona/v1/persona_config_pb.js +100 -89
- package/dist/sdk/generated/protos/service/persona/v1/persona_pb.js +126 -116
- package/dist/sdk/generated/protos/service/persona/v1/shared_widgets/widget_types_pb.js +33 -1
- package/dist/sdk/generated/protos/service/persona/v1/voicebot_widgets/widget_types_pb.js +60 -11
- package/dist/sdk/generated/protos/service/tenant/v1/tenant_pb.js +1 -1
- package/dist/sdk/generated/protos/service/user/v1/user_pb.js +1 -1
- package/dist/sdk/generated/protos/service/utils/v1/agent_qa_pb.js +35 -0
- package/dist/sdk/generated/protos/service/workflows/v1/action_registry_pb.js +1 -1
- package/dist/sdk/generated/protos/service/workflows/v1/action_type_pb.js +6 -1
- package/dist/sdk/generated/protos/service/workflows/v1/chatbot_pb.js +106 -11
- package/dist/sdk/generated/protos/service/workflows/v1/common_forms_pb.js +1 -1
- package/dist/sdk/generated/protos/service/workflows/v1/coordinator_pb.js +1 -1
- package/dist/sdk/generated/protos/service/workflows/v1/external_actions_pb.js +31 -1
- package/dist/sdk/generated/protos/service/workflows/v1/well_known_pb.js +5 -1
- package/dist/sdk/generated/protos/service/workflows/v1/workflow_pb.js +1 -1
- package/dist/sdk/generated/protos/util/tracking_metadata_pb.js +1 -1
- package/dist/sdk/generated/widget-catalog.js +60 -0
- package/docs/README.md +17 -9
- package/package.json +2 -2
- package/.context/public/guides/dashboard-operations.md +0 -286
- package/.context/public/guides/email-patterns.md +0 -125
- package/dist/mcp/domain/intent-architect.js +0 -914
- package/dist/mcp/domain/quality-gates.js +0 -110
- package/dist/mcp/domain/workflow-execution-analyzer.js +0 -412
- package/dist/mcp/domain/workflow-intent.js +0 -1806
- package/dist/mcp/domain/workflow-merge.js +0 -449
- package/dist/mcp/domain/workflow-tracer.js +0 -648
- package/dist/mcp/domain/workflow-transformer.js +0 -742
- package/dist/mcp/handlers/persona/intent.js +0 -141
- package/dist/mcp/handlers/workflow/analyze.js +0 -119
- package/dist/mcp/handlers/workflow/compare.js +0 -70
- package/dist/mcp/handlers/workflow/generate.js +0 -384
- package/dist/mcp/handlers-consolidated.js +0 -333
package/dist/mcp/tools.js
CHANGED
|
@@ -229,7 +229,7 @@ persona(
|
|
|
229
229
|
properties: {
|
|
230
230
|
method: {
|
|
231
231
|
type: "string",
|
|
232
|
-
enum: ["list", "stats", "schema", "upload", "copy", "replicate", "delete", "embed", "search"],
|
|
232
|
+
enum: ["list", "stats", "schema", "upload", "copy", "replicate", "delete", "embed", "search", "refresh", "regenerate", "replace"],
|
|
233
233
|
description: "Data operation to perform (required)"
|
|
234
234
|
},
|
|
235
235
|
// copy/replicate params
|
|
@@ -314,7 +314,7 @@ persona(
|
|
|
314
314
|
description: envDescription
|
|
315
315
|
},
|
|
316
316
|
},
|
|
317
|
-
required: [],
|
|
317
|
+
required: ["method"],
|
|
318
318
|
},
|
|
319
319
|
},
|
|
320
320
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
@@ -407,6 +407,12 @@ persona(
|
|
|
407
407
|
- \`workflow(mode="deploy", ..., strict_validation=true)\` - block deprecated actions
|
|
408
408
|
- \`workflow(mode="deploy", ..., force=true)\` - bypass blocking validation (emergency only)
|
|
409
409
|
|
|
410
|
+
## Optimize (structural graph optimization)
|
|
411
|
+
- \`workflow(mode="optimize", persona_id="abc")\` - analyze and optimize existing workflow
|
|
412
|
+
- \`workflow(mode="optimize", workflow_def={...})\` - optimize a workflow directly
|
|
413
|
+
- Returns optimized workflow_def + report. Does NOT auto-deploy.
|
|
414
|
+
- Use workflow(mode="deploy") to deploy the optimized result.
|
|
415
|
+
|
|
410
416
|
**BLOCKING VALIDATIONS (deployment fails if not met):**
|
|
411
417
|
- Nodes with empty inputs (unwired) → workflow will fail at runtime
|
|
412
418
|
- Search nodes without uploaded data sources → searches return nothing
|
|
@@ -424,8 +430,8 @@ persona(
|
|
|
424
430
|
properties: {
|
|
425
431
|
mode: {
|
|
426
432
|
type: "string",
|
|
427
|
-
enum: ["get", "deploy", "validate"],
|
|
428
|
-
description: "get = return data for LLM, validate = static validation with path enumeration, deploy = execute LLM's workflow_def",
|
|
433
|
+
enum: ["get", "deploy", "validate", "optimize"],
|
|
434
|
+
description: "get = return data for LLM, validate = static validation with path enumeration, deploy = execute LLM's workflow_def, optimize = structural graph optimization",
|
|
429
435
|
},
|
|
430
436
|
persona_id: {
|
|
431
437
|
type: "string",
|
|
@@ -460,6 +466,14 @@ persona(
|
|
|
460
466
|
type: "number",
|
|
461
467
|
description: "Timeout in milliseconds (for mode=validate). Default: 100",
|
|
462
468
|
},
|
|
469
|
+
auto_apply: {
|
|
470
|
+
type: "boolean",
|
|
471
|
+
description: "Apply safe auto-transforms (for mode=optimize). Default: true",
|
|
472
|
+
},
|
|
473
|
+
max_passes: {
|
|
474
|
+
type: "number",
|
|
475
|
+
description: "Maximum optimization passes (for mode=optimize). Default: 5",
|
|
476
|
+
},
|
|
463
477
|
strict_validation: {
|
|
464
478
|
type: "boolean",
|
|
465
479
|
description: "If true, block deployment of deprecated actions (for mode=deploy). Default: false (warn only)",
|
|
@@ -538,6 +552,79 @@ persona(
|
|
|
538
552
|
required: []
|
|
539
553
|
},
|
|
540
554
|
},
|
|
555
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
556
|
+
// 6. TOOLKIT_FEEDBACK - Agent feedback collection
|
|
557
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
558
|
+
{
|
|
559
|
+
name: "toolkit_feedback",
|
|
560
|
+
description: `Submit feedback about the MCP toolkit to help improve documentation and guidance. Your feedback creates a self-improving loop.
|
|
561
|
+
|
|
562
|
+
**IMPORTANT**: All operations require explicit \`method\` parameter.
|
|
563
|
+
|
|
564
|
+
## Submit Feedback
|
|
565
|
+
- \`toolkit_feedback(method="submit", category="gap", message="...")\` - report missing docs
|
|
566
|
+
- \`toolkit_feedback(method="submit", category="confusion", message="...", tool="workflow")\` - report unclear guidance
|
|
567
|
+
- \`toolkit_feedback(method="submit", category="success", message="...")\` - report what worked well
|
|
568
|
+
- \`toolkit_feedback(method="submit", category="error_unclear", message="...", tool="persona")\` - report unhelpful errors
|
|
569
|
+
- \`toolkit_feedback(method="submit", category="suggestion", message="...")\` - suggest improvements
|
|
570
|
+
|
|
571
|
+
## Review Feedback
|
|
572
|
+
- \`toolkit_feedback(method="list")\` - view recent feedback
|
|
573
|
+
- \`toolkit_feedback(method="list", category="gap")\` - filter by category
|
|
574
|
+
- \`toolkit_feedback(method="analyze")\` - aggregate insights and actionable items
|
|
575
|
+
|
|
576
|
+
## When to Submit Feedback
|
|
577
|
+
- You encountered an error message that didn't help you fix the issue
|
|
578
|
+
- Documentation was missing for something you needed to do
|
|
579
|
+
- Guidance was confusing or led you to the wrong approach
|
|
580
|
+
- Something worked really well and the docs were helpful
|
|
581
|
+
- You have an idea to make the toolkit better`,
|
|
582
|
+
inputSchema: {
|
|
583
|
+
type: "object",
|
|
584
|
+
properties: {
|
|
585
|
+
method: {
|
|
586
|
+
type: "string",
|
|
587
|
+
enum: ["submit", "list", "analyze"],
|
|
588
|
+
description: "Operation to perform (required)",
|
|
589
|
+
},
|
|
590
|
+
category: {
|
|
591
|
+
type: "string",
|
|
592
|
+
enum: ["gap", "confusion", "success", "error_unclear", "suggestion"],
|
|
593
|
+
description: "Feedback category (required for submit): gap=missing docs, confusion=unclear guidance, success=worked well, error_unclear=unhelpful error, suggestion=improvement idea",
|
|
594
|
+
},
|
|
595
|
+
message: {
|
|
596
|
+
type: "string",
|
|
597
|
+
description: "What you encountered or want to report (required for submit)",
|
|
598
|
+
},
|
|
599
|
+
tool: {
|
|
600
|
+
type: "string",
|
|
601
|
+
description: "Which tool was involved (optional, e.g. 'persona', 'workflow', 'catalog')",
|
|
602
|
+
},
|
|
603
|
+
operation: {
|
|
604
|
+
type: "string",
|
|
605
|
+
description: "Which operation (optional, e.g. 'deploy', 'get', 'create')",
|
|
606
|
+
},
|
|
607
|
+
context: {
|
|
608
|
+
type: "string",
|
|
609
|
+
description: "What you were trying to accomplish (optional)",
|
|
610
|
+
},
|
|
611
|
+
severity: {
|
|
612
|
+
type: "string",
|
|
613
|
+
enum: ["low", "medium", "high"],
|
|
614
|
+
description: "How impactful this issue was (optional, default: medium)",
|
|
615
|
+
},
|
|
616
|
+
limit: {
|
|
617
|
+
type: "number",
|
|
618
|
+
description: "Max entries to return (for method=list, default: 50)",
|
|
619
|
+
},
|
|
620
|
+
include_telemetry: {
|
|
621
|
+
type: "boolean",
|
|
622
|
+
description: "Include passive telemetry data (for method=list, default: false)",
|
|
623
|
+
},
|
|
624
|
+
},
|
|
625
|
+
required: ["method"],
|
|
626
|
+
},
|
|
627
|
+
},
|
|
541
628
|
];
|
|
542
629
|
}
|
|
543
630
|
/**
|
|
@@ -545,7 +632,6 @@ persona(
|
|
|
545
632
|
* These still work for backwards compat but aren't in the tool list
|
|
546
633
|
*/
|
|
547
634
|
export const INTERNAL_TOOLS = [
|
|
548
|
-
"workflow", // Standalone tool for workflow get/deploy (not routed through persona)
|
|
549
635
|
"knowledge", // → persona(id=..., data={method:...})
|
|
550
636
|
"demo", // → persona(id=..., data={method:"upload", content:...})
|
|
551
637
|
"action", // → catalog(method="list", type="actions")
|