@cognigy/plugin-engine 1.0.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.
Files changed (59) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +245 -0
  3. package/dist/api/client.d.ts +21 -0
  4. package/dist/api/client.d.ts.map +1 -0
  5. package/dist/api/client.js +123 -0
  6. package/dist/api/client.js.map +1 -0
  7. package/dist/config.d.ts +19 -0
  8. package/dist/config.d.ts.map +1 -0
  9. package/dist/config.js +141 -0
  10. package/dist/config.js.map +1 -0
  11. package/dist/index.d.ts +3 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +93 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/instructions.d.ts +2 -0
  16. package/dist/instructions.d.ts.map +1 -0
  17. package/dist/instructions.js +36 -0
  18. package/dist/instructions.js.map +1 -0
  19. package/dist/schemas/tools.d.ts +1846 -0
  20. package/dist/schemas/tools.d.ts.map +1 -0
  21. package/dist/schemas/tools.js +581 -0
  22. package/dist/schemas/tools.js.map +1 -0
  23. package/dist/tools/definitions.d.ts +12 -0
  24. package/dist/tools/definitions.d.ts.map +1 -0
  25. package/dist/tools/definitions.js +1522 -0
  26. package/dist/tools/definitions.js.map +1 -0
  27. package/dist/tools/filters.d.ts +13 -0
  28. package/dist/tools/filters.d.ts.map +1 -0
  29. package/dist/tools/filters.js +107 -0
  30. package/dist/tools/filters.js.map +1 -0
  31. package/dist/tools/handlers.d.ts +71 -0
  32. package/dist/tools/handlers.d.ts.map +1 -0
  33. package/dist/tools/handlers.js +3603 -0
  34. package/dist/tools/handlers.js.map +1 -0
  35. package/dist/tools/nodeRegistry.d.ts +37 -0
  36. package/dist/tools/nodeRegistry.d.ts.map +1 -0
  37. package/dist/tools/nodeRegistry.js +175 -0
  38. package/dist/tools/nodeRegistry.js.map +1 -0
  39. package/dist/tools/packageManagement.d.ts +140 -0
  40. package/dist/tools/packageManagement.d.ts.map +1 -0
  41. package/dist/tools/packageManagement.js +455 -0
  42. package/dist/tools/packageManagement.js.map +1 -0
  43. package/dist/tools/voiceChecklist.d.ts +80 -0
  44. package/dist/tools/voiceChecklist.d.ts.map +1 -0
  45. package/dist/tools/voiceChecklist.js +635 -0
  46. package/dist/tools/voiceChecklist.js.map +1 -0
  47. package/dist/tools/webchatSettings.d.ts +14 -0
  48. package/dist/tools/webchatSettings.d.ts.map +1 -0
  49. package/dist/tools/webchatSettings.js +462 -0
  50. package/dist/tools/webchatSettings.js.map +1 -0
  51. package/dist/utils/logger.d.ts +19 -0
  52. package/dist/utils/logger.d.ts.map +1 -0
  53. package/dist/utils/logger.js +52 -0
  54. package/dist/utils/logger.js.map +1 -0
  55. package/dist/utils/rateLimiter.d.ts +33 -0
  56. package/dist/utils/rateLimiter.d.ts.map +1 -0
  57. package/dist/utils/rateLimiter.js +68 -0
  58. package/dist/utils/rateLimiter.js.map +1 -0
  59. package/package.json +64 -0
