@ema.co/mcp-toolkit 2026.1.24 → 2026.1.26-3

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.

Files changed (81) hide show
  1. package/README.md +10 -2
  2. package/dist/mcp/handlers/action/index.js +3 -18
  3. package/dist/mcp/handlers/data/index.js +385 -41
  4. package/dist/mcp/handlers/data/templates.js +107 -0
  5. package/dist/mcp/handlers/deprecation.js +50 -0
  6. package/dist/mcp/handlers/env/index.js +8 -4
  7. package/dist/mcp/handlers/knowledge/index.js +44 -237
  8. package/dist/mcp/handlers/persona/create.js +5 -11
  9. package/dist/mcp/handlers/persona/index.js +5 -1
  10. package/dist/mcp/handlers/persona/version.js +234 -0
  11. package/dist/mcp/handlers/reference/index.js +101 -1
  12. package/dist/mcp/handlers/sync/index.js +3 -18
  13. package/dist/mcp/handlers/template/index.js +75 -10
  14. package/dist/mcp/handlers/workflow/analyze.js +171 -0
  15. package/dist/mcp/handlers/workflow/compare.js +70 -0
  16. package/dist/mcp/handlers/workflow/compile.js +39 -0
  17. package/dist/mcp/handlers/workflow/deploy.js +73 -0
  18. package/dist/mcp/handlers/workflow/generate.js +350 -0
  19. package/dist/mcp/handlers/workflow/index.js +136 -0
  20. package/dist/mcp/handlers/workflow/modify.js +456 -0
  21. package/dist/mcp/handlers/workflow/optimize.js +136 -0
  22. package/dist/mcp/handlers/workflow/types.js +4 -0
  23. package/dist/mcp/handlers/workflow/utils.js +132 -0
  24. package/dist/mcp/handlers-consolidated.js +62 -2691
  25. package/dist/mcp/prompts.js +13 -14
  26. package/dist/mcp/resources.js +55 -54
  27. package/dist/mcp/server.js +93 -124
  28. package/dist/mcp/{tools-v2.js → tools.js} +1 -1
  29. package/dist/mcp/workflow-operations.js +2 -2
  30. package/dist/sdk/client-adapter.js +267 -32
  31. package/dist/sdk/client.js +31 -15
  32. package/dist/sdk/ema-client.js +183 -0
  33. package/dist/sdk/generated/template-fallbacks.js +123 -0
  34. package/dist/sdk/guidance.js +65 -11
  35. package/dist/sdk/index.js +3 -1
  36. package/dist/sdk/knowledge.js +16 -86
  37. package/dist/sdk/workflow-intent.js +27 -0
  38. package/dist/sdk/workflow-transformer.js +0 -342
  39. package/docs/DEBUG-ANALYSIS-unused-category-type-mismatch.md +481 -0
  40. package/docs/TODO-fix-analyzer-and-modify.md +182 -0
  41. package/package.json +9 -4
  42. package/dist/mcp/tools-consolidated.js +0 -866
  43. package/dist/mcp/tools-legacy.js +0 -736
  44. package/docs/CODEBASE-ANALYSIS-2026-01-23.md +0 -936
  45. package/docs/CODEBASE-ANALYSIS-PRIORITIZED.md +0 -774
  46. package/docs/api-contracts.md +0 -216
  47. package/docs/auto-builder-analysis.md +0 -271
  48. package/docs/blog/mcp-tool-design-lessons.md +0 -309
  49. package/docs/data-architecture.md +0 -166
  50. package/docs/ema-auto-builder-guide.html +0 -394
  51. package/docs/lessons-learned.md +0 -209
  52. package/docs/llm-native-workflow-design.md +0 -252
  53. package/docs/local-generation.md +0 -508
  54. package/docs/mcp-flow-diagram.md +0 -135
  55. package/docs/migration/action-composition-migration.md +0 -270
  56. package/docs/naming-conventions.md +0 -278
  57. package/docs/proposals/HANDOFF-tool-restructure.md +0 -526
  58. package/docs/proposals/action-composition.md +0 -490
  59. package/docs/proposals/explicit-method-restructure.md +0 -328
  60. package/docs/proposals/mcp-tool-restructure-2026-01.md +0 -366
  61. package/docs/proposals/self-contained-guidance.md +0 -427
  62. package/docs/proto-sdk-generation.md +0 -242
  63. package/docs/release-impact.md +0 -102
  64. package/docs/release-process.md +0 -157
  65. package/docs/staging.RULE.md +0 -142
  66. package/docs/test-persona-creation.md +0 -196
  67. package/docs/tool-consolidation-v2.md +0 -225
  68. package/docs/tool-response-standards.md +0 -256
  69. package/resources/docs/getting-started.md +0 -97
  70. package/resources/templates/auto-builder-rules.md +0 -224
  71. package/resources/templates/chat-ai/README.md +0 -119
  72. package/resources/templates/chat-ai/persona-config.json +0 -111
  73. package/resources/templates/dashboard-ai/README.md +0 -156
  74. package/resources/templates/dashboard-ai/persona-config.json +0 -180
  75. package/resources/templates/demo-scenarios/README.md +0 -63
  76. package/resources/templates/demo-scenarios/test-published-package.md +0 -116
  77. package/resources/templates/document-gen-ai/README.md +0 -132
  78. package/resources/templates/document-gen-ai/persona-config.json +0 -316
  79. package/resources/templates/voice-ai/README.md +0 -123
  80. package/resources/templates/voice-ai/persona-config.json +0 -74
  81. package/resources/templates/voice-ai/workflow-prompt.md +0 -121
