@ema.co/mcp-toolkit 2026.2.23 → 2026.2.27

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.

@@ -1523,8 +1523,13 @@ persona(method="update", id="<ID>", config={widgets: [...]})
1523
1523
 
1524
1524
  ### 6. Upload Knowledge
1525
1525
  \`\`\`
1526
+ # Default widget ('fileUpload') — exists on every chat/voice persona
1526
1527
  persona(id="<ID>", data={method:"upload", path:"your-data.txt"})
1528
+
1529
+ # Custom widget — auto-created in proto_config on first upload (widget_created: true in response)
1530
+ persona(id="<ID>", data={method:"upload", path:"policies.pdf", widget_name:"policies"})
1527
1531
  \`\`\`
1532
+ Wire any custom widget to a search node: \`search/v2\` → \`datastore_configs\` → \`widgetConfig: { widgetName: "<widget_name>" }\`.
1528
1533
 
1529
1534
  ## Hard Requirements
1530
1535
 
package/dist/mcp/tools.js CHANGED
@@ -45,6 +45,8 @@ export function generateTools(envNames, defaultEnv) {
45
45
 
46
46
  ## Update
47
47
  - \`persona(method="update", id="abc", config={...})\` - update config (name, description, widgets)
48
+ - \`persona(method="update", id="abc", enabled=true)\` - activate persona
49
+ - \`persona(method="update", id="abc", enabled=false)\` - deactivate persona
48
50
 
49
51
  **IMPORTANT (strict)**:
50
52
  - Always fetch latest state immediately before changing: \`persona(method="get", id="abc", include_fingerprint=true)\`
@@ -183,6 +185,10 @@ persona(
183
185
  type: "object",
184
186
  description: "Proto config to update - name, description, widgets (for method=update)"
185
187
  },
188
+ enabled: {
189
+ type: "boolean",
190
+ description: "Enable/disable persona (for method=update). Set to true to activate, false to deactivate.",
191
+ },
186
192
  base_fingerprint: {
187
193
  type: "string",
188
194
  description: "Fingerprint from persona(method='get', include_fingerprint=true). REQUIRED for method=update unless force=true (stale-state protection).",
@@ -278,7 +284,7 @@ persona(
278
284
  // Especially important for Document Generation personas with multiple upload widgets
279
285
  widget_name: {
280
286
  type: "string",
281
- description: "Target widget for upload OR filter for stats. For Document Proposal Manager: 'upload' (Content Repository), 'upload1' (Service Line Docs), 'upload2' (Style Guide). Default: 'fileUpload'. See catalog(type='widgets') for reference."
287
+ description: "Target widget for upload OR filter for stats. Default: 'fileUpload'. If the named widget doesn't exist in the persona's proto_config, it is auto-created (type 3, fileUpload). Use a custom name to create a second knowledge base alongside the default one. For Document Proposal Manager: 'upload' (Content Repository), 'upload1' (Service Line Docs), 'upload2' (Style Guide). See catalog(type='widgets') for reference."
282
288
  },
283
289
  // delete params
284
290
  file_id: { type: "string", description: "File/item ID to delete (for method=delete)" },
@@ -704,9 +710,9 @@ persona(
704
710
  type: "number",
705
711
  description: "Max results to return (for method=conversations)",
706
712
  },
707
- offset: {
708
- type: "number",
709
- description: "Pagination offset (for method=conversations)",
713
+ pagination_token: {
714
+ type: "string",
715
+ description: "Pagination token from previous response (for method=conversations)",
710
716
  },
711
717
  channel: {
712
718
  type: "string",
@@ -177,6 +177,8 @@ export class EmaClientAdapter {
177
177
  proto_config: req.proto_config,
178
178
  name: req.name,
179
179
  description: req.description,
180
+ state: req.state,
181
+ enabled_by_user: req.enabled_by_user,
180
182
  });
181
183
  return result;
182
184
  }
@@ -278,6 +278,8 @@ export class EmaClientV2 {
278
278
  proto_config: data.proto_config,
279
279
  name: data.name,
280
280
  description: data.description,
281
+ state: data.state,
282
+ enabled_by_user: data.enabled_by_user,
281
283
  },
282
284
  });
283
285
  return result.data;
@@ -1,7 +1,7 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
- import { createSseClient } from '../core/serverSentEvents.gen';
3
- import { getValidRequestBody } from '../core/utils.gen';
4
- import { buildUrl, createConfig, createInterceptors, getParseAs, mergeConfigs, mergeHeaders, setAuthParams, } from './utils.gen';
2
+ import { createSseClient } from '../core/serverSentEvents.gen.js';
3
+ import { getValidRequestBody } from '../core/utils.gen.js';
4
+ import { buildUrl, createConfig, createInterceptors, getParseAs, mergeConfigs, mergeHeaders, setAuthParams, } from './utils.gen.js';
5
5
  export const createClient = (config = {}) => {
6
6
  let _config = mergeConfigs(createConfig(), config);
7
7
  const getConfig = () => ({ ..._config });
@@ -1,6 +1,6 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
- export { formDataBodySerializer, jsonBodySerializer, urlSearchParamsBodySerializer, } from '../core/bodySerializer.gen';
3
- export { buildClientParams } from '../core/params.gen';
4
- export { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';
5
- export { createClient } from './client.gen';
6
- export { createConfig, mergeHeaders } from './utils.gen';
2
+ export { formDataBodySerializer, jsonBodySerializer, urlSearchParamsBodySerializer, } from '../core/bodySerializer.gen.js';
3
+ export { buildClientParams } from '../core/params.gen.js';
4
+ export { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.js';
5
+ export { createClient } from './client.gen.js';
6
+ export { createConfig, mergeHeaders } from './utils.gen.js';
@@ -1,8 +1,8 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
- import { getAuthToken } from '../core/auth.gen';
3
- import { jsonBodySerializer } from '../core/bodySerializer.gen';
4
- import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam, } from '../core/pathSerializer.gen';
5
- import { getUrl } from '../core/utils.gen';
2
+ import { getAuthToken } from '../core/auth.gen.js';
3
+ import { jsonBodySerializer } from '../core/bodySerializer.gen.js';
4
+ import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam, } from '../core/pathSerializer.gen.js';
5
+ import { getUrl } from '../core/utils.gen.js';
6
6
  export const createQuerySerializer = ({ parameters = {}, ...args } = {}) => {
7
7
  const querySerializer = (queryParams) => {
8
8
  const search = [];
@@ -1,3 +1,3 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
- import { createClient, createConfig } from './client';
2
+ import { createClient, createConfig } from './client/index.js';
3
3
  export const client = createClient(createConfig({ baseUrl: 'https://api.ema.co' }));
@@ -1,5 +1,5 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
- import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam, } from './pathSerializer.gen';
2
+ import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam, } from './pathSerializer.gen.js';
3
3
  export const PATH_PARAM_RE = /\{[^{}]+\}/g;
4
4
  export const defaultPathSerializer = ({ path, url: _url }) => {
5
5
  let url = _url;
@@ -1,2 +1,2 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
- export { archiveProjectById, createChatbotConversation, createConversation, createDocument, createPersona, createPersonaTemplate, createProject, createProjectTemplate, deleteConversation, deletePersona, deletePersonaTemplate, deleteProjectTemplate, editChartSnippet, emailActionImage, emailActionLink, emailActionUnsubscribe, fetchTicketUpdates, getChatbotConfig, getChatHistory, getConversationMessages, getConversationMessagesPaginated, getDefaultPersonaTemplateAccessSettingsForTenant, getLinkedInAuthUrl, getLogoUploadUrl, getMailLoginUrlForPersona, getPersonaAccessLevelById, getPersonaById, getPersonaTemplateById, getProjectById, getProjectsForPersona, getProjectTemplateByPersonaId, getWelcomeMessage, grantPersonaTemplateAccess, healthBasicCheck, healthCheck, importPersona, linkedinAccountNotification, linkedinActionLink, listAllPersonaTemplates, listAvailablePhoneNumbers, listConversations, listConversationsForPersona, listConversationsPaginated, listPersonas, listPersonaTemplates, listPersonaTemplatesPost, listSavedSnippets, metrics, processWebPrompt, provisionPhoneNumber, regenerateDocument, retrieveDocument, revokePersonaTemplateAccess, saveSnippet, sendChatMessage, sendChatMessageAsync, setDefaultPersonaTemplateAccessSetting, setPersonaTemplateAccessSettingsForNewSubTenant, streamChatbotConversationsCsv, triggerProjectWorkflow, unsaveSnippet, updateConversationDisplayName, updateDataUploadStatus, updateDocument, updateMessageFeedback, updatePersona, updatePersonaTemplate, updateProject, updateProjectTemplate, uploadLogo, verifyLogoUpload } from './sdk.gen';
2
+ export { archiveProjectById, createChatbotConversation, createConversation, createDocument, createPersona, createPersonaTemplate, createProject, createProjectTemplate, deleteConversation, deletePersona, deletePersonaTemplate, deleteProjectTemplate, editChartSnippet, emailActionImage, emailActionLink, emailActionUnsubscribe, fetchTicketUpdates, getChatbotConfig, getChatHistory, getConversationMessages, getConversationMessagesPaginated, getDefaultPersonaTemplateAccessSettingsForTenant, getLinkedInAuthUrl, getLogoUploadUrl, getMailLoginUrlForPersona, getPersonaAccessLevelById, getPersonaById, getPersonaTemplateById, getProjectById, getProjectsForPersona, getProjectTemplateByPersonaId, getWelcomeMessage, grantPersonaTemplateAccess, healthBasicCheck, healthCheck, importPersona, linkedinAccountNotification, linkedinActionLink, listAllPersonaTemplates, listAvailablePhoneNumbers, listConversations, listConversationsForPersona, listConversationsPaginated, listPersonas, listPersonaTemplates, listPersonaTemplatesPost, listSavedSnippets, metrics, processWebPrompt, provisionPhoneNumber, regenerateDocument, retrieveDocument, revokePersonaTemplateAccess, saveSnippet, sendChatMessage, sendChatMessageAsync, setDefaultPersonaTemplateAccessSetting, setPersonaTemplateAccessSettingsForNewSubTenant, streamChatbotConversationsCsv, triggerProjectWorkflow, unsaveSnippet, updateConversationDisplayName, updateDataUploadStatus, updateDocument, updateMessageFeedback, updatePersona, updatePersonaTemplate, updateProject, updateProjectTemplate, uploadLogo, verifyLogoUpload } from './sdk.gen.js';
@@ -1,6 +1,6 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
- import { formDataBodySerializer } from './client';
3
- import { client } from './client.gen';
2
+ import { formDataBodySerializer } from './client/index.js';
3
+ import { client } from './client.gen.js';
4
4
  /**
5
5
  * Metrics
6
6
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ema.co/mcp-toolkit",
3
- "version": "2026.2.23",
3
+ "version": "2026.2.27",
4
4
  "description": "Ema AI Employee toolkit - MCP server, CLI, and SDK for managing AI Employees across environments",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -56,7 +56,7 @@
56
56
  "check:publish": "tsx scripts/check-publish-content.ts",
57
57
  "prepublishOnly": "npm run build && npm run test && npm run check:publish",
58
58
  "generate:types": "tsx scripts/generate-types.ts",
59
- "generate:api-client": "npx @hey-api/openapi-ts -i src/sdk/generated/openapi.json -o src/sdk/generated/api-client -c @hey-api/client-fetch",
59
+ "generate:api-client": "npx @hey-api/openapi-ts -i src/sdk/generated/openapi.json -o src/sdk/generated/api-client -c @hey-api/client-fetch && tsx scripts/fix-generated-esm-imports.ts",
60
60
  "generate:protos": "buf generate ../ema-repos/protos --template buf.gen.yaml",
61
61
  "generate:proto-fields": "tsx scripts/generate-proto-fields.ts",
62
62
  "generate:deprecated-actions": "tsx scripts/generate-deprecated-actions.ts",