@@ -0,0 +1,1522 @@
1
+ export const tools = [
2
+ // 1. create_ai_agent
3
+ {
4
+ name: "create_ai_agent",
5
+ description: "Create a complete AI Agent with auto-provisioned flow, AI Agent Job Node, and REST endpoint. Returns everything needed for talk_to_agent.\n\nIf projectId is omitted, a new project is auto-created using the agent name.\n\nLLM SETUP (required for the agent to generate responses):\n1. Ensure the target project already has a working LLM. If another project already has one, prefer reusing the required llm_model resources together with their shared connection resource(s) via manage_packages export/import.\n2. Use setup_llm only if no reusable LLM with connectionId exists or package transfer failed.\n3. If the LLM is not set as default, assign it via update_ai_agent { aiAgentId, jobConfig: { llmProviderReferenceId: \"<llm referenceId>\" } }.\n\nKNOWLEDGE: If knowledgeStoreReferenceId is provided, a knowledge search tool is automatically created on the agent's Job Node. This is the preferred way to give agents access to knowledge stores.\n\nReturns: agent, flow, endpoint objects, endpointUrl, llmStatus, and the projectId used. If a knowledge tool was created, it is included in the response.\nIf llmStatus is 'unknown', especially after auto-creating a new project, ensure a working LLM is reused or set up before calling talk_to_agent, and do not call talk_to_agent until a working LLM is confirmed.",
6
+ annotations: {
7
+ title: "Create AI Agent",
8
+ readOnlyHint: false,
9
+ destructiveHint: true,
10
+ idempotentHint: false,
11
+ openWorldHint: true,
12
+ },
13
+ inputSchema: {
14
+ type: "object",
15
+ properties: {
16
+ projectId: {
17
+ type: "string",
18
+ description: "24-char hex project ID. Optional — if omitted, a new project is created automatically.",
19
+ },
20
+ name: {
21
+ type: "string",
22
+ description: "Agent name (1-200 chars)",
23
+ },
24
+ description: {
25
+ type: "string",
26
+ description: "Agent description — defines the agent's persona and behavior",
27
+ },
28
+ knowledgeStoreReferenceId: {
29
+ type: "string",
30
+ description: 'Reference ID of a knowledge store to attach as a knowledge search tool on the agent (optional). This automatically creates a knowledge tool on the AI Agent Job Node. Use manage_knowledge { operation: "create_store" } first to get the store reference ID.',
31
+ },
32
+ },
33
+ required: ["name"],
34
+ },
35
+ },
36
+ // 2. update_ai_agent
37
+ {
38
+ name: "update_ai_agent",
39
+ description: "Update an AI Agent's configuration. This tool updates both the AI Agent resource and the AI Agent Job Node config.\n\nUSE ALL RELEVANT FIELDS — do not put everything in description alone. Distribute configuration across the appropriate fields:\n\nAGENT-LEVEL FIELDS (the agent's identity):\n- name: Display name\n- description: Agent PERSONA — who the agent is, personality, tone, and high-level behavior. This is the primary identity field.\n- instructions: Agent GUARDRAILS — high-level constraints and policies (up to 1000 chars). Things the agent must always/never do.\n\nJOB-LEVEL FIELDS (jobConfig — how the agent performs its job):\n- jobName: Job title / role name (e.g., 'Customer Support Specialist')\n- jobDescription: Detailed responsibilities, scope, expertise areas, and what tools are available for this job\n- jobInstructions: Step-by-step procedures, output format requirements, decision trees for the job\n- llmProviderReferenceId: LLM to use (from setup_llm or list_resources { resourceType: 'llm_model' })\n- temperature: 0-1, lower = more deterministic (default: 0.7)\n- maxTokens: 100-8000 (default: 4000)\n\nKNOWLEDGE: Always use create_tool { toolType: 'knowledge' } to attach knowledge stores as tools. Only use persona-level knowledge if the user explicitly requests it.\n\nRequires: aiAgentId (from create_ai_agent or list_resources { resourceType: 'agent' }).\nAfter updating, use talk_to_agent to test the changes.",
40
+ annotations: {
41
+ title: "Update AI Agent",
42
+ readOnlyHint: false,
43
+ destructiveHint: true,
44
+ idempotentHint: true,
45
+ openWorldHint: true,
46
+ },
47
+ inputSchema: {
48
+ type: "object",
49
+ properties: {
50
+ aiAgentId: {
51
+ type: "string",
52
+ description: "24-char hex AI Agent ID (from create_ai_agent response or list_resources)",
53
+ },
54
+ name: { type: "string", description: "Agent display name" },
55
+ description: {
56
+ type: "string",
57
+ description: "Agent PERSONA — who the agent is, its personality, tone, and high-level behavior. This is the primary field for shaping agent identity. Example: 'You are a friendly customer support agent for Acme Corp...'",
58
+ },
59
+ instructions: {
60
+ type: "string",
61
+ description: "Agent GUARDRAILS — high-level constraints and policies that apply regardless of the job (up to 1000 chars). Example: 'Never share internal pricing. Always verify identity before account changes.'",
62
+ },
63
+ jobConfig: {
64
+ type: "object",
65
+ description: "AI Agent Job Node configuration — controls the job role, procedures, LLM, and model parameters. Use ALL relevant fields to fully configure agent behavior.",
66
+ properties: {
67
+ jobName: {
68
+ type: "string",
69
+ description: "Job TITLE — the role the agent is performing. Example: 'Customer Support Specialist', 'Sales Assistant', 'Technical Advisor'",
70
+ },
71
+ jobDescription: {
72
+ type: "string",
73
+ description: "Job SCOPE — detailed description of responsibilities, expertise areas, available tools, and what to escalate. Example: 'Handle customer inquiries about orders, returns, and shipping. Use the search tool for order lookups. Escalate billing disputes to human agents.'",
74
+ },
75
+ jobInstructions: {
76
+ type: "string",
77
+ description: "Job PROCEDURES — step-by-step instructions, output format requirements, and decision trees. Example: '1. Greet the customer. 2. Ask for order number. 3. Look up order. 4. Provide status update.'",
78
+ },
79
+ llmProviderReferenceId: {
80
+ type: "string",
81
+ description: "LLM referenceId to assign (from setup_llm or list_resources { resourceType: 'llm_model' }). Determines which LLM generates responses.",
82
+ },
83
+ temperature: {
84
+ type: "number",
85
+ description: "LLM temperature (0-1). Lower = more deterministic, higher = more creative. Default: 0.7",
86
+ },
87
+ maxTokens: {
88
+ type: "number",
89
+ description: "Max tokens for LLM response (100-8000). Default: 4000",
90
+ },
91
+ },
92
+ },
93
+ },
94
+ required: ["aiAgentId"],
95
+ },
96
+ },
97
+ // 3. setup_llm
98
+ {
99
+ name: "setup_llm",
100
+ description: "Create a NEW LLM resource (GPT-4, Claude, etc.) in a project. This is a LAST RESORT — only use when no existing LLM can be reused.\n\nPRECONDITION — you MUST have already completed ALL of these before calling this tool:\n1. Listed all projects: list_resources { resourceType: 'project' }\n2. Checked every other project for existing LLMs: list_resources { resourceType: 'llm_model', projectId }\n3. Attempted package reuse where another project already has a reusable LLM with connectionId\n4. Proceeding only because reuse is unavailable, transfer failed, or the user explicitly asked for a brand-new LLM\nIf you have not completed steps 1-4, STOP and do them first. Do NOT call this tool.\n\nMODEL ROLE WARNING:\n- Chat/completion models are used for AI Agents.\n- Embedding models are used for knowledge-store indexing.\n- Knowledge Search and Answer Extraction use same-project llm_model IDs accepted by the Cognigy API for that use case.\n- Do not use setup_llm as an automatic workaround for knowledgeSearchModelId failures while existing same-project candidates still exist.\n\nIMPORTANT: NEVER guess or hallucinate API keys. If creating a new LLM and no apiKey or connectionId was provided by the user, ASK for the required credentials.\n\nAfter creation, the connection is normally tested by sending a minimal probe to the provider. If this connection test runs and fails (for example, invalid credentials or model name), the model is deleted and an error is returned — this prevents broken model references from silently breaking downstream flows.\n\nIf the provider's test endpoint is unreachable or returns a non-testable status, the model is kept but a warning is returned so you know connectivity could not be fully verified.\n\nIf dangerouslySkipConnectionTest is true, the connection test is not run at all; the model is kept and the response includes a warning that no connectivity check was performed. Only use this flag when you explicitly accept the risk that the created LLM might not be callable. Never use it to bypass a missing or cross-project connection.\n\nIf isDefault is true (the default), agents in the project will automatically use this LLM. If isDefault is false, you must explicitly assign it to the agent via update_ai_agent { aiAgentId, jobConfig: { llmProviderReferenceId: '<referenceId from this response>' } }.\n\nThe response includes the LLM's referenceId — use this value for jobConfig.llmProviderReferenceId if assigning manually.\n\nTo list existing LLMs: use list_resources { resourceType: 'llm_model', projectId }.\nTo delete: use delete_resource { resourceType: 'llm_model', id }.",
101
+ annotations: {
102
+ title: "Setup LLM",
103
+ readOnlyHint: false,
104
+ destructiveHint: true,
105
+ idempotentHint: false,
106
+ openWorldHint: true,
107
+ },
108
+ inputSchema: {
109
+ type: "object",
110
+ properties: {
111
+ projectId: { type: "string", description: "24-char hex project ID" },
112
+ provider: {
113
+ type: "string",
114
+ enum: ["openAI", "azureOpenAI", "anthropic", "google", "mistral"],
115
+ description: "LLM provider (API values: 'openAI', 'azureOpenAI', 'anthropic', 'google', 'mistral').",
116
+ },
117
+ modelType: {
118
+ type: "string",
119
+ description: "Model type string. Chat examples: 'gpt-4o', 'gpt-4o-mini', 'claude-sonnet-4-0', 'mistral-small-2503'. Embedding examples: 'text-embedding-3-small', 'text-embedding-3-large', 'text-embedding-ada-002', 'gemini-embedding-001'.",
120
+ },
121
+ name: {
122
+ type: "string",
123
+ description: "Display name for the LLM resource (defaults to modelType if omitted)",
124
+ },
125
+ apiKey: {
126
+ type: "string",
127
+ description: "Provider API key. A Connection will be auto-created from this key.",
128
+ },
129
+ connectionId: {
130
+ type: "string",
131
+ description: "Existing Cognigy Connection referenceId (UUID) from the SAME project. Connections are project-scoped — a connectionId from a different project will NOT work and will be rejected. To reuse a connection from another project, use the package export/import workflow (see LLM REUSE VIA PACKAGES in server instructions) instead of passing a cross-project connectionId here.",
132
+ },
133
+ isDefault: {
134
+ type: "boolean",
135
+ description: "Set as project default (default: true)",
136
+ },
137
+ dangerouslySkipConnectionTest: {
138
+ type: "boolean",
139
+ description: "LAST RESORT ONLY — Skip the automatic connection validation after creating the model. " +
140
+ "This creates an LLM that may be completely non-functional. " +
141
+ "Do NOT use this to work around a failed connection test — a failed test means the credentials are wrong or the connection doesn't exist. " +
142
+ "Skipping the test does NOT fix the underlying problem, it just hides it. " +
143
+ "Only use when the test endpoint is known to be unavailable (e.g., air-gapped environments, " +
144
+ "unsupported custom model providers) AND the user has explicitly confirmed. Default: false.",
145
+ },
146
+ },
147
+ required: ["projectId", "provider", "modelType"],
148
+ },
149
+ },
150
+ // 4. talk_to_agent
151
+ {
152
+ name: "talk_to_agent",
153
+ description: "Send a message to a Cognigy AI Agent and get its response. Use this to test agent behavior during iterative development.\n\nTwo modes:\n1. DIRECT: Provide endpointUrl (from create_ai_agent or list_resources { resourceType: 'endpoint' }).\n2. BY AGENT: Provide aiAgentId — the tool automatically finds or creates a REST endpoint for the agent's flow.\n\nUse the same sessionId across calls for multi-turn conversations.\n\nReturns: agentResponse text and sessionId. Add verbose: true for the full raw API response.",
154
+ annotations: {
155
+ title: "Talk to Agent",
156
+ readOnlyHint: false,
157
+ destructiveHint: true,
158
+ idempotentHint: false,
159
+ openWorldHint: true,
160
+ },
161
+ inputSchema: {
162
+ type: "object",
163
+ properties: {
164
+ endpointUrl: {
165
+ type: "string",
166
+ description: "REST endpoint URL (e.g., https://endpoint-trial.cognigy.ai/xxxxx). If omitted, provide aiAgentId instead.",
167
+ },
168
+ aiAgentId: {
169
+ type: "string",
170
+ description: "24-char hex AI Agent ID. When endpointUrl is omitted, the tool finds or auto-creates a REST endpoint for this agent's flow.",
171
+ },
172
+ projectId: {
173
+ type: "string",
174
+ description: "24-char hex project ID. Pass alongside aiAgentId when known (returned by create_ai_agent and list_resources) — saves a server-side lookup that can fail. Not used when endpointUrl is provided.",
175
+ },
176
+ message: {
177
+ type: "string",
178
+ description: "Message to send to the agent",
179
+ },
180
+ sessionId: {
181
+ type: "string",
182
+ description: "Session ID for conversation continuity. Omit to start new session.",
183
+ },
184
+ userId: {
185
+ type: "string",
186
+ description: "User identifier (defaults to 'mcp-user')",
187
+ },
188
+ data: {
189
+ type: "object",
190
+ description: "Additional data payload to send with the message",
191
+ },
192
+ verbose: {
193
+ type: "boolean",
194
+ description: "If true, include the full raw API response (default: false)",
195
+ },
196
+ },
197
+ required: ["message"],
198
+ },
199
+ },
200
+ // 5. list_resources
201
+ {
202
+ name: "list_resources",
203
+ description: "List resources in a Cognigy project. Use this to discover projects, agents, flows, endpoints, LLM models, knowledge stores, conversations, extensions, functions, or tools.\n\nSet resourceType to 'project' to find projectIds (no projectId needed). 'tool' requires aiAgentId instead of projectId. All other types require projectId. For `llm_model`, you can also pass `useCase` to match the UI's use-case-filtered model dropdowns (for example `knowledgeSearch`). Packages are handled through manage_packages.\n\nReturns a paginated list with id, name, and type-specific fields.",
204
+ annotations: {
205
+ title: "List Resources",
206
+ readOnlyHint: true,
207
+ destructiveHint: false,
208
+ idempotentHint: true,
209
+ openWorldHint: true,
210
+ },
211
+ inputSchema: {
212
+ type: "object",
213
+ properties: {
214
+ resourceType: {
215
+ type: "string",
216
+ enum: [
217
+ "project",
218
+ "agent",
219
+ "flow",
220
+ "endpoint",
221
+ "llm_model",
222
+ "knowledge_store",
223
+ "conversation",
224
+ "extension",
225
+ "function",
226
+ "tool",
227
+ ],
228
+ description: "Type of resource to list",
229
+ },
230
+ projectId: {
231
+ type: "string",
232
+ description: "24-char hex project ID. Required for all types except 'project' and 'tool'.",
233
+ },
234
+ aiAgentId: {
235
+ type: "string",
236
+ description: "24-char hex AI Agent ID (tools only — lists tools in the agent's flow)",
237
+ },
238
+ startDate: {
239
+ type: "string",
240
+ description: "ISO 8601 date filter (conversations only)",
241
+ },
242
+ endDate: {
243
+ type: "string",
244
+ description: "ISO 8601 date filter (conversations only)",
245
+ },
246
+ channel: {
247
+ type: "string",
248
+ description: "Channel filter, e.g. 'rest', 'webchat3' (conversations only)",
249
+ },
250
+ useCase: {
251
+ type: "string",
252
+ description: "llm_model only — filter LLMs to the models allowed for a specific use case, matching the Cognigy UI dropdown. Example: 'knowledgeSearch', 'answerExtraction', 'aiAgent', or 'promptNode'.",
253
+ },
254
+ limit: {
255
+ type: "number",
256
+ description: "Results per page (1-100, default 25)",
257
+ },
258
+ skip: {
259
+ type: "number",
260
+ description: "Number of results to skip (default 0)",
261
+ },
262
+ },
263
+ required: ["resourceType"],
264
+ },
265
+ },
266
+ // 6. get_resource
267
+ {
268
+ name: "get_resource",
269
+ description: "Get detailed information about a single Cognigy resource. Returns a summary view by default. Set `raw: true` for the complete unfiltered API response with all fields.\n\nUse list_resources first to find IDs. Supports all list_resources types plus 'session_state' for session context data.",
270
+ annotations: {
271
+ title: "Get Resource",
272
+ readOnlyHint: true,
273
+ destructiveHint: false,
274
+ idempotentHint: true,
275
+ openWorldHint: true,
276
+ },
277
+ inputSchema: {
278
+ type: "object",
279
+ properties: {
280
+ resourceType: {
281
+ type: "string",
282
+ enum: [
283
+ "agent",
284
+ "flow",
285
+ "endpoint",
286
+ "project",
287
+ "conversation",
288
+ "session_state",
289
+ "llm_model",
290
+ "knowledge_store",
291
+ "extension",
292
+ "function",
293
+ ],
294
+ description: "Type of resource to retrieve",
295
+ },
296
+ id: {
297
+ type: "string",
298
+ description: "Resource ID (24-char hex or session ID for conversation/session_state)",
299
+ },
300
+ projectId: {
301
+ type: "string",
302
+ description: "24-char hex project ID. Required for endpoint lookups.",
303
+ },
304
+ raw: {
305
+ type: "boolean",
306
+ description: "If true, return unfiltered API response (default: false)",
307
+ },
308
+ },
309
+ required: ["resourceType", "id"],
310
+ },
311
+ },
312
+ // 7. delete_resource
313
+ {
314
+ name: "delete_resource",
315
+ description: "Permanently delete a Cognigy resource. This cannot be undone.\n\nUse list_resources to verify the resource exists before deleting.\nSome types (endpoint) may require projectId. For 'tool' type, provide aiAgentId — the handler resolves and deletes the underlying flow node internally.\n\nAGENT DELETION: Deleting an agent is a last resort. By default (cascade: true), it cascade-deletes all associated resources in the correct order: endpoints → flow → agent. The Cognigy API rejects agent deletion while a referencing flow exists, so cascade is required. Set cascade: false to attempt a bare agent delete (will fail if flow still exists). The response reports every resource deleted and any failures.",
316
+ annotations: {
317
+ title: "Delete Resource",
318
+ readOnlyHint: false,
319
+ destructiveHint: true,
320
+ idempotentHint: true,
321
+ openWorldHint: true,
322
+ },
323
+ inputSchema: {
324
+ type: "object",
325
+ properties: {
326
+ resourceType: {
327
+ type: "string",
328
+ enum: [
329
+ "agent",
330
+ "flow",
331
+ "endpoint",
332
+ "llm_model",
333
+ "knowledge_store",
334
+ "function",
335
+ "tool",
336
+ ],
337
+ description: "Type of resource to delete",
338
+ },
339
+ id: {
340
+ type: "string",
341
+ description: "24-char hex resource ID (or toolId for tool type)",
342
+ },
343
+ projectId: {
344
+ type: "string",
345
+ description: "24-char hex project ID (required for some types)",
346
+ },
347
+ aiAgentId: {
348
+ type: "string",
349
+ description: "24-char hex AI Agent ID (required for tool type — needed to resolve the flow)",
350
+ },
351
+ cascade: {
352
+ type: "boolean",
353
+ description: "Agent deletion only. If true (default), cascade-deletes endpoints → flow → agent. If false, attempts bare agent delete (fails if flow still exists).",
354
+ },
355
+ },
356
+ required: ["resourceType", "id"],
357
+ },
358
+ },
359
+ // 8. manage_knowledge
360
+ {
361
+ name: "manage_knowledge",
362
+ description: "Manage knowledge bases for RAG. Create stores, add sources (URLs, text, or files), and list chunks to verify content.\n\nPREREQUISITES:\n- An embedding-capable model must be configured in the project before creating or using knowledge stores.\n- For normal AI-agent knowledge-store setups, configure Knowledge AI settings with manage_settings { operation: 'set_knowledge_ai', ... } before creating the store.\n- knowledgeSearchModelId must be an llm_model referenceId from the SAME project.\n- If you are reusing another project's knowledge workflow, import the exact source-project Knowledge Search model into the target project before guessing with a different model.\n\nFor URL sources: provide type 'url' and url field — the page is scraped and ingested automatically.\nFor text sources: provide text field (type defaults to 'manual') — a source and chunk are created.\nFor file sources (PDF, TXT, DOCX, CTXT, PPTX): provide type 'file' with filePath pointing to a local file. The server reads the file from disk and uploads it. Ingestion is async.\nTo verify content: use list_chunks with knowledgeStoreId (and optionally sourceId, filter).\n\nTo list stores: use list_resources { resourceType: 'knowledge_store' }.\nTo delete: use delete_resource { resourceType: 'knowledge_store', id }.\nAvoid repeated list_resources scans for the same unchanged project — reuse previous llm_model results unless imports or setup changed the state.",
363
+ annotations: {
364
+ title: "Manage Knowledge",
365
+ readOnlyHint: false,
366
+ destructiveHint: true,
367
+ idempotentHint: false,
368
+ openWorldHint: true,
369
+ },
370
+ inputSchema: {
371
+ type: "object",
372
+ properties: {
373
+ operation: {
374
+ type: "string",
375
+ enum: [
376
+ "create_store",
377
+ "create_source",
378
+ "list_chunks",
379
+ "list_sources",
380
+ ],
381
+ description: "create_store: new knowledge base. create_source: add content from URL, text, or file. list_chunks: list/filter chunks in a source. list_sources: list all sources in a knowledge store.",
382
+ },
383
+ projectId: {
384
+ type: "string",
385
+ description: "24-char hex project ID (required for create_store)",
386
+ },
387
+ knowledgeStoreId: {
388
+ type: "string",
389
+ description: "24-char hex store ID (required for create_source, list_chunks)",
390
+ },
391
+ sourceId: {
392
+ type: "string",
393
+ description: "24-char hex source ID (optional for list_chunks — if omitted, uses the first source in the store)",
394
+ },
395
+ name: {
396
+ type: "string",
397
+ description: "Source or store name (required for create_store, optional for create_source)",
398
+ },
399
+ description: {
400
+ type: "string",
401
+ description: "Store or source description",
402
+ },
403
+ type: {
404
+ type: "string",
405
+ enum: ["url", "manual", "file"],
406
+ description: "Source type (create_source). 'url' scrapes a web page. 'manual' stores text directly. 'file' uploads a local document. Auto-detected from provided fields if omitted.",
407
+ },
408
+ url: {
409
+ type: "string",
410
+ description: "URL to scrape (required when type is url)",
411
+ },
412
+ text: {
413
+ type: "string",
414
+ description: "Text content to store as a knowledge chunk (required when type is manual)",
415
+ },
416
+ filePath: {
417
+ type: "string",
418
+ description: "Absolute path to a local file to upload (required when type is file). Supported formats: PDF, TXT, DOCX, CTXT, PPTX. Max 10MB. Example: '/Users/me/docs/report.pdf'.",
419
+ },
420
+ filter: {
421
+ type: "string",
422
+ description: "Text filter for list_chunks — matches against chunk text",
423
+ },
424
+ limit: { type: "number", description: "Max results (1-50)" },
425
+ },
426
+ required: ["operation"],
427
+ },
428
+ },
429
+ // 9. create_tool
430
+ {
431
+ name: "create_tool",
432
+ description: `Create a tool as a child of an AI Agent's Job node. Tools extend what the agent can do.
433
+
434
+ IMPORTANT — environment-specific conventions that are NOT obvious from this schema and that silently produce broken tools when missed: the wrapped HTTP response shape (input.httprequest is an object containing { result, statusCode, length }, NOT the raw response body), where LLM tool-call arguments live (input.aiAgent.toolArgs.<param>, NOT input.data), and Code-node rules (top-level return is forbidden — mutate input directly). Assuming "REST is obvious" or "Code nodes are just JS" is the most common cause of HTTP tools that fire successfully but return empty results to the LLM.
435
+
436
+ Tool types:
437
+ - tool: General-purpose tool with custom logic branch. Use this for most requests (e.g., "unlock account", "check status", "validate input"). Provide toolId, description, and optional parameters (JSON Schema). After creation, use manage_flow_nodes with parentNodeId = returned toolNodeId and mode = "appendChild" to add logic nodes (say, code, ifThenElse, httpRequest, etc.) inside the tool branch.
438
+ - knowledge: Search a Knowledge Store. Provide knowledgeStoreId, toolId, description.
439
+ - send_email: Send emails. Provide toolId, description, recipient.
440
+ - mcp: Connect to an EXTERNAL MCP (Model Context Protocol) server. ONLY use when the user explicitly asks to integrate with a specific external MCP server and provides an MCP server URL. Do NOT use for general tool requests — use "tool" or "http" instead.
441
+ - http: Call an external HTTP API. Use when the user wants to call a specific REST/HTTP endpoint. Provide toolId, description, url, method, and optionally headers, body, preProcessCode, postProcessCode. Creates an aiAgentJobTool with child HTTP Request node (and optional pre/post-process Code nodes).
442
+
443
+ Default choice: When unsure which toolType to use, default to "tool" (general-purpose). Only use "mcp" or "http" when the user specifically mentions an external MCP server or a specific HTTP API endpoint.
444
+
445
+ IMPORTANT: Create exactly one tool per business action. If the same toolId already exists, create_tool reuses the existing tool node instead of creating a duplicate. If you need more logic for that action, reuse the same toolNodeId with manage_flow_nodes or update_tool.
446
+
447
+ Prerequisites: Agent must exist (created via create_ai_agent).
448
+ To list tools: list_resources { resourceType: 'tool', aiAgentId }.
449
+ To delete: delete_resource { resourceType: 'tool', id: toolId, aiAgentId }.
450
+ After creating, use talk_to_agent to test.`,
451
+ annotations: {
452
+ title: "Create Tool",
453
+ readOnlyHint: false,
454
+ destructiveHint: true,
455
+ idempotentHint: false,
456
+ openWorldHint: true,
457
+ },
458
+ inputSchema: {
459
+ type: "object",
460
+ properties: {
461
+ aiAgentId: {
462
+ type: "string",
463
+ description: "24-char hex AI Agent ID (from create_ai_agent or list_resources { resourceType: 'agent' })",
464
+ },
465
+ toolType: {
466
+ type: "string",
467
+ enum: ["tool", "knowledge", "send_email", "mcp", "http"],
468
+ description: "tool: general-purpose with custom logic (DEFAULT — use for most requests). knowledge: search a Knowledge Store. send_email: send emails. mcp: connect to an external MCP server (ONLY when user explicitly requests MCP integration with a specific server URL). http: call an external HTTP API (when user specifies a concrete API endpoint).",
469
+ },
470
+ name: {
471
+ type: "string",
472
+ description: "Tool display name (e.g., 'Fetch Weather', 'Search FAQ'). The node label in the flow uses the snake_case toolId from config (e.g., 'fetch_weather') if provided, otherwise falls back to this name.",
473
+ },
474
+ config: {
475
+ type: "object",
476
+ description: "Tool-specific configuration — fields depend on toolType.",
477
+ properties: {
478
+ toolId: {
479
+ type: "string",
480
+ description: "Tool identifier for the LLM in snake_case (e.g., fetch_weather, search_faq). Also used as the node label in the flow. (tool, knowledge, send_email, http)",
481
+ },
482
+ description: {
483
+ type: "string",
484
+ description: "Tool description for the LLM (tool, knowledge, send_email, http)",
485
+ },
486
+ parameters: {
487
+ type: "string",
488
+ description: "JSON Schema string defining tool parameters (tool, http)",
489
+ },
490
+ knowledgeStoreId: {
491
+ type: "string",
492
+ description: "Knowledge store reference ID (knowledge only)",
493
+ },
494
+ topK: {
495
+ type: "number",
496
+ description: "Number of results to return (knowledge only, default varies)",
497
+ },
498
+ recipient: {
499
+ type: "string",
500
+ description: "Email recipient address(es) (send_email only)",
501
+ },
502
+ mcpServerUrl: {
503
+ type: "string",
504
+ description: "MCP server URL (mcp only)",
505
+ },
506
+ mcpName: {
507
+ type: "string",
508
+ description: "MCP connection name (mcp only)",
509
+ },
510
+ timeout: {
511
+ type: "number",
512
+ description: "Timeout in seconds (mcp only)",
513
+ },
514
+ url: {
515
+ type: "string",
516
+ description: "HTTP endpoint URL, e.g. 'https://api.example.com/v1/data' (http only)",
517
+ },
518
+ method: {
519
+ type: "string",
520
+ enum: ["GET", "POST", "PUT", "PATCH", "DELETE"],
521
+ description: "HTTP method, default: GET (http only)",
522
+ },
523
+ headers: {
524
+ type: "object",
525
+ description: 'HTTP headers as key-value pairs, e.g. { "Authorization": "Bearer ..." } (http only)',
526
+ },
527
+ body: {
528
+ type: "string",
529
+ description: "Request body template. Use CognigyScript tokens like {{input.aiAgent.toolArgs.param}} for dynamic values (http only).",
530
+ },
531
+ preProcessCode: {
532
+ type: "string",
533
+ description: "JavaScript code to run BEFORE the HTTP request. Runs in Cognigy's Code Node environment with access to input, context, actions (http only).",
534
+ },
535
+ postProcessCode: {
536
+ type: "string",
537
+ description: "JavaScript code to run AFTER the HTTP response. Runs in Cognigy's Code Node environment with access to input, context, actions (http only).",
538
+ },
539
+ toolResponseValue: {
540
+ type: "string",
541
+ description: "CognigyScript expression for the Resolve Tool Action node's answer field. Controls what value is returned to the LLM as the tool result. For http tools, default: '{{JSON.stringify(input.httprequest)}}'. For general-purpose tools, default: '{{JSON.stringify(input.result)}}'. Set this to match where your code stores the result. Must be a valid CognigyScript expression.",
542
+ },
543
+ },
544
+ },
545
+ },
546
+ required: ["aiAgentId", "toolType", "name", "config"],
547
+ },
548
+ },
549
+ // 10. update_tool
550
+ {
551
+ name: "update_tool",
552
+ description: "Update an existing tool node's configuration in an AI Agent's flow. Accepts the same config fields as create_tool.\n\nRequires: aiAgentId (to resolve the flow) and toolNodeId (the node ID from create_tool or list_resources { resourceType: 'tool', aiAgentId }).\n\nYou can update the name (display label) and/or tool-type-specific config fields. For http tools, config fields like url, method, headers, body update the child HTTP Request node, and preProcessCode/postProcessCode update the child Code nodes. If a pre-/post-process Code node does not yet exist (because the tool was originally created without that field), passing preProcessCode or postProcessCode here will provision and wire a new Code node — the same as if it had been included on create_tool. To target a specific existing Code node directly when label-based lookup is ambiguous, pass preProcessNodeId / postProcessNodeId.\n\nAfter updating, use talk_to_agent to test the changes.",
553
+ annotations: {
554
+ title: "Update Tool",
555
+ readOnlyHint: false,
556
+ destructiveHint: true,
557
+ idempotentHint: true,
558
+ openWorldHint: true,
559
+ },
560
+ inputSchema: {
561
+ type: "object",
562
+ properties: {
563
+ aiAgentId: {
564
+ type: "string",
565
+ description: "24-char hex AI Agent ID (from create_ai_agent or list_resources { resourceType: 'agent' })",
566
+ },
567
+ toolNodeId: {
568
+ type: "string",
569
+ description: "24-char hex tool node ID (from create_tool or list_resources { resourceType: 'tool', aiAgentId })",
570
+ },
571
+ name: {
572
+ type: "string",
573
+ description: "New display name for the tool node (optional)",
574
+ },
575
+ toolType: {
576
+ type: "string",
577
+ enum: ["tool", "knowledge", "send_email", "mcp", "http"],
578
+ description: "Tool type hint — helps the handler know which config fields to map. Optional if only updating name.",
579
+ },
580
+ config: {
581
+ type: "object",
582
+ description: "Tool-specific configuration — same fields as create_tool config. Merged with existing config on the node.",
583
+ properties: {
584
+ toolId: {
585
+ type: "string",
586
+ description: "Tool identifier for the LLM (tool, knowledge, send_email, http)",
587
+ },
588
+ description: {
589
+ type: "string",
590
+ description: "Tool description for the LLM (tool, knowledge, send_email, http)",
591
+ },
592
+ parameters: {
593
+ type: "string",
594
+ description: "JSON Schema string defining tool parameters (tool, http)",
595
+ },
596
+ knowledgeStoreId: {
597
+ type: "string",
598
+ description: "Knowledge store reference ID (knowledge only)",
599
+ },
600
+ topK: {
601
+ type: "number",
602
+ description: "Number of results to return (knowledge only)",
603
+ },
604
+ recipient: {
605
+ type: "string",
606
+ description: "Email recipient address(es) (send_email only)",
607
+ },
608
+ mcpServerUrl: {
609
+ type: "string",
610
+ description: "MCP server URL (mcp only)",
611
+ },
612
+ mcpName: {
613
+ type: "string",
614
+ description: "MCP connection name (mcp only)",
615
+ },
616
+ timeout: {
617
+ type: "number",
618
+ description: "Timeout in seconds (mcp only)",
619
+ },
620
+ url: {
621
+ type: "string",
622
+ description: "HTTP endpoint URL (http only)",
623
+ },
624
+ method: {
625
+ type: "string",
626
+ enum: ["GET", "POST", "PUT", "PATCH", "DELETE"],
627
+ description: "HTTP method (http only)",
628
+ },
629
+ headers: {
630
+ type: "object",
631
+ description: "HTTP headers as key-value pairs (http only)",
632
+ },
633
+ body: {
634
+ type: "string",
635
+ description: "Request body template (http only)",
636
+ },
637
+ preProcessCode: {
638
+ type: "string",
639
+ description: "JavaScript code for the pre-process Code node (http only)",
640
+ },
641
+ postProcessCode: {
642
+ type: "string",
643
+ description: "JavaScript code for the post-process Code node (http only)",
644
+ },
645
+ toolResponseValue: {
646
+ type: "string",
647
+ description: "CognigyScript expression for the Resolve Tool Action node's answer field. Controls what value is returned to the LLM. For http tools, default: '{{JSON.stringify(input.httprequest)}}'. For general-purpose tools, default: '{{JSON.stringify(input.result)}}'. Set to match where your code stores results.",
648
+ },
649
+ httpNodeId: {
650
+ type: "string",
651
+ description: "Optional 24-char hex ID of the HTTP Request child node (from create_tool's childNodes.httpNodeId). Pass this to target the node directly when label-based lookup fails (http only).",
652
+ },
653
+ preProcessNodeId: {
654
+ type: "string",
655
+ description: "Optional 24-char hex ID of the pre-process Code child node (from create_tool's childNodes.preProcessNodeId). Pass this to target the node directly when label-based lookup fails (http only).",
656
+ },
657
+ postProcessNodeId: {
658
+ type: "string",
659
+ description: "Optional 24-char hex ID of the post-process Code child node (from create_tool's childNodes.postProcessNodeId). Pass this to target the node directly when label-based lookup fails (http only).",
660
+ },
661
+ resolveNodeId: {
662
+ type: "string",
663
+ description: "Optional 24-char hex ID of the Resolve Tool Action child node (from create_tool's childNodes.resolveNodeId). Required to update toolResponseValue when more than one Resolve Tool Action node exists in the flow.",
664
+ },
665
+ },
666
+ },
667
+ },
668
+ required: ["aiAgentId", "toolNodeId"],
669
+ },
670
+ },
671
+ // 12. manage_flow_nodes
672
+ {
673
+ name: "manage_flow_nodes",
674
+ description: 'Add flow nodes inside tool branches to build custom logic for AI Agent tools.\n\nIMPORTANT: Nodes should be created INSIDE tool branches. First create a tool with create_tool { toolType: "tool" }, then use this tool to add logic nodes under it (parentNodeId = toolNodeId, mode = "appendChild"). Do NOT add standalone nodes before the AI Agent Job node unless the user explicitly asks for it.\n\nTool branch placement is handled automatically: when you appendChild to an aiAgentJobTool, then, else, case, or default node, the handler auto-rewrites to append mode so nodes land in the correct execution chain. Both appendChild and append work correctly for tool branches.\n\nBRANCHING NODES (ifThenElse, lookup):\n- ifThenElse auto-creates then/else child nodes. lookup auto-creates case/default child nodes.\n- To add nodes inside a branch: list nodes to find the branch child ID, then use mode "append" with parentNodeId = the branch child node ID.\n- Do NOT use mode "appendChild" on then/else/case/default nodes — use "append" instead (the handler auto-corrects this, but "append" is the correct approach).\n- To set case values on a lookup/switch node, update the parent switch with a cases array: config { cases: [{ id: "<caseNodeId>", value: "billing" }] }.\n- To update a single case node directly: update with config { value: "billing" }.\n\nOPERATIONS:\n- list: List all nodes in a flow (returns id, type, label, parentId).\n- create: Add a node inside a tool branch. Requires nodeType and config. Set parentNodeId to the tool node ID and mode to "appendChild" to place nodes inside the tool. Use mode "append" to place after a sibling node within the same branch.\n- update: Modify a node\'s config or label. Only provided config fields are changed — existing fields are preserved. For switch/lookup nodes, include a cases array in config to set case values on child case nodes.\n- delete: Remove a node from the flow.\n\nSUPPORTED NODE TYPES: say, question, ifThenElse, lookup, setSessionContext, code, goTo, sleep, httpRequest.\n\nIf a nodeType is not in the supported list, the tool will return an error with the list of supported types.\n\nFor AI Agent tool nodes (knowledge, send_email, mcp, http), use create_tool / update_tool instead — they handle the required parent-child node wiring automatically.',
675
+ annotations: {
676
+ title: "Manage Flow Nodes",
677
+ readOnlyHint: false,
678
+ destructiveHint: true,
679
+ idempotentHint: false,
680
+ openWorldHint: true,
681
+ },
682
+ inputSchema: {
683
+ type: "object",
684
+ properties: {
685
+ operation: {
686
+ type: "string",
687
+ enum: ["list", "create", "update", "delete"],
688
+ description: "Operation to perform",
689
+ },
690
+ flowId: {
691
+ type: "string",
692
+ description: "24-char hex flow ID (from create_ai_agent response or list_resources { resourceType: 'flow' })",
693
+ },
694
+ nodeId: {
695
+ type: "string",
696
+ description: "24-char hex node ID (required for update and delete)",
697
+ },
698
+ nodeType: {
699
+ type: "string",
700
+ description: "Node type key from the supported list: say, question, ifThenElse, lookup, setSessionContext, code, goTo, sleep, httpRequest. Required for create.",
701
+ },
702
+ label: {
703
+ type: "string",
704
+ description: "Display label for the node (required for create, optional for update)",
705
+ },
706
+ parentNodeId: {
707
+ type: "string",
708
+ description: "Target node ID. Set to the tool node ID (from create_tool) and use mode=appendChild to add nodes inside a tool branch. Use mode=append to place after a sibling node.",
709
+ },
710
+ mode: {
711
+ type: "string",
712
+ enum: ["append", "appendChild"],
713
+ description: "Placement mode: appendChild (inside target — use this to add nodes under a tool) or append (after target as a sibling). Default: append.",
714
+ },
715
+ config: {
716
+ type: "object",
717
+ description: "Node-type-specific configuration.",
718
+ },
719
+ },
720
+ required: ["operation", "flowId"],
721
+ },
722
+ },
723
+ // 13. manage_packages
724
+ {
725
+ name: "manage_packages",
726
+ description: 'Import and export Cognigy package `.zip` files through the same staged workflow used by the UI.\n\nDISCOVERY OPERATION:\n- list_exportable: list the project resources that can be packaged for export, including UI-parity export candidates such as flows, endpoints, knowledge stores, AI agents, and LLM models\n\nIMPORT OPERATIONS:\n- upload_and_inspect: upload a local package `.zip`, wait for extraction, then return the import preview\n- inspect: return the import preview for an already-uploaded packageId\n- import: merge selected package resources into the target project using UI-parity defaults\n\nEXPORT OPERATIONS:\n- export: create a package from project resources, optionally include dependencies, wait for packaging, and save the `.zip` locally\n- download: download an existing package `.zip` with MCP authentication and save it locally\n\nTASK OPERATION:\n- read_task: read task status and normalized progress for extraction, import, or export tasks\n\nUI PARITY DEFAULTS:\n- locales are excluded from the importable resource list and handled via localeMapping\n- knowledge stores default to strategy "replace" during import\n- all other import resources default to strategy "re-identify"\n- export includes detected dependencies by default unless dependencyResourceIds are provided\n- retired largeLanguageModel resources are disabled by default for import and skipped for export\n- exports append a timestamp suffix to the package name for UI parity\n- imports always use autoRename=true internally\n\nBEHAVIOR:\n- If import resources are omitted, the preview defaults are used.\n- If localeMapping is omitted, the preview default mapping is used.\n- If export dependencyResourceIds are omitted, all detected dependencies are included by default.\n- If outputPath is omitted for export or download, the package is saved to a local temp path because the raw download URL requires authentication.\n- Export and download responses include the absolute saved file path plus file:// URIs for both the archive and its containing directory.\n- When presenting saved locations to users, show local paths and file:// URIs verbatim; do not abbreviate them with ellipses.\n- By default, import and export wait for task completion (waitForCompletion: true).',
727
+ annotations: {
728
+ title: "Manage Packages",
729
+ readOnlyHint: false,
730
+ destructiveHint: true,
731
+ idempotentHint: false,
732
+ openWorldHint: true,
733
+ },
734
+ inputSchema: {
735
+ type: "object",
736
+ properties: {
737
+ operation: {
738
+ type: "string",
739
+ enum: [
740
+ "list_exportable",
741
+ "upload_and_inspect",
742
+ "inspect",
743
+ "import",
744
+ "export",
745
+ "download",
746
+ "read_task",
747
+ ],
748
+ description: "Package workflow operation to perform.",
749
+ },
750
+ projectId: {
751
+ type: "string",
752
+ description: "24-char hex project ID for the package import/export workflow.",
753
+ },
754
+ filePath: {
755
+ type: "string",
756
+ description: "Absolute path to a local package `.zip` file. Required for upload_and_inspect.",
757
+ },
758
+ packageId: {
759
+ type: "string",
760
+ description: "24-char hex package ID. Required for inspect, import, and download.",
761
+ },
762
+ taskId: {
763
+ type: "string",
764
+ description: "24-char hex task ID. Required for read_task.",
765
+ },
766
+ resourceIds: {
767
+ type: "array",
768
+ description: "Resource IDs to export into a package. Required for export.",
769
+ items: { type: "string" },
770
+ },
771
+ dependencyResourceIds: {
772
+ type: "array",
773
+ description: "Optional dependency resource IDs to include during export. If omitted, all detected dependencies are included by default.",
774
+ items: { type: "string" },
775
+ },
776
+ includeDependencies: {
777
+ type: "boolean",
778
+ description: "When true (default), export includes detected dependencies for the selected resources.",
779
+ },
780
+ name: {
781
+ type: "string",
782
+ description: "Base package name for export. A timestamp suffix is appended automatically for UI parity.",
783
+ },
784
+ description: {
785
+ type: "string",
786
+ description: "Optional package description for export.",
787
+ },
788
+ outputPath: {
789
+ type: "string",
790
+ description: "Absolute local file path or directory where the exported `.zip` should be saved. Used by export and download. If omitted, a temp path is created automatically.",
791
+ },
792
+ resources: {
793
+ type: "array",
794
+ description: "Optional resource selections for import. If omitted, preview defaults are used.",
795
+ items: {
796
+ type: "object",
797
+ properties: {
798
+ id: {
799
+ type: "string",
800
+ description: "24-char hex resource ID from the package preview.",
801
+ },
802
+ import: {
803
+ type: "boolean",
804
+ description: "Whether to import the resource. Default: true unless disabled in preview.",
805
+ },
806
+ strategy: {
807
+ type: "string",
808
+ enum: ["replace", "re-identify"],
809
+ description: 'Conflict strategy. UI-parity only: "replace" or "re-identify".',
810
+ },
811
+ },
812
+ required: ["id"],
813
+ },
814
+ },
815
+ localeMapping: {
816
+ type: "array",
817
+ description: "Optional locale mapping overrides for import.",
818
+ items: {
819
+ type: "object",
820
+ properties: {
821
+ packageLocaleId: { type: "string" },
822
+ agentLocaleId: { type: "string" },
823
+ },
824
+ required: ["packageLocaleId", "agentLocaleId"],
825
+ },
826
+ },
827
+ waitForCompletion: {
828
+ type: "boolean",
829
+ description: "When true (default), wait for import/export task completion.",
830
+ },
831
+ timeoutMs: {
832
+ type: "number",
833
+ description: "Polling/upload timeout in milliseconds. Default: 600000.",
834
+ },
835
+ },
836
+ required: ["operation", "projectId"],
837
+ },
838
+ },
839
+ // 11. manage_webchat
840
+ {
841
+ name: "manage_webchat",
842
+ description: "Create or configure a Webchat v3 Endpoint. This is the primary tool for deploying an AI Agent as an embeddable website chat widget.\n\nCREATE vs UPDATE:\n- To create: provide projectId + flowId (+ optional name). A new webchat3 endpoint is always created.\n- To update: provide endpointId. Settings are merged with existing configuration.\n- Without endpointId, the tool never modifies existing endpoints — it always creates a new one.\n\nTo update an existing webchat, you MUST provide the endpointId. Use list_resources { resourceType: 'endpoint', projectId } to find existing webchat endpoints first.\n\nSTYLE PRESETS: Use stylePreset ('classic', 'modern', 'slick') to apply a predefined look. You can override individual fields in the same call.\n\nSETTINGS are organized into semantic groups (layout, behavior, startBehavior, homeScreen, teaserMessage, chatOptions, privacyNotice, businessHours, unreadMessages, maintenance, watermark, persistentMenu, attachmentUpload, webchatIcon). Only include groups/fields you want to change — everything else is preserved.\n\nFor advanced customization not covered by the groups, use customJson (raw JSON string for Webchat Custom Settings).\n\nRESPONSE HANDLING — CRITICAL:\nThe response always contains demoWebchatUrl — a direct browser link to test the webchat. You MUST ALWAYS present this URL to the user as a clickable link after every successful create or update. Do NOT tell the user to go to the UI to find it. The _integration section contains configUrl and embeddingSnippet — only mention these if the user explicitly asks about embedding or deploying to their website.",
843
+ annotations: {
844
+ title: "Manage Webchat",
845
+ readOnlyHint: false,
846
+ destructiveHint: true,
847
+ idempotentHint: false,
848
+ openWorldHint: true,
849
+ },
850
+ inputSchema: {
851
+ type: "object",
852
+ properties: {
853
+ endpointId: {
854
+ type: "string",
855
+ description: "24-char hex endpoint ID. If provided, updates the existing endpoint. If omitted, creates a new endpoint.",
856
+ },
857
+ projectId: {
858
+ type: "string",
859
+ description: "24-char hex project ID. Required for create, optional for update.",
860
+ },
861
+ flowId: {
862
+ type: "string",
863
+ description: "Flow referenceId to connect the webchat endpoint to. Required for create.",
864
+ },
865
+ name: {
866
+ type: "string",
867
+ description: 'Endpoint display name (e.g. "Customer Support Webchat")',
868
+ },
869
+ stylePreset: {
870
+ type: "string",
871
+ enum: ["classic", "modern", "slick"],
872
+ description: "Apply a predefined style. classic: compact 460px. modern: wide 900px with streaming. slick: medium 600px with grey bubbles.",
873
+ },
874
+ layout: {
875
+ type: "object",
876
+ description: "Visual layout: title, logo, chat window size, bot output width, input behavior, HTML settings, agent avatars.",
877
+ properties: {
878
+ title: { type: "string", description: "Webchat title bar text" },
879
+ logoUrl: {
880
+ type: "string",
881
+ description: "Header logo URL (28x28px JPG/PNG/SVG/GIF)",
882
+ },
883
+ colors: {
884
+ type: "object",
885
+ description: "Color scheme",
886
+ properties: {
887
+ primaryColor: {
888
+ type: "string",
889
+ description: 'Primary color (hex, e.g. "#0052cc")',
890
+ },
891
+ secondaryColor: {
892
+ type: "string",
893
+ description: "Secondary color",
894
+ },
895
+ chatBackground: {
896
+ type: "string",
897
+ description: "Chat interface background",
898
+ },
899
+ agentMessageBg: {
900
+ type: "string",
901
+ description: 'Bot message background (default: "#ffffff")',
902
+ },
903
+ userMessageBg: {
904
+ type: "string",
905
+ description: "User message background",
906
+ },
907
+ textLink: { type: "string", description: "Text link color" },
908
+ },
909
+ },
910
+ chatWindowWidth: {
911
+ type: "number",
912
+ description: "Chat window width in px (default: 460)",
913
+ },
914
+ botOutputMaxWidth: {
915
+ type: "number",
916
+ description: "Bot output max-width percentage 1-100 (default: 73)",
917
+ },
918
+ disableBotOutputBorder: {
919
+ type: "boolean",
920
+ description: "Hide chat bubble border",
921
+ },
922
+ maxInputRows: {
923
+ type: "number",
924
+ description: "Max lines in reply field before scrollbar",
925
+ },
926
+ enableInputCollation: {
927
+ type: "boolean",
928
+ description: "Combine rapid inputs into one message",
929
+ },
930
+ inputCollationTimeout: {
931
+ type: "number",
932
+ description: "Input collation delay in ms (default: 1000)",
933
+ },
934
+ dynamicImageAspectRatio: {
935
+ type: "boolean",
936
+ description: "Maintain original image proportions",
937
+ },
938
+ disableInputAutocomplete: {
939
+ type: "boolean",
940
+ description: "Disable browser autocomplete",
941
+ },
942
+ enableGenericHtml: {
943
+ type: "boolean",
944
+ description: "Style HTML in text messages",
945
+ },
946
+ allowJsInHtml: {
947
+ type: "boolean",
948
+ description: "Allow JS in HTML messages (security risk)",
949
+ },
950
+ allowJsInUrls: {
951
+ type: "boolean",
952
+ description: "Allow javascript: URLs (security risk)",
953
+ },
954
+ useAgentAvatars: {
955
+ type: "boolean",
956
+ description: "Show separate avatar/name for bot vs human",
957
+ },
958
+ botAvatarName: {
959
+ type: "string",
960
+ description: "Name above bot messages",
961
+ },
962
+ botAvatarLogoUrl: {
963
+ type: "string",
964
+ description: "Logo above bot messages",
965
+ },
966
+ humanAvatarName: {
967
+ type: "string",
968
+ description: "Name above human agent messages",
969
+ },
970
+ humanAvatarLogoUrl: {
971
+ type: "string",
972
+ description: "Logo above human agent messages",
973
+ },
974
+ },
975
+ },
976
+ behavior: {
977
+ type: "object",
978
+ description: "Chat behavior: scrolling, streaming, markdown, typing indicators, STT/TTS, message delay.",
979
+ properties: {
980
+ scrollingBehavior: {
981
+ type: "string",
982
+ enum: ["alwaysScroll", "scrollToLastInput"],
983
+ description: "Scroll behavior on new messages",
984
+ },
985
+ collateStreamedOutputs: {
986
+ type: "boolean",
987
+ description: "Merge streamed text into one bubble",
988
+ },
989
+ progressiveMessageRendering: {
990
+ type: "boolean",
991
+ description: "Show text appearing progressively",
992
+ },
993
+ renderMarkdown: {
994
+ type: "boolean",
995
+ description: "Render markdown in bot outputs (default: true)",
996
+ },
997
+ enableTypingIndicator: {
998
+ type: "boolean",
999
+ description: "Show typing animation",
1000
+ },
1001
+ inputPlaceholder: {
1002
+ type: "string",
1003
+ description: 'Reply field placeholder (default: "Type something…")',
1004
+ },
1005
+ messageDelay: {
1006
+ type: "number",
1007
+ description: "Delay ms before bot response (default: 500)",
1008
+ },
1009
+ focusInputAfterPostback: {
1010
+ type: "boolean",
1011
+ description: "Focus input after button click",
1012
+ },
1013
+ enableConnectionStatusIndicator: {
1014
+ type: "boolean",
1015
+ description: "Show warning on lost connection",
1016
+ },
1017
+ enableStt: {
1018
+ type: "boolean",
1019
+ description: "Speech-to-text microphone button",
1020
+ },
1021
+ enableTts: {
1022
+ type: "boolean",
1023
+ description: "Text-to-speech for bot messages",
1024
+ },
1025
+ collectMetadata: {
1026
+ type: "boolean",
1027
+ description: "Collect browser metadata",
1028
+ },
1029
+ displayAIAgentNotice: {
1030
+ type: "boolean",
1031
+ description: "Show AI agent notice (default: true)",
1032
+ },
1033
+ aiAgentNoticeText: {
1034
+ type: "string",
1035
+ description: "AI agent notice text",
1036
+ },
1037
+ enableScrollButton: {
1038
+ type: "boolean",
1039
+ description: "Show scroll-to-bottom button (default: true)",
1040
+ },
1041
+ },
1042
+ },
1043
+ startBehavior: {
1044
+ type: "object",
1045
+ description: "How conversation starts: text field, button click, or auto-send.",
1046
+ properties: {
1047
+ mode: {
1048
+ type: "string",
1049
+ enum: ["textField", "button", "autoSend"],
1050
+ description: "Start mode",
1051
+ },
1052
+ textPayload: {
1053
+ type: "string",
1054
+ description: "First message to agent (button/autoSend)",
1055
+ },
1056
+ dataPayload: {
1057
+ type: "string",
1058
+ description: "Additional data to flow (button/autoSend)",
1059
+ },
1060
+ displayText: {
1061
+ type: "string",
1062
+ description: "Simulated user input bubble (button/autoSend)",
1063
+ },
1064
+ buttonTitle: {
1065
+ type: "string",
1066
+ description: "Start button label (button mode only)",
1067
+ },
1068
+ },
1069
+ },
1070
+ homeScreen: {
1071
+ type: "object",
1072
+ description: "Home screen with welcome message, background, conversation starters, and previous conversations.",
1073
+ properties: {
1074
+ enabled: {
1075
+ type: "boolean",
1076
+ description: "Show home screen on launch",
1077
+ },
1078
+ welcomeText: { type: "string", description: "Greeting message" },
1079
+ backgroundImage: {
1080
+ type: "string",
1081
+ description: "Background image URL (460x608px)",
1082
+ },
1083
+ backgroundColor: {
1084
+ type: "string",
1085
+ description: "CSS color/gradient for background",
1086
+ },
1087
+ startConversationButtonText: {
1088
+ type: "string",
1089
+ description: 'Button text (default: "Start conversation")',
1090
+ },
1091
+ conversationStarters: {
1092
+ type: "array",
1093
+ description: "Up to 5 starters",
1094
+ items: {
1095
+ type: "object",
1096
+ properties: {
1097
+ title: { type: "string" },
1098
+ type: { type: "string", enum: ["postback", "url"] },
1099
+ value: { type: "string" },
1100
+ },
1101
+ required: ["title", "type", "value"],
1102
+ },
1103
+ },
1104
+ previousConversations: {
1105
+ type: "object",
1106
+ properties: {
1107
+ enabled: { type: "boolean" },
1108
+ enableDeleteAll: { type: "boolean" },
1109
+ buttonText: { type: "string" },
1110
+ title: { type: "string" },
1111
+ startNewButtonText: { type: "string" },
1112
+ },
1113
+ },
1114
+ },
1115
+ },
1116
+ teaserMessage: {
1117
+ type: "object",
1118
+ description: "Teaser message beside webchat icon with optional conversation starters.",
1119
+ properties: {
1120
+ text: {
1121
+ type: "string",
1122
+ description: "Message beside webchat icon",
1123
+ },
1124
+ showInChat: {
1125
+ type: "boolean",
1126
+ description: "Also show teaser inside chat",
1127
+ },
1128
+ conversationStarters: {
1129
+ type: "array",
1130
+ description: "Up to 5 starters",
1131
+ items: {
1132
+ type: "object",
1133
+ properties: {
1134
+ title: { type: "string" },
1135
+ type: { type: "string", enum: ["postback", "url"] },
1136
+ value: { type: "string" },
1137
+ },
1138
+ required: ["title", "type", "value"],
1139
+ },
1140
+ },
1141
+ },
1142
+ },
1143
+ chatOptions: {
1144
+ type: "object",
1145
+ description: "Chat options menu: quick replies, TTS toggle, conversation rating, footer links.",
1146
+ properties: {
1147
+ enabled: {
1148
+ type: "boolean",
1149
+ description: "Enable chat options menu",
1150
+ },
1151
+ title: { type: "string", description: "Options screen title" },
1152
+ enableDeleteConversation: {
1153
+ type: "boolean",
1154
+ description: "Let users delete current conversation",
1155
+ },
1156
+ quickReplies: {
1157
+ type: "object",
1158
+ properties: {
1159
+ enabled: { type: "boolean" },
1160
+ sectionTitle: { type: "string" },
1161
+ items: {
1162
+ type: "array",
1163
+ items: {
1164
+ type: "object",
1165
+ properties: {
1166
+ title: { type: "string" },
1167
+ type: { type: "string", enum: ["postback", "url"] },
1168
+ value: { type: "string" },
1169
+ },
1170
+ required: ["title", "type", "value"],
1171
+ },
1172
+ },
1173
+ },
1174
+ },
1175
+ textToSpeech: {
1176
+ type: "object",
1177
+ properties: {
1178
+ showToggle: { type: "boolean" },
1179
+ toggleLabel: { type: "string" },
1180
+ activateByDefault: { type: "boolean" },
1181
+ },
1182
+ },
1183
+ rating: {
1184
+ type: "object",
1185
+ properties: {
1186
+ enabled: { type: "boolean" },
1187
+ titleText: { type: "string" },
1188
+ commentPlaceholder: { type: "string" },
1189
+ submitButtonText: { type: "string" },
1190
+ submittedBannerText: { type: "string" },
1191
+ },
1192
+ },
1193
+ footer: {
1194
+ type: "object",
1195
+ properties: {
1196
+ enabled: { type: "boolean" },
1197
+ items: {
1198
+ type: "array",
1199
+ items: {
1200
+ type: "object",
1201
+ properties: {
1202
+ title: { type: "string" },
1203
+ url: { type: "string" },
1204
+ },
1205
+ required: ["title", "url"],
1206
+ },
1207
+ },
1208
+ },
1209
+ },
1210
+ },
1211
+ },
1212
+ privacyNotice: {
1213
+ type: "object",
1214
+ description: "Privacy notice shown before chat begins.",
1215
+ properties: {
1216
+ enabled: { type: "boolean" },
1217
+ title: { type: "string" },
1218
+ text: { type: "string", description: "Supports Markdown" },
1219
+ submitButton: { type: "string" },
1220
+ policyLinkTitle: { type: "string" },
1221
+ policyLinkUrl: { type: "string" },
1222
+ },
1223
+ },
1224
+ businessHours: {
1225
+ type: "object",
1226
+ description: "Restrict webchat availability to business hours.",
1227
+ properties: {
1228
+ enabled: { type: "boolean" },
1229
+ mode: { type: "string", enum: ["inform", "disable", "hide"] },
1230
+ informationText: { type: "string" },
1231
+ informationTitle: { type: "string" },
1232
+ timezone: {
1233
+ type: "string",
1234
+ description: 'IANA timezone (e.g. "Europe/Berlin")',
1235
+ },
1236
+ schedule: {
1237
+ type: "array",
1238
+ items: {
1239
+ type: "object",
1240
+ properties: {
1241
+ dayOfWeek: { type: "string" },
1242
+ startTime: { type: "string" },
1243
+ endTime: { type: "string" },
1244
+ },
1245
+ required: ["dayOfWeek", "startTime", "endTime"],
1246
+ },
1247
+ },
1248
+ },
1249
+ },
1250
+ unreadMessages: {
1251
+ type: "object",
1252
+ description: "Unread message notifications.",
1253
+ properties: {
1254
+ enableTitleIndicator: { type: "boolean" },
1255
+ enableBadge: { type: "boolean" },
1256
+ enablePreview: { type: "boolean" },
1257
+ enableSound: { type: "boolean" },
1258
+ },
1259
+ },
1260
+ maintenance: {
1261
+ type: "object",
1262
+ description: "Maintenance mode settings.",
1263
+ properties: {
1264
+ enabled: { type: "boolean" },
1265
+ mode: { type: "string", enum: ["inform", "disable", "hide"] },
1266
+ informationText: { type: "string" },
1267
+ informationTitle: { type: "string" },
1268
+ },
1269
+ },
1270
+ watermark: {
1271
+ type: "object",
1272
+ description: "Bottom watermark branding.",
1273
+ properties: {
1274
+ type: { type: "string", enum: ["default", "custom", "none"] },
1275
+ text: { type: "string" },
1276
+ url: { type: "string" },
1277
+ },
1278
+ },
1279
+ persistentMenu: {
1280
+ type: "object",
1281
+ description: "Persistent menu with quick-access items.",
1282
+ properties: {
1283
+ enabled: { type: "boolean" },
1284
+ title: { type: "string" },
1285
+ items: {
1286
+ type: "array",
1287
+ items: {
1288
+ type: "object",
1289
+ properties: {
1290
+ title: { type: "string" },
1291
+ payload: { type: "string" },
1292
+ },
1293
+ required: ["title", "payload"],
1294
+ },
1295
+ },
1296
+ },
1297
+ },
1298
+ attachmentUpload: {
1299
+ type: "object",
1300
+ description: "File upload settings.",
1301
+ properties: {
1302
+ enabled: { type: "boolean" },
1303
+ dropzoneText: { type: "string" },
1304
+ },
1305
+ },
1306
+ webchatIcon: {
1307
+ type: "object",
1308
+ description: "Webchat icon animation settings.",
1309
+ properties: {
1310
+ animation: {
1311
+ type: "string",
1312
+ enum: ["none", "bounce", "swing", "pulse"],
1313
+ },
1314
+ animationInterval: {
1315
+ type: "number",
1316
+ description: "Seconds between animations (default: 5)",
1317
+ },
1318
+ animationSpeed: {
1319
+ type: "string",
1320
+ enum: ["slow", "normal", "fast", "superfast"],
1321
+ },
1322
+ },
1323
+ },
1324
+ customJson: {
1325
+ type: "string",
1326
+ description: "Raw JSON string for advanced Webchat Custom Settings not covered by other fields.",
1327
+ },
1328
+ },
1329
+ },
1330
+ },
1331
+ // 14. manage_voice_gateway
1332
+ {
1333
+ name: "manage_voice_gateway",
1334
+ description: "Create or configure a Voice Gateway endpoint with WebRTC support. This deploys an AI Agent as a voice-enabled endpoint that users can talk to via their browser.\n\nCREATE vs UPDATE:\n- To create: provide projectId + flowId (+ optional name). A new voiceGateway2 endpoint is created with a WebRTC client.\n- To update: provide endpointId. Settings are merged with existing configuration.\n\nThe tool automatically provisions a WebRTC client on the endpoint. After creation, the response includes a webrtcDemoUrl that the user can open in a browser to talk to the agent via voice.\n\nWebRTC widget can be customized with theme (CLEAN_WHITE, DARK_MODE, AI_PURPLE), transcription settings, avatar, and tagline.\n\nRESPONSE HANDLING — CRITICAL:\nThe response always contains webrtcDemoUrl — a direct browser link to talk to the agent via voice. You MUST ALWAYS present this URL to the user as a clickable link. The _integration section contains the WebSocket endpoint URL and an HTML embedding snippet — only mention these if the user asks about embedding.",
1335
+ annotations: {
1336
+ title: "Manage Voice Gateway",
1337
+ readOnlyHint: false,
1338
+ destructiveHint: false,
1339
+ idempotentHint: false,
1340
+ openWorldHint: true,
1341
+ },
1342
+ inputSchema: {
1343
+ type: "object",
1344
+ properties: {
1345
+ endpointId: {
1346
+ type: "string",
1347
+ description: "24-char hex endpoint ID. If provided, updates the existing endpoint. If omitted, creates a new endpoint.",
1348
+ },
1349
+ projectId: {
1350
+ type: "string",
1351
+ description: "24-char hex project ID. Required for create, optional for update.",
1352
+ },
1353
+ flowId: {
1354
+ type: "string",
1355
+ description: "Flow referenceId to connect the voice gateway endpoint to. Required for create.",
1356
+ },
1357
+ name: {
1358
+ type: "string",
1359
+ description: 'Endpoint display name (e.g. "Customer Support Voice Agent")',
1360
+ },
1361
+ webrtcWidgetConfig: {
1362
+ type: "object",
1363
+ description: "WebRTC widget appearance and behavior. Defaults are applied if omitted.",
1364
+ properties: {
1365
+ label: {
1366
+ type: "string",
1367
+ description: "AI Agent name displayed in the widget",
1368
+ },
1369
+ theme: {
1370
+ type: "string",
1371
+ enum: ["CLEAN_WHITE", "DARK_MODE", "AI_PURPLE"],
1372
+ description: "Widget color theme (default: DARK_MODE)",
1373
+ },
1374
+ transcription: {
1375
+ type: "object",
1376
+ description: "Transcription display settings",
1377
+ properties: {
1378
+ enabled: {
1379
+ type: "boolean",
1380
+ description: "Show live transcription (default: true)",
1381
+ },
1382
+ backgroundMode: {
1383
+ type: "string",
1384
+ enum: ["transparent", "custom"],
1385
+ description: "Transcription background style (default: transparent)",
1386
+ },
1387
+ },
1388
+ },
1389
+ demoPage: {
1390
+ type: "object",
1391
+ description: "Demo page layout settings",
1392
+ properties: {
1393
+ background: {
1394
+ type: "object",
1395
+ properties: {
1396
+ mode: {
1397
+ type: "string",
1398
+ enum: ["color", "image"],
1399
+ },
1400
+ color: {
1401
+ type: "string",
1402
+ description: 'Background color (default: "#FFFFFF")',
1403
+ },
1404
+ },
1405
+ },
1406
+ position: {
1407
+ type: "string",
1408
+ enum: ["centered", "bottom-right"],
1409
+ description: "Widget position on demo page (default: centered)",
1410
+ },
1411
+ },
1412
+ },
1413
+ avatarLogoUrl: {
1414
+ type: "string",
1415
+ description: "URL for the agent avatar image",
1416
+ },
1417
+ tagline: {
1418
+ type: "string",
1419
+ description: "Short tagline displayed under the agent name",
1420
+ },
1421
+ },
1422
+ },
1423
+ },
1424
+ },
1425
+ },
1426
+ // 15. manage_settings
1427
+ {
1428
+ name: "manage_settings",
1429
+ description: 'Manage project-level settings in Cognigy, including Voice Preview Settings and Knowledge AI Settings.\n\nOperations:\n- set_voice_preview: Configure the speech provider for voice preview. Requires projectId and provider. If connectionId is omitted, the tool auto-detects an existing speech connection for the chosen provider. If no connection is found, it returns instructions to upload a package containing one via manage_packages.\n- set_knowledge_ai: Configure Knowledge AI Settings for the project. For normal AI-agent knowledge-store setups, use this before creating the knowledge store. Model IDs must be llm_model referenceIds from the SAME project. These are separate from the embedding-model settings used by manage_knowledge for knowledge-store indexing. The accepted model type for knowledgeSearchModelId can vary by Cognigy instance. Use list_resources { resourceType: "llm_model", projectId, useCase: "knowledgeSearch" } to match the Cognigy Settings UI dropdown when choosing candidates. If you are reusing another project\'s knowledge workflow, import the exact source-project Knowledge Search model into the target project before the first set_knowledge_ai attempt.\n\nSupported speech providers: microsoft, google, aws, deepgram, elevenlabs.',
1430
+ annotations: {
1431
+ title: "Manage Settings",
1432
+ readOnlyHint: false,
1433
+ destructiveHint: false,
1434
+ idempotentHint: true,
1435
+ openWorldHint: false,
1436
+ },
1437
+ inputSchema: {
1438
+ type: "object",
1439
+ properties: {
1440
+ operation: {
1441
+ type: "string",
1442
+ enum: ["set_voice_preview", "set_knowledge_ai"],
1443
+ description: "Which operation to perform",
1444
+ },
1445
+ projectId: {
1446
+ type: "string",
1447
+ description: "24-char hex project ID",
1448
+ },
1449
+ provider: {
1450
+ type: "string",
1451
+ enum: ["microsoft", "google", "aws", "deepgram", "elevenlabs"],
1452
+ description: "Speech provider to configure for voice preview",
1453
+ },
1454
+ connectionId: {
1455
+ type: "string",
1456
+ description: "Connection referenceId to use. If omitted, auto-detects an existing speech connection for the provider.",
1457
+ },
1458
+ knowledgeSearchModelId: {
1459
+ type: "string",
1460
+ description: "llm_model referenceId from the SAME project to use for Knowledge Search.",
1461
+ },
1462
+ answerExtractionModelId: {
1463
+ type: "string",
1464
+ description: "Optional llm_model referenceId from the SAME project to use for Answer Extraction.",
1465
+ },
1466
+ contentParser: {
1467
+ type: "string",
1468
+ enum: ["default", "legacy", "azure"],
1469
+ description: "Content Parser to use for Knowledge AI document processing.",
1470
+ },
1471
+ azureDIConnectionId: {
1472
+ type: "string",
1473
+ description: "Azure AI Document Intelligence connection referenceId. Required when contentParser is azure.",
1474
+ },
1475
+ },
1476
+ required: ["operation", "projectId"],
1477
+ },
1478
+ },
1479
+ // 16. audit_voice_agent
1480
+ {
1481
+ name: "audit_voice_agent",
1482
+ description: 'Audit a voice AI agent against the deterministic subset of the Voice AI Go-Live Checklist and optionally apply safe fixes.\n\nWHAT IT CHECKS (read from the flow chart, and optionally the endpoint/LLM):\n- 3.1 Flow Configuration: first node is a Set Session Config node; barge-in off; continuous ASR off; user input timeout (5–7 s, ≥5 retries); flow input timeout (~1500 ms) with filler; flow timeout does not fail on error; AI Agent "Stream to Output" on; AI Agent does not stop the flow on error.\n- 3.2 LLM: AI Agent error message configured; Log LLM Latency on; fallback LLM configured (advisory).\n- 3.3 Speech Services: STT hints present (advisory).\n- 3.6 Audio Experience: silence overlay delay 0 (when configured).\n- 3.7 Deployment: Output Transformer enabled (advisory).\n\nProvide aiAgentId (the flow is resolved automatically) or flowId directly. Pass endpointId to also audit the Output Transformer, and projectId to resolve the LLM for the fallback check.\n\nDRY-RUN BY DEFAULT: With apply omitted/false the tool only reports — each fixable failing check includes a proposedFix and nothing is changed. Set apply: true to apply the safe fixes (PATCH node config; prepend a Set Session Config node before the AI Agent node so it runs first). Use only: ["check.id", ...] to apply a subset.\n\nManual / out-of-scope items (most of 3.3 speech provider status, all of 3.8 release readiness) live in the external Voice Gateway app or are runtime/operational and are NOT covered.',
1483
+ annotations: {
1484
+ title: "Audit Voice Agent",
1485
+ readOnlyHint: false,
1486
+ destructiveHint: false,
1487
+ idempotentHint: true,
1488
+ openWorldHint: true,
1489
+ },
1490
+ inputSchema: {
1491
+ type: "object",
1492
+ properties: {
1493
+ aiAgentId: {
1494
+ type: "string",
1495
+ description: "24-char hex AI Agent ID. The flow is resolved automatically. Provide this or flowId.",
1496
+ },
1497
+ flowId: {
1498
+ type: "string",
1499
+ description: "24-char hex flow ID. Use instead of aiAgentId when the flow is known directly.",
1500
+ },
1501
+ endpointId: {
1502
+ type: "string",
1503
+ description: "24-char hex endpoint ID (optional). When provided, the Output Transformer check is evaluated.",
1504
+ },
1505
+ projectId: {
1506
+ type: "string",
1507
+ description: "24-char hex project ID (optional). When provided, the agent's LLM is resolved for the fallback check.",
1508
+ },
1509
+ apply: {
1510
+ type: "boolean",
1511
+ description: "If true, apply the safe auto-fixes for failing checks. Default false (dry-run report only).",
1512
+ },
1513
+ only: {
1514
+ type: "array",
1515
+ items: { type: "string" },
1516
+ description: 'Optional list of check IDs to apply when apply is true (e.g. ["vg.barge-in-off", "agent.stream-output"]). If omitted, all auto-fixable failing checks are applied.',
1517
+ },
1518
+ },
1519
+ },
1520
+ },
1521
+ ];
1522
+ //# sourceMappingURL=definitions.js.map