elevenlabs-voice-agent-mcp 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 (91) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +533 -0
  3. package/dist/constants.d.ts +25 -0
  4. package/dist/constants.d.ts.map +1 -0
  5. package/dist/constants.js +51 -0
  6. package/dist/constants.js.map +1 -0
  7. package/dist/index.d.ts +8 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +93 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/schemas/agent-schemas.d.ts +147 -0
  12. package/dist/schemas/agent-schemas.d.ts.map +1 -0
  13. package/dist/schemas/agent-schemas.js +145 -0
  14. package/dist/schemas/agent-schemas.js.map +1 -0
  15. package/dist/schemas/batch-calling-schemas.d.ts +170 -0
  16. package/dist/schemas/batch-calling-schemas.d.ts.map +1 -0
  17. package/dist/schemas/batch-calling-schemas.js +77 -0
  18. package/dist/schemas/batch-calling-schemas.js.map +1 -0
  19. package/dist/schemas/common-schemas.d.ts +54 -0
  20. package/dist/schemas/common-schemas.d.ts.map +1 -0
  21. package/dist/schemas/common-schemas.js +72 -0
  22. package/dist/schemas/common-schemas.js.map +1 -0
  23. package/dist/schemas/conversation-schemas.d.ts +72 -0
  24. package/dist/schemas/conversation-schemas.d.ts.map +1 -0
  25. package/dist/schemas/conversation-schemas.js +30 -0
  26. package/dist/schemas/conversation-schemas.js.map +1 -0
  27. package/dist/schemas/outbound-schemas.d.ts +115 -0
  28. package/dist/schemas/outbound-schemas.d.ts.map +1 -0
  29. package/dist/schemas/outbound-schemas.js +61 -0
  30. package/dist/schemas/outbound-schemas.js.map +1 -0
  31. package/dist/schemas/phone-number-schemas.d.ts +168 -0
  32. package/dist/schemas/phone-number-schemas.d.ts.map +1 -0
  33. package/dist/schemas/phone-number-schemas.js +116 -0
  34. package/dist/schemas/phone-number-schemas.js.map +1 -0
  35. package/dist/schemas/tool-schemas.d.ts +208 -0
  36. package/dist/schemas/tool-schemas.d.ts.map +1 -0
  37. package/dist/schemas/tool-schemas.js +131 -0
  38. package/dist/schemas/tool-schemas.js.map +1 -0
  39. package/dist/services/elevenlabs-api.d.ts +37 -0
  40. package/dist/services/elevenlabs-api.d.ts.map +1 -0
  41. package/dist/services/elevenlabs-api.js +78 -0
  42. package/dist/services/elevenlabs-api.js.map +1 -0
  43. package/dist/services/formatters.d.ts +76 -0
  44. package/dist/services/formatters.d.ts.map +1 -0
  45. package/dist/services/formatters.js +475 -0
  46. package/dist/services/formatters.js.map +1 -0
  47. package/dist/tools/agent-tools.d.ts +228 -0
  48. package/dist/tools/agent-tools.d.ts.map +1 -0
  49. package/dist/tools/agent-tools.js +369 -0
  50. package/dist/tools/agent-tools.js.map +1 -0
  51. package/dist/tools/batch-calling-tools.d.ts +183 -0
  52. package/dist/tools/batch-calling-tools.d.ts.map +1 -0
  53. package/dist/tools/batch-calling-tools.js +203 -0
  54. package/dist/tools/batch-calling-tools.js.map +1 -0
  55. package/dist/tools/conversation-tools.d.ts +103 -0
  56. package/dist/tools/conversation-tools.d.ts.map +1 -0
  57. package/dist/tools/conversation-tools.js +140 -0
  58. package/dist/tools/conversation-tools.js.map +1 -0
  59. package/dist/tools/knowledge-tools.d.ts +75 -0
  60. package/dist/tools/knowledge-tools.d.ts.map +1 -0
  61. package/dist/tools/knowledge-tools.js +63 -0
  62. package/dist/tools/knowledge-tools.js.map +1 -0
  63. package/dist/tools/outbound-tools.d.ts +44 -0
  64. package/dist/tools/outbound-tools.d.ts.map +1 -0
  65. package/dist/tools/outbound-tools.js +84 -0
  66. package/dist/tools/outbound-tools.js.map +1 -0
  67. package/dist/tools/phone-number-tools.d.ts +215 -0
  68. package/dist/tools/phone-number-tools.d.ts.map +1 -0
  69. package/dist/tools/phone-number-tools.js +295 -0
  70. package/dist/tools/phone-number-tools.js.map +1 -0
  71. package/dist/tools/tool-tools.d.ts +165 -0
  72. package/dist/tools/tool-tools.d.ts.map +1 -0
  73. package/dist/tools/tool-tools.js +166 -0
  74. package/dist/tools/tool-tools.js.map +1 -0
  75. package/dist/tools/utility-tools.d.ts +76 -0
  76. package/dist/tools/utility-tools.d.ts.map +1 -0
  77. package/dist/tools/utility-tools.js +121 -0
  78. package/dist/tools/utility-tools.js.map +1 -0
  79. package/dist/types.d.ts +282 -0
  80. package/dist/types.d.ts.map +1 -0
  81. package/dist/types.js +12 -0
  82. package/dist/types.js.map +1 -0
  83. package/dist/utils/error-handlers.d.ts +29 -0
  84. package/dist/utils/error-handlers.d.ts.map +1 -0
  85. package/dist/utils/error-handlers.js +90 -0
  86. package/dist/utils/error-handlers.js.map +1 -0
  87. package/dist/utils/truncation.d.ts +41 -0
  88. package/dist/utils/truncation.d.ts.map +1 -0
  89. package/dist/utils/truncation.js +78 -0
  90. package/dist/utils/truncation.js.map +1 -0
  91. package/package.json +61 -0