@@ -1,180 +0,0 @@
1
- {
2
- "$schema": "https://ema.co/schemas/persona-config-dashboard.json",
3
- "$comment": "Dashboard AI Persona Configuration - Fill in all {placeholder} values",
4
-
5
- "personaType": "dashboard",
6
- "projectType": 2,
7
- "name": "{Persona Name}",
8
- "description": "{Brief description of what this Dashboard AI does}",
9
-
10
- "dashboardSettings": {
11
- "name": "{Display name}",
12
- "description": "{What this dashboard processes}",
13
-
14
- "inputSchema": {
15
- "fields": [
16
- {
17
- "name": "{field1}",
18
- "type": "file",
19
- "required": true,
20
- "description": "{Primary document to process}",
21
- "acceptedTypes": ["application/pdf", "image/*"]
22
- },
23
- {
24
- "name": "{field2}",
25
- "type": "string",
26
- "required": false,
27
- "description": "{Optional text field}"
28
- },
29
- {
30
- "name": "{field3}",
31
- "type": "select",
32
- "required": true,
33
- "options": ["{option1}", "{option2}", "{option3}"],
34
- "description": "{Category selection}"
35
- }
36
- ]
37
- },
38
-
39
- "batchSettings": {
40
- "batchSize": 50,
41
- "$comment_batchSize": "Number of items per batch (1-100)",
42
- "timeout": 60,
43
- "$comment_timeout": "Seconds per item before timeout",
44
- "parallelExecution": true,
45
- "$comment_parallelExecution": "Process items in parallel"
46
- },
47
-
48
- "outputSchema": {
49
- "fields": [
50
- {
51
- "name": "status",
52
- "type": "enum",
53
- "values": ["approved", "pending_review", "rejected"]
54
- },
55
- {
56
- "name": "extracted_data",
57
- "type": "object",
58
- "description": "Extracted entity values"
59
- },
60
- {
61
- "name": "validation_errors",
62
- "type": "array",
63
- "description": "List of validation failures"
64
- },
65
- {
66
- "name": "confidence_score",
67
- "type": "number",
68
- "description": "0-1 confidence in extraction"
69
- }
70
- ]
71
- }
72
- },
73
-
74
- "entityExtraction": {
75
- "columns": [
76
- {
77
- "name": "{Entity 1}",
78
- "type": "string",
79
- "description": "{What to extract}",
80
- "examples": ["{example1}", "{example2}"]
81
- },
82
- {
83
- "name": "{Entity 2}",
84
- "type": "number",
85
- "description": "{Numeric value to extract}",
86
- "examples": ["{example1}", "{example2}"]
87
- },
88
- {
89
- "name": "{Entity 3}",
90
- "type": "date",
91
- "description": "{Date to extract}",
92
- "format": "YYYY-MM-DD"
93
- }
94
- ],
95
- "$comment": "Define columns for entity_extraction_with_documents action"
96
- },
97
-
98
- "ruleValidation": {
99
- "rules": [
100
- {
101
- "name": "{Rule 1}",
102
- "description": "{What this rule checks}",
103
- "condition": "{Entity 1} is not empty",
104
- "severity": "error"
105
- },
106
- {
107
- "name": "{Rule 2}",
108
- "description": "{What this rule checks}",
109
- "condition": "{Entity 2} > 0",
110
- "severity": "warning"
111
- }
112
- ],
113
- "$comment": "Define rules for rule_validation_with_documents action"
114
- },
115
-
116
- "approvalRouting": {
117
- "rules": [
118
- {
119
- "name": "Auto-approve",
120
- "condition": "confidence_score >= 0.95 AND validation_errors.length == 0",
121
- "action": "auto_approve"
122
- },
123
- {
124
- "name": "Manager Review",
125
- "condition": "{amount} > 10000",
126
- "action": "route_to_manager",
127
- "assignee": "{manager_email}"
128
- },
129
- {
130
- "name": "Reject",
131
- "condition": "validation_errors contains 'critical'",
132
- "action": "reject"
133
- }
134
- ],
135
- "sla": {
136
- "standard": "24h",
137
- "urgent": "4h",
138
- "reminderAt": "50%",
139
- "escalateAt": "100%"
140
- }
141
- },
142
-
143
- "fileUpload": {
144
- "localFiles": [],
145
- "tags": ["{default-tag}"],
146
- "useChunking": true,
147
- "acceptedMimeTypes": [
148
- "application/pdf",
149
- "image/png",
150
- "image/jpeg",
151
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
152
- ]
153
- },
154
-
155
- "dataProtection": {
156
- "protectedClasses": [
157
- "ssn",
158
- "credit_card",
159
- "account_number"
160
- ]
161
- },
162
-
163
- "fusionModel": {
164
- "allModels": true,
165
- "selectedModels": []
166
- },
167
-
168
- "notifications": {
169
- "onSuccess": {
170
- "enabled": true,
171
- "recipients": ["{email}"],
172
- "template": "Processing complete: {count} items processed"
173
- },
174
- "onFailure": {
175
- "enabled": true,
176
- "recipients": ["{email}"],
177
- "template": "Processing failed: {error}"
178
- }
179
- }
180
- }
@@ -1,63 +0,0 @@
1
- # Demo Scenarios
2
-
3
- Pre-built demo data scenarios for reliable AI Employee demonstrations.
4
-
5
- ## Available Scenarios
6
-
7
- | Scenario | Use Case | Persona Types |
8
- |----------|----------|---------------|
9
- | `sales-sdr` | Sales Development Representative | Voice, Chat |
10
- | `support-tier1` | Customer Support Tier 1 | Voice, Chat |
11
- | `hr-assistant` | HR Policy & Benefits Assistant | Chat, Voice |
12
-
13
- ## Usage
14
-
15
- Generate a demo kit:
16
-
17
- ```
18
- demo(mode="kit", persona_id="...", scenario="sales-sdr")
19
- ```
20
-
21
- Validate demo readiness:
22
-
23
- ```
24
- demo(mode="validate_kit", persona_id="...")
25
- ```
26
-
27
- ## What's Generated
28
-
29
- Each demo kit includes:
30
-
31
- 1. **KB Documents** - Markdown files for the knowledge base with demo-ready data
32
- 2. **Demo Script** - Questions to ask with expected answers
33
- 3. **Fixed Response Fallbacks** - Workflow nodes for guaranteed responses
34
- 4. **Validation Queries** - Test queries to verify before the demo
35
-
36
- ## Customization
37
-
38
- Add custom Q&A pairs:
39
-
40
- ```
41
- demo(mode="kit", persona_id="...", scenario="sales-sdr", custom_qa=[
42
- {"question": "Tell me about feature X", "answer": "Feature X does..."}
43
- ])
44
- ```
45
-
46
- ## Creating Custom Scenarios
47
-
48
- Create a JSON file in this directory with the following structure:
49
-
50
- ```json
51
- {
52
- "id": "my-scenario",
53
- "name": "My Custom Scenario",
54
- "description": "Description",
55
- "persona_types": ["voice", "chat"],
56
- "tags": ["tag1", "tag2"],
57
- "intents": [...],
58
- "entities": [...],
59
- "qa_pairs": [...]
60
- }
61
- ```
62
-
63
- See existing scenarios for complete examples.
@@ -1,116 +0,0 @@
1
- # Test Published Package: @ema.co/mcp-toolkit
2
-
3
- Use this prompt to verify the published npm package works correctly.
4
-
5
- ## Quick Test (Copy & Run)
6
-
7
- ```bash
8
- # Create temp directory
9
- cd /tmp && rm -rf mcp-test && mkdir mcp-test && cd mcp-test
10
-
11
- # Initialize and install
12
- npm init -y && npm install @ema.co/mcp-toolkit@latest
13
-
14
- # Create test file
15
- cat > test.mjs << 'EOF'
16
- import * as sdk from '@ema.co/mcp-toolkit/sdk';
17
-
18
- console.log('=== @ema.co/mcp-toolkit Test Suite ===\n');
19
-
20
- // 1. Version check
21
- const pkg = await import('@ema.co/mcp-toolkit/sdk');
22
- console.log(`SDK exports: ${Object.keys(pkg).length} items\n`);
23
-
24
- // 2. Core classes
25
- console.log('Core Classes:');
26
- console.log(` EmaClient: ${typeof sdk.EmaClient === 'function' ? '✅' : '❌'}`);
27
- console.log(` APISchemaRegistry: ${typeof sdk.APISchemaRegistry === 'function' ? '✅' : '❌'}`);
28
- console.log(` StateStore: ${typeof sdk.StateStore === 'function' ? '✅' : '❌'}`);
29
-
30
- // 3. Workflow generation
31
- console.log('\nWorkflow Generation:');
32
- console.log(` parseNaturalLanguage: ${typeof sdk.parseNaturalLanguage === 'function' ? '✅' : '❌'}`);
33
- console.log(` needsLLMGeneration: ${typeof sdk.needsLLMGeneration === 'function' ? '✅' : '❌'}`);
34
- console.log(` generateWorkflow: ${typeof sdk.generateWorkflow === 'function' ? '✅' : '❌'}`);
35
-
36
- // 4. Validation
37
- console.log('\nValidation:');
38
- console.log(` validateWorkflowSpec: ${typeof sdk.validateWorkflowSpec === 'function' ? '✅' : '❌'}`);
39
-
40
- // 5. Functional test
41
- console.log('\nFunctional Test:');
42
- const intent = sdk.parseNaturalLanguage('Customer support bot that searches knowledge base and sends emails');
43
- console.log(` Parse intent: ${intent.intents?.length > 0 ? '✅' : '❌'}`);
44
- console.log(` Intents found: ${JSON.stringify(intent.intents?.map(i => i.name))}`);
45
-
46
- const needsLLM = sdk.needsLLMGeneration(intent);
47
- console.log(` Needs LLM generation: ${needsLLM}`);
48
-
49
- if (needsLLM) {
50
- const result = sdk.generateWorkflow(intent, [], []);
51
- console.log(` LLM prompt generated: ${result.llm_prompt ? '✅' : '❌'}`);
52
- }
53
-
54
- console.log('\n=== Test Complete ===');
55
- EOF
56
-
57
- # Run test
58
- node test.mjs
59
- ```
60
-
61
- ## Expected Output
62
-
63
- ```
64
- === @ema.co/mcp-toolkit Test Suite ===
65
-
66
- SDK exports: 119+ items
67
-
68
- Core Classes:
69
- EmaClient: ✅
70
- APISchemaRegistry: ✅
71
- StateStore: ✅
72
-
73
- Workflow Generation:
74
- parseNaturalLanguage: ✅
75
- needsLLMGeneration: ✅
76
- generateWorkflow: ✅
77
-
78
- Validation:
79
- validateWorkflowSpec: ✅
80
-
81
- Functional Test:
82
- Parse intent: ✅
83
- Intents found: ["Customer Support","Email Automation"]
84
- Needs LLM generation: true
85
- LLM prompt generated: ✅
86
-
87
- === Test Complete ===
88
- ```
89
-
90
- ## Import Paths
91
-
92
- | Path | Contents |
93
- |------|----------|
94
- | `@ema.co/mcp-toolkit/sdk` | SDK classes and functions |
95
- | `@ema.co/mcp-toolkit/mcp` | MCP server components |
96
- | `@ema.co/mcp-toolkit` | CLI entry point (not for programmatic use) |
97
-
98
- ## MCP Server Test
99
-
100
- To test the MCP server:
101
-
102
- ```bash
103
- # Start MCP server (requires EMA_API_TOKEN)
104
- export EMA_API_TOKEN="your-token"
105
- export EMA_TENANT_ID="your-tenant"
106
- npx -y @ema.co/mcp-toolkit@latest
107
-
108
- # Or with npx directly
109
- EMA_API_TOKEN="..." EMA_TENANT_ID="..." npx -y @ema.co/mcp-toolkit@latest
110
- ```
111
-
112
- ## Version Check
113
-
114
- ```bash
115
- npm view @ema.co/mcp-toolkit version
116
- ```
@@ -1,132 +0,0 @@
1
- # Document Generation AI - Resume Analysis Report Generator
2
-
3
- This template provides a document generation persona for creating comprehensive resume analysis reports.
4
-
5
- ## Overview
6
-
7
- The Resume Analysis Report Generator helps HR teams and hiring managers quickly evaluate candidates through AI-powered resume analysis. It extracts structured data from resumes, validates candidates against configurable criteria, and generates detailed assessment reports.
8
-
9
- ## Report Types
10
-
11
- ### 1. Candidate Assessment Report
12
- Comprehensive analysis of a single candidate including:
13
- - Executive summary with overall recommendation
14
- - Skills assessment (technical and soft skills)
15
- - Experience analysis and career trajectory
16
- - Education and credentials review
17
- - Fit scoring (technical, cultural, overall on 1-10 scale)
18
- - Concerns, red flags, and recommendations
19
-
20
- ### 2. Skills Gap Analysis
21
- Compare candidate qualifications against job requirements:
22
- - Required skills inventory from job description
23
- - Candidate skills inventory from resume
24
- - Gap identification matrix
25
- - Severity assessment (critical, moderate, minor)
26
- - Training and development recommendations
27
- - Time-to-proficiency estimates
28
-
29
- ### 3. Candidate Comparison Report
30
- Side-by-side comparison of multiple candidates:
31
- - Summary comparison table
32
- - Individual candidate profiles
33
- - Skills matrix comparison
34
- - Experience level comparison
35
- - Ranked recommendations
36
- - Interview priority order
37
-
38
- ## Key Features
39
-
40
- ### Entity Extraction
41
- Automatically extracts structured data from resumes:
42
- - Candidate name and contact information
43
- - Total years of experience
44
- - Current/most recent role
45
- - Education history (degrees, institutions, fields)
46
- - Technical skills inventory
47
- - Professional certifications
48
- - Complete work history with achievements
49
-
50
- ### Rule Validation
51
- Validates candidates against configurable hiring criteria:
52
- - Minimum experience requirements
53
- - Education standards
54
- - Communication skills evidence
55
- - Career progression patterns
56
- - Employment gap analysis
57
-
58
- ### Fit Scoring
59
- Provides quantified assessment across dimensions:
60
- - Technical Fit (40% weight) - Skills match to requirements
61
- - Experience Fit (35% weight) - Relevance and depth
62
- - Cultural Fit (25% weight) - Values and team alignment
63
- - Overall Recommendation: Strong Yes / Yes / Maybe / No
64
-
65
- ## Configuration
66
-
67
- ### Required Inputs
68
- - Resume documents (PDF, DOCX)
69
-
70
- ### Optional Inputs
71
- - Job description for comparison analysis
72
- - Analysis instructions (focus areas, scoring criteria)
73
- - Candidate tags for categorization
74
-
75
- ### Data Protection
76
- By default, the following are redacted from LLM processing:
77
- - Phone numbers
78
- - Email addresses
79
- - Physical addresses
80
- - Social security numbers
81
-
82
- ## Usage with MCP
83
-
84
- ```typescript
85
- // Create persona from template
86
- persona(input="Create a Resume Analysis Report Generator for our Engineering team", type="dashboard")
87
-
88
- // Upload resume for analysis
89
- data(persona_id="...", action="upload", file="candidate_resume.pdf")
90
-
91
- // Generate assessment report
92
- // (Done through Ema dashboard UI)
93
- ```
94
-
95
- ## Customization
96
-
97
- ### Adding Extraction Fields
98
- Modify the `extraction_columns` in the workflow definition to extract additional data points:
99
- - Languages spoken
100
- - Salary expectations
101
- - Notice period
102
- - Remote work preferences
103
- - Portfolio/GitHub links
104
-
105
- ### Custom Validation Rules
106
- Add rules to the `all_rulesets` configuration:
107
- - Industry-specific requirements
108
- - Skill-based criteria
109
- - Certification requirements
110
- - Location preferences
111
-
112
- ### Report Sections
113
- Configure `sectionConfigWidget` to customize report structure:
114
- - Add/remove sections
115
- - Reorder sections
116
- - Add custom section types
117
-
118
- ## File Support
119
-
120
- Supported resume formats:
121
- - PDF
122
- - DOCX
123
- - DOC
124
- - TXT
125
-
126
- ## Best Practices
127
-
128
- 1. **Upload job descriptions** - Enables more accurate fit scoring and gap analysis
129
- 2. **Customize validation rules** - Tailor criteria to your specific role requirements
130
- 3. **Use tags** - Categorize candidates by role type, experience level, location
131
- 4. **Review extraction accuracy** - Validate extracted data on first few resumes
132
- 5. **Iterate on prompts** - Refine analysis instructions based on report quality