@@ -0,0 +1,228 @@
1
+ /**
2
+ * Agent management tools
3
+ *
4
+ * MCP tools for creating, retrieving, updating, deleting, and listing voice agents.
5
+ */
6
+ import { z } from "zod";
7
+ import { ResponseFormat } from "../types.js";
8
+ /**
9
+ * Creates a new ElevenLabs Voice Agent
10
+ */
11
+ export declare const elevenlabs_create_agent: {
12
+ name: string;
13
+ description: string;
14
+ zodSchema: z.ZodObject<{
15
+ name: z.ZodString;
16
+ prompt: z.ZodString;
17
+ llm: z.ZodDefault<z.ZodEnum<["gpt-4o", "gpt-4o-mini", "claude-3-5-sonnet-20241022", "claude-3-5-haiku-20241022", "gemini-2.0-flash-exp"]>>;
18
+ voice_id: z.ZodDefault<z.ZodString>;
19
+ voice_model: z.ZodDefault<z.ZodEnum<["eleven_turbo_v2_5", "eleven_flash_v2_5", "eleven_multilingual_v2"]>>;
20
+ first_message: z.ZodOptional<z.ZodString>;
21
+ language: z.ZodDefault<z.ZodEnum<["en", "es", "fr", "de", "it", "pt", "pl", "nl", "ja", "zh", "ko", "ar", "hi"]>>;
22
+ temperature: z.ZodOptional<z.ZodNumber>;
23
+ max_tokens: z.ZodOptional<z.ZodNumber>;
24
+ stability: z.ZodOptional<z.ZodNumber>;
25
+ similarity_boost: z.ZodOptional<z.ZodNumber>;
26
+ widget_color: z.ZodOptional<z.ZodString>;
27
+ widget_avatar_url: z.ZodOptional<z.ZodString>;
28
+ response_format: z.ZodDefault<z.ZodNativeEnum<typeof ResponseFormat>>;
29
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
30
+ name: z.ZodString;
31
+ prompt: z.ZodString;
32
+ llm: z.ZodDefault<z.ZodEnum<["gpt-4o", "gpt-4o-mini", "claude-3-5-sonnet-20241022", "claude-3-5-haiku-20241022", "gemini-2.0-flash-exp"]>>;
33
+ voice_id: z.ZodDefault<z.ZodString>;
34
+ voice_model: z.ZodDefault<z.ZodEnum<["eleven_turbo_v2_5", "eleven_flash_v2_5", "eleven_multilingual_v2"]>>;
35
+ first_message: z.ZodOptional<z.ZodString>;
36
+ language: z.ZodDefault<z.ZodEnum<["en", "es", "fr", "de", "it", "pt", "pl", "nl", "ja", "zh", "ko", "ar", "hi"]>>;
37
+ temperature: z.ZodOptional<z.ZodNumber>;
38
+ max_tokens: z.ZodOptional<z.ZodNumber>;
39
+ stability: z.ZodOptional<z.ZodNumber>;
40
+ similarity_boost: z.ZodOptional<z.ZodNumber>;
41
+ widget_color: z.ZodOptional<z.ZodString>;
42
+ widget_avatar_url: z.ZodOptional<z.ZodString>;
43
+ response_format: z.ZodDefault<z.ZodNativeEnum<typeof ResponseFormat>>;
44
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
45
+ name: z.ZodString;
46
+ prompt: z.ZodString;
47
+ llm: z.ZodDefault<z.ZodEnum<["gpt-4o", "gpt-4o-mini", "claude-3-5-sonnet-20241022", "claude-3-5-haiku-20241022", "gemini-2.0-flash-exp"]>>;
48
+ voice_id: z.ZodDefault<z.ZodString>;
49
+ voice_model: z.ZodDefault<z.ZodEnum<["eleven_turbo_v2_5", "eleven_flash_v2_5", "eleven_multilingual_v2"]>>;
50
+ first_message: z.ZodOptional<z.ZodString>;
51
+ language: z.ZodDefault<z.ZodEnum<["en", "es", "fr", "de", "it", "pt", "pl", "nl", "ja", "zh", "ko", "ar", "hi"]>>;
52
+ temperature: z.ZodOptional<z.ZodNumber>;
53
+ max_tokens: z.ZodOptional<z.ZodNumber>;
54
+ stability: z.ZodOptional<z.ZodNumber>;
55
+ similarity_boost: z.ZodOptional<z.ZodNumber>;
56
+ widget_color: z.ZodOptional<z.ZodString>;
57
+ widget_avatar_url: z.ZodOptional<z.ZodString>;
58
+ response_format: z.ZodDefault<z.ZodNativeEnum<typeof ResponseFormat>>;
59
+ }, z.ZodTypeAny, "passthrough">>;
60
+ annotations: {
61
+ readOnlyHint: boolean;
62
+ destructiveHint: boolean;
63
+ idempotentHint: boolean;
64
+ openWorldHint: boolean;
65
+ };
66
+ handler: (args: unknown) => Promise<{
67
+ content: {
68
+ type: string;
69
+ text: string;
70
+ }[];
71
+ }>;
72
+ };
73
+ /**
74
+ * Retrieves an agent by ID
75
+ */
76
+ export declare const elevenlabs_get_agent: {
77
+ name: string;
78
+ description: string;
79
+ zodSchema: z.ZodObject<{
80
+ agent_id: z.ZodString;
81
+ response_format: z.ZodDefault<z.ZodNativeEnum<typeof ResponseFormat>>;
82
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
83
+ agent_id: z.ZodString;
84
+ response_format: z.ZodDefault<z.ZodNativeEnum<typeof ResponseFormat>>;
85
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
86
+ agent_id: z.ZodString;
87
+ response_format: z.ZodDefault<z.ZodNativeEnum<typeof ResponseFormat>>;
88
+ }, z.ZodTypeAny, "passthrough">>;
89
+ annotations: {
90
+ readOnlyHint: boolean;
91
+ destructiveHint: boolean;
92
+ idempotentHint: boolean;
93
+ openWorldHint: boolean;
94
+ };
95
+ handler: (args: unknown) => Promise<{
96
+ content: {
97
+ type: string;
98
+ text: string;
99
+ }[];
100
+ }>;
101
+ };
102
+ /**
103
+ * Updates an existing agent
104
+ */
105
+ export declare const elevenlabs_update_agent: {
106
+ name: string;
107
+ description: string;
108
+ zodSchema: z.ZodObject<{
109
+ agent_id: z.ZodString;
110
+ name: z.ZodOptional<z.ZodString>;
111
+ prompt: z.ZodOptional<z.ZodString>;
112
+ llm: z.ZodOptional<z.ZodEnum<["gpt-4o", "gpt-4o-mini", "claude-3-5-sonnet-20241022", "claude-3-5-haiku-20241022", "gemini-2.0-flash-exp"]>>;
113
+ voice_id: z.ZodOptional<z.ZodString>;
114
+ voice_model: z.ZodOptional<z.ZodEnum<["eleven_turbo_v2_5", "eleven_flash_v2_5", "eleven_multilingual_v2"]>>;
115
+ first_message: z.ZodOptional<z.ZodString>;
116
+ language: z.ZodOptional<z.ZodEnum<["en", "es", "fr", "de", "it", "pt", "pl", "nl", "ja", "zh", "ko", "ar", "hi"]>>;
117
+ temperature: z.ZodOptional<z.ZodNumber>;
118
+ max_tokens: z.ZodOptional<z.ZodNumber>;
119
+ stability: z.ZodOptional<z.ZodNumber>;
120
+ similarity_boost: z.ZodOptional<z.ZodNumber>;
121
+ widget_color: z.ZodOptional<z.ZodString>;
122
+ widget_avatar_url: z.ZodOptional<z.ZodString>;
123
+ response_format: z.ZodDefault<z.ZodNativeEnum<typeof ResponseFormat>>;
124
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
125
+ agent_id: z.ZodString;
126
+ name: z.ZodOptional<z.ZodString>;
127
+ prompt: z.ZodOptional<z.ZodString>;
128
+ llm: z.ZodOptional<z.ZodEnum<["gpt-4o", "gpt-4o-mini", "claude-3-5-sonnet-20241022", "claude-3-5-haiku-20241022", "gemini-2.0-flash-exp"]>>;
129
+ voice_id: z.ZodOptional<z.ZodString>;
130
+ voice_model: z.ZodOptional<z.ZodEnum<["eleven_turbo_v2_5", "eleven_flash_v2_5", "eleven_multilingual_v2"]>>;
131
+ first_message: z.ZodOptional<z.ZodString>;
132
+ language: z.ZodOptional<z.ZodEnum<["en", "es", "fr", "de", "it", "pt", "pl", "nl", "ja", "zh", "ko", "ar", "hi"]>>;
133
+ temperature: z.ZodOptional<z.ZodNumber>;
134
+ max_tokens: z.ZodOptional<z.ZodNumber>;
135
+ stability: z.ZodOptional<z.ZodNumber>;
136
+ similarity_boost: z.ZodOptional<z.ZodNumber>;
137
+ widget_color: z.ZodOptional<z.ZodString>;
138
+ widget_avatar_url: z.ZodOptional<z.ZodString>;
139
+ response_format: z.ZodDefault<z.ZodNativeEnum<typeof ResponseFormat>>;
140
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
141
+ agent_id: z.ZodString;
142
+ name: z.ZodOptional<z.ZodString>;
143
+ prompt: z.ZodOptional<z.ZodString>;
144
+ llm: z.ZodOptional<z.ZodEnum<["gpt-4o", "gpt-4o-mini", "claude-3-5-sonnet-20241022", "claude-3-5-haiku-20241022", "gemini-2.0-flash-exp"]>>;
145
+ voice_id: z.ZodOptional<z.ZodString>;
146
+ voice_model: z.ZodOptional<z.ZodEnum<["eleven_turbo_v2_5", "eleven_flash_v2_5", "eleven_multilingual_v2"]>>;
147
+ first_message: z.ZodOptional<z.ZodString>;
148
+ language: z.ZodOptional<z.ZodEnum<["en", "es", "fr", "de", "it", "pt", "pl", "nl", "ja", "zh", "ko", "ar", "hi"]>>;
149
+ temperature: z.ZodOptional<z.ZodNumber>;
150
+ max_tokens: z.ZodOptional<z.ZodNumber>;
151
+ stability: z.ZodOptional<z.ZodNumber>;
152
+ similarity_boost: z.ZodOptional<z.ZodNumber>;
153
+ widget_color: z.ZodOptional<z.ZodString>;
154
+ widget_avatar_url: z.ZodOptional<z.ZodString>;
155
+ response_format: z.ZodDefault<z.ZodNativeEnum<typeof ResponseFormat>>;
156
+ }, z.ZodTypeAny, "passthrough">>;
157
+ annotations: {
158
+ readOnlyHint: boolean;
159
+ destructiveHint: boolean;
160
+ idempotentHint: boolean;
161
+ openWorldHint: boolean;
162
+ };
163
+ handler: (args: unknown) => Promise<{
164
+ content: {
165
+ type: string;
166
+ text: string;
167
+ }[];
168
+ }>;
169
+ };
170
+ /**
171
+ * Deletes an agent
172
+ */
173
+ export declare const elevenlabs_delete_agent: {
174
+ name: string;
175
+ description: string;
176
+ zodSchema: z.ZodObject<{
177
+ agent_id: z.ZodString;
178
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
179
+ agent_id: z.ZodString;
180
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
181
+ agent_id: z.ZodString;
182
+ }, z.ZodTypeAny, "passthrough">>;
183
+ annotations: {
184
+ readOnlyHint: boolean;
185
+ destructiveHint: boolean;
186
+ idempotentHint: boolean;
187
+ openWorldHint: boolean;
188
+ };
189
+ handler: (args: unknown) => Promise<{
190
+ content: {
191
+ type: string;
192
+ text: string;
193
+ }[];
194
+ }>;
195
+ };
196
+ /**
197
+ * Lists all agents with pagination
198
+ */
199
+ export declare const elevenlabs_list_agents: {
200
+ name: string;
201
+ description: string;
202
+ zodSchema: z.ZodObject<{
203
+ limit: z.ZodDefault<z.ZodNumber>;
204
+ offset: z.ZodDefault<z.ZodNumber>;
205
+ response_format: z.ZodDefault<z.ZodNativeEnum<typeof ResponseFormat>>;
206
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
207
+ limit: z.ZodDefault<z.ZodNumber>;
208
+ offset: z.ZodDefault<z.ZodNumber>;
209
+ response_format: z.ZodDefault<z.ZodNativeEnum<typeof ResponseFormat>>;
210
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
211
+ limit: z.ZodDefault<z.ZodNumber>;
212
+ offset: z.ZodDefault<z.ZodNumber>;
213
+ response_format: z.ZodDefault<z.ZodNativeEnum<typeof ResponseFormat>>;
214
+ }, z.ZodTypeAny, "passthrough">>;
215
+ annotations: {
216
+ readOnlyHint: boolean;
217
+ destructiveHint: boolean;
218
+ idempotentHint: boolean;
219
+ openWorldHint: boolean;
220
+ };
221
+ handler: (args: unknown) => Promise<{
222
+ content: {
223
+ type: string;
224
+ text: string;
225
+ }[];
226
+ }>;
227
+ };
228
+ //# sourceMappingURL=agent-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-tools.d.ts","sourceRoot":"","sources":["../../src/tools/agent-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAA4B,cAAc,EAAE,MAAM,aAAa,CAAC;AASvE;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAgDZ,OAAO;;;;;;CA6C9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;oBA+BT,OAAO;;;;;;CAa9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA6CZ,OAAO;;;;;;CA0F9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;oBA+BZ,OAAO;;;;;;CAa9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;oBAkCX,OAAO;;;;;;CAiC9B,CAAC"}
@@ -0,0 +1,369 @@
1
+ /**
2
+ * Agent management tools
3
+ *
4
+ * MCP tools for creating, retrieving, updating, deleting, and listing voice agents.
5
+ */
6
+ import { getRequest, postRequest, patchRequest, deleteRequest } from "../services/elevenlabs-api.js";
7
+ import { formatResponse } from "../services/formatters.js";
8
+ import { CreateAgentSchema, GetAgentSchema, UpdateAgentSchema, DeleteAgentSchema, ListAgentsSchema } from "../schemas/agent-schemas.js";
9
+ /**
10
+ * Creates a new ElevenLabs Voice Agent
11
+ */
12
+ export const elevenlabs_create_agent = {
13
+ name: "elevenlabs_create_agent",
14
+ description: `Create a new ElevenLabs Voice Agent with specified configuration.
15
+
16
+ This tool creates a complete voice agent with conversation settings, including the AI model, voice configuration, ASR settings, and initial behavior. It does NOT start conversations or deploy the agent - it only creates the configuration.
17
+
18
+ Args:
19
+ - name (string): Display name for the agent (max 100 chars)
20
+ - prompt (string): System prompt defining behavior (10-5000 chars)
21
+ - llm (string): AI model to use (default: "gpt-4o-mini")
22
+ Options: gpt-4o, gpt-4o-mini, claude-3-5-sonnet-20241022, claude-3-5-haiku-20241022, gemini-2.0-flash-exp
23
+ - voice_id (string): ElevenLabs voice ID (default: "21m00Tcm4TlvDq8ikWAM" - Rachel)
24
+ - voice_model (string): Voice synthesis model (default: "eleven_flash_v2_5")
25
+ Options: eleven_turbo_v2_5, eleven_flash_v2_5, eleven_multilingual_v2
26
+ - first_message (string): Optional greeting message (max 500 chars)
27
+ - language (string): Primary language code (default: "en")
28
+ - temperature (number): LLM temperature 0-2 for response randomness (higher = more creative)
29
+ - max_tokens (number): Maximum tokens for LLM responses (1-4096)
30
+ - stability (number): Voice stability 0-1 (higher = more consistent)
31
+ - similarity_boost (number): Voice similarity boost 0-1 (higher = closer to original)
32
+ - widget_color (string): Widget theme color in hex format (e.g., "#FF5733")
33
+ - widget_avatar_url (string): Widget avatar image URL
34
+ - response_format ('markdown' | 'json'): Output format
35
+
36
+ Returns:
37
+ For JSON format: Complete agent object with agent_id, name, conversation_config, created_at
38
+ For Markdown format: Formatted agent details with configuration summary
39
+
40
+ Examples:
41
+ - Use when: "Create a customer service agent for tech support"
42
+ - Use when: "Set up a voice agent for appointment scheduling"
43
+ - Don't use when: You want to test an existing agent (use elevenlabs_generate_widget_code)
44
+ - Don't use when: You want to modify an agent (use elevenlabs_update_agent)
45
+
46
+ Error Handling:
47
+ - Returns "Error: Invalid voice_id" if voice doesn't exist
48
+ - Returns "Error: Invalid API key" if authentication fails
49
+ - Returns "Error: Rate limit exceeded" if too many requests (wait 60s and retry)`,
50
+ zodSchema: CreateAgentSchema,
51
+ annotations: {
52
+ readOnlyHint: false,
53
+ destructiveHint: false,
54
+ idempotentHint: false,
55
+ openWorldHint: true
56
+ },
57
+ handler: async (args) => {
58
+ const parsed = CreateAgentSchema.parse(args);
59
+ // Build agent configuration
60
+ const agentData = {
61
+ name: parsed.name,
62
+ conversation_config: {
63
+ agent: {
64
+ prompt: {
65
+ prompt: parsed.prompt,
66
+ llm: parsed.llm,
67
+ ...(parsed.temperature !== undefined && { temperature: parsed.temperature }),
68
+ ...(parsed.max_tokens !== undefined && { max_tokens: parsed.max_tokens })
69
+ },
70
+ ...(parsed.first_message && { first_message: parsed.first_message }),
71
+ language: parsed.language
72
+ },
73
+ tts: {
74
+ voice_id: parsed.voice_id,
75
+ model_id: parsed.voice_model,
76
+ ...(parsed.stability !== undefined && { stability: parsed.stability }),
77
+ ...(parsed.similarity_boost !== undefined && { similarity_boost: parsed.similarity_boost })
78
+ }
79
+ },
80
+ ...(parsed.widget_color || parsed.widget_avatar_url ? {
81
+ platform_settings: {
82
+ widget: {
83
+ ...(parsed.widget_color && { color: parsed.widget_color }),
84
+ ...(parsed.widget_avatar_url && { avatar_url: parsed.widget_avatar_url })
85
+ }
86
+ }
87
+ } : {})
88
+ };
89
+ const agent = await postRequest("/convai/agents", agentData);
90
+ return {
91
+ content: [
92
+ {
93
+ type: "text",
94
+ text: formatResponse(agent, parsed.response_format, "agent")
95
+ }
96
+ ]
97
+ };
98
+ }
99
+ };
100
+ /**
101
+ * Retrieves an agent by ID
102
+ */
103
+ export const elevenlabs_get_agent = {
104
+ name: "elevenlabs_get_agent",
105
+ description: `Retrieve complete configuration for an existing ElevenLabs Voice Agent.
106
+
107
+ This tool fetches all details about an agent including its conversation configuration, tools, knowledge base, and platform settings. Use this to inspect an agent before modifying it or to check current settings.
108
+
109
+ Args:
110
+ - agent_id (string): Unique agent identifier (e.g., 'ag_abc123')
111
+ - response_format ('markdown' | 'json'): Output format
112
+
113
+ Returns:
114
+ Complete agent configuration including prompt, LLM settings, voice configuration, tools, and knowledge base.
115
+
116
+ Examples:
117
+ - Use when: "Show me the configuration for agent ag_abc123"
118
+ - Use when: "What's the current prompt for this agent?"
119
+ - Don't use when: You want to list all agents (use elevenlabs_list_agents)
120
+
121
+ Error Handling:
122
+ - Returns "Error: Agent not found" if agent_id doesn't exist
123
+ - Returns "Error: Invalid API key" if authentication fails`,
124
+ zodSchema: GetAgentSchema,
125
+ annotations: {
126
+ readOnlyHint: true,
127
+ destructiveHint: false,
128
+ idempotentHint: true,
129
+ openWorldHint: true
130
+ },
131
+ handler: async (args) => {
132
+ const parsed = GetAgentSchema.parse(args);
133
+ const agent = await getRequest(`/convai/agents/${parsed.agent_id}`);
134
+ return {
135
+ content: [
136
+ {
137
+ type: "text",
138
+ text: formatResponse(agent, parsed.response_format, "agent")
139
+ }
140
+ ]
141
+ };
142
+ }
143
+ };
144
+ /**
145
+ * Updates an existing agent
146
+ */
147
+ export const elevenlabs_update_agent = {
148
+ name: "elevenlabs_update_agent",
149
+ description: `Update an existing ElevenLabs Voice Agent's configuration.
150
+
151
+ This tool modifies one or more settings of an existing agent. You only need to provide the fields you want to change - all other settings will remain the same. Changes take effect immediately for new conversations.
152
+
153
+ Args:
154
+ - agent_id (string): Unique agent identifier (e.g., 'ag_abc123')
155
+ - name (string): Updated display name (max 100 chars)
156
+ - prompt (string): Updated system prompt (10-5000 chars)
157
+ - llm (string): Updated AI model
158
+ - voice_id (string): Updated voice ID
159
+ - voice_model (string): Updated voice model
160
+ - first_message (string): Updated greeting (max 500 chars)
161
+ - language (string): Updated language code
162
+ - temperature (number): Updated temperature (0-2)
163
+ - max_tokens (number): Updated max tokens (1-4096)
164
+ - stability (number): Updated voice stability (0-1)
165
+ - similarity_boost (number): Updated similarity boost (0-1)
166
+ - widget_color (string): Updated widget color
167
+ - widget_avatar_url (string): Updated widget avatar URL
168
+ - response_format ('markdown' | 'json'): Output format
169
+
170
+ Returns:
171
+ Updated agent configuration.
172
+
173
+ Examples:
174
+ - Use when: "Change the agent's voice to voice ID xyz123"
175
+ - Use when: "Update the system prompt to be more friendly"
176
+ - Use when: "Switch the agent to use Claude instead of GPT"
177
+ - Don't use when: You want to create a new agent (use elevenlabs_create_agent)
178
+
179
+ Error Handling:
180
+ - Returns "Error: Agent not found" if agent_id doesn't exist
181
+ - Returns "Error: Invalid voice_id" if new voice doesn't exist`,
182
+ zodSchema: UpdateAgentSchema,
183
+ annotations: {
184
+ readOnlyHint: false,
185
+ destructiveHint: false,
186
+ idempotentHint: true,
187
+ openWorldHint: true
188
+ },
189
+ handler: async (args) => {
190
+ const parsed = UpdateAgentSchema.parse(args);
191
+ // Get current agent config
192
+ const currentAgent = await getRequest(`/convai/agents/${parsed.agent_id}`);
193
+ // Build update payload with only changed fields
194
+ const updateData = {};
195
+ if (parsed.name !== undefined) {
196
+ updateData.name = parsed.name;
197
+ }
198
+ // Build conversation config updates
199
+ const conversationConfigUpdates = {
200
+ agent: { ...currentAgent.conversation_config.agent },
201
+ tts: { ...currentAgent.conversation_config.tts }
202
+ };
203
+ let hasConversationConfigChanges = false;
204
+ // Agent updates
205
+ if (parsed.prompt !== undefined || parsed.llm !== undefined ||
206
+ parsed.temperature !== undefined || parsed.max_tokens !== undefined) {
207
+ conversationConfigUpdates.agent = {
208
+ ...conversationConfigUpdates.agent,
209
+ prompt: {
210
+ ...(currentAgent.conversation_config.agent.prompt),
211
+ ...(parsed.prompt !== undefined && { prompt: parsed.prompt }),
212
+ ...(parsed.llm !== undefined && { llm: parsed.llm }),
213
+ ...(parsed.temperature !== undefined && { temperature: parsed.temperature }),
214
+ ...(parsed.max_tokens !== undefined && { max_tokens: parsed.max_tokens })
215
+ }
216
+ };
217
+ hasConversationConfigChanges = true;
218
+ }
219
+ if (parsed.first_message !== undefined) {
220
+ conversationConfigUpdates.agent.first_message = parsed.first_message;
221
+ hasConversationConfigChanges = true;
222
+ }
223
+ if (parsed.language !== undefined) {
224
+ conversationConfigUpdates.agent.language = parsed.language;
225
+ hasConversationConfigChanges = true;
226
+ }
227
+ // TTS updates
228
+ if (parsed.voice_id !== undefined || parsed.voice_model !== undefined ||
229
+ parsed.stability !== undefined || parsed.similarity_boost !== undefined) {
230
+ conversationConfigUpdates.tts = {
231
+ ...conversationConfigUpdates.tts,
232
+ ...(parsed.voice_id !== undefined && { voice_id: parsed.voice_id }),
233
+ ...(parsed.voice_model !== undefined && { model_id: parsed.voice_model }),
234
+ ...(parsed.stability !== undefined && { stability: parsed.stability }),
235
+ ...(parsed.similarity_boost !== undefined && { similarity_boost: parsed.similarity_boost })
236
+ };
237
+ hasConversationConfigChanges = true;
238
+ }
239
+ if (hasConversationConfigChanges) {
240
+ updateData.conversation_config = conversationConfigUpdates;
241
+ }
242
+ // Widget updates
243
+ if (parsed.widget_color !== undefined || parsed.widget_avatar_url !== undefined) {
244
+ updateData.platform_settings = {
245
+ ...(currentAgent.platform_settings || {}),
246
+ widget: {
247
+ ...(currentAgent.platform_settings?.widget || {}),
248
+ ...(parsed.widget_color !== undefined && { color: parsed.widget_color }),
249
+ ...(parsed.widget_avatar_url !== undefined && { avatar_url: parsed.widget_avatar_url })
250
+ }
251
+ };
252
+ }
253
+ const updatedAgent = await patchRequest(`/convai/agents/${parsed.agent_id}`, updateData);
254
+ return {
255
+ content: [
256
+ {
257
+ type: "text",
258
+ text: formatResponse(updatedAgent, parsed.response_format, "agent")
259
+ }
260
+ ]
261
+ };
262
+ }
263
+ };
264
+ /**
265
+ * Deletes an agent
266
+ */
267
+ export const elevenlabs_delete_agent = {
268
+ name: "elevenlabs_delete_agent",
269
+ description: `Delete an ElevenLabs Voice Agent permanently.
270
+
271
+ This tool permanently removes an agent and all its configuration. This action CANNOT be undone. All conversations associated with this agent will remain accessible, but the agent itself will be deleted.
272
+
273
+ Args:
274
+ - agent_id (string): Unique agent identifier to delete (e.g., 'ag_abc123')
275
+
276
+ Returns:
277
+ Confirmation message indicating successful deletion.
278
+
279
+ Examples:
280
+ - Use when: "Delete the test agent ag_test123"
281
+ - Use when: "Remove agent ag_old456 permanently"
282
+ - Don't use when: You want to temporarily disable an agent (no disable feature - just don't use it)
283
+ - Don't use when: You're not sure - this is permanent!
284
+
285
+ Error Handling:
286
+ - Returns "Error: Agent not found" if agent_id doesn't exist
287
+ - Returns "Error: Invalid API key" if authentication fails`,
288
+ zodSchema: DeleteAgentSchema,
289
+ annotations: {
290
+ readOnlyHint: false,
291
+ destructiveHint: true,
292
+ idempotentHint: true,
293
+ openWorldHint: true
294
+ },
295
+ handler: async (args) => {
296
+ const parsed = DeleteAgentSchema.parse(args);
297
+ await deleteRequest(`/convai/agents/${parsed.agent_id}`);
298
+ return {
299
+ content: [
300
+ {
301
+ type: "text",
302
+ text: `Successfully deleted agent: ${parsed.agent_id}`
303
+ }
304
+ ]
305
+ };
306
+ }
307
+ };
308
+ /**
309
+ * Lists all agents with pagination
310
+ */
311
+ export const elevenlabs_list_agents = {
312
+ name: "elevenlabs_list_agents",
313
+ description: `List all ElevenLabs Voice Agents with pagination.
314
+
315
+ This tool retrieves a paginated list of all your voice agents. Use the offset and limit parameters to navigate through large agent lists. The response includes pagination metadata to help you fetch additional pages.
316
+
317
+ Args:
318
+ - limit (number): Maximum agents to return (1-100, default: 20)
319
+ - offset (number): Number of agents to skip (default: 0)
320
+ - response_format ('markdown' | 'json'): Output format
321
+
322
+ Returns:
323
+ For JSON format: Object with total count, items array, offset, has_more, and next_offset
324
+ For Markdown format: Formatted list of agents with key details and pagination guidance
325
+
326
+ Examples:
327
+ - Use when: "Show me all my voice agents"
328
+ - Use when: "List the first 10 agents"
329
+ - Use when: "Get the next page of agents with offset=20"
330
+ - Don't use when: You want details about a specific agent (use elevenlabs_get_agent)
331
+
332
+ Error Handling:
333
+ - Returns empty list if no agents exist
334
+ - Returns "Error: Invalid API key" if authentication fails`,
335
+ zodSchema: ListAgentsSchema,
336
+ annotations: {
337
+ readOnlyHint: true,
338
+ destructiveHint: false,
339
+ idempotentHint: true,
340
+ openWorldHint: true
341
+ },
342
+ handler: async (args) => {
343
+ const parsed = ListAgentsSchema.parse(args);
344
+ const response = await getRequest("/convai/agents", {
345
+ limit: parsed.limit,
346
+ offset: parsed.offset
347
+ });
348
+ const agents = response.agents || [];
349
+ const total = agents.length; // Note: ElevenLabs API may not return total count
350
+ const hasMore = agents.length === parsed.limit;
351
+ const paginatedResponse = {
352
+ total,
353
+ count: agents.length,
354
+ offset: parsed.offset,
355
+ items: agents,
356
+ has_more: hasMore,
357
+ next_offset: hasMore ? parsed.offset + agents.length : undefined
358
+ };
359
+ return {
360
+ content: [
361
+ {
362
+ type: "text",
363
+ text: formatResponse(paginatedResponse, parsed.response_format, "agent_list")
364
+ }
365
+ ]
366
+ };
367
+ }
368
+ };
369
+ //# sourceMappingURL=agent-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-tools.js","sourceRoot":"","sources":["../../src/tools/agent-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACrG,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,6BAA6B,CAAC;AAErC;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mFAmCoE;IAEjF,SAAS,EAAE,iBAAiB;IAE5B,WAAW,EAAE;QACX,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,KAAK;QACrB,aAAa,EAAE,IAAI;KACpB;IAED,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,MAAM,GAAG,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAE7C,4BAA4B;QAC5B,MAAM,SAAS,GAAG;YAChB,IAAI,EAAE,M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