neuron-mcp-server 1.0.0 → 1.1.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.
- package/.env +13 -0
- package/AI_PERSONALITY_DESIGN_RESEARCH.md +1020 -0
- package/Dockerfile +18 -0
- package/README.md +146 -131
- package/dist/client.d.ts +6 -0
- package/dist/client.js +50 -12
- package/dist/client.js.map +1 -1
- package/dist/index.js +51 -7
- package/dist/index.js.map +1 -1
- package/dist/tools/ai.js +9 -3
- package/dist/tools/ai.js.map +1 -1
- package/dist/tools/approvals.d.ts +2 -0
- package/dist/tools/approvals.js +181 -0
- package/dist/tools/approvals.js.map +1 -0
- package/dist/tools/audit.js +7 -4
- package/dist/tools/audit.js.map +1 -1
- package/dist/tools/auth.js +119 -19
- package/dist/tools/auth.js.map +1 -1
- package/dist/tools/billing.js +22 -6
- package/dist/tools/billing.js.map +1 -1
- package/dist/tools/blog.js +98 -34
- package/dist/tools/blog.js.map +1 -1
- package/dist/tools/bot-api-keys.js +27 -12
- package/dist/tools/bot-api-keys.js.map +1 -1
- package/dist/tools/bot-api.js +53 -27
- package/dist/tools/bot-api.js.map +1 -1
- package/dist/tools/bots.js +116 -68
- package/dist/tools/bots.js.map +1 -1
- package/dist/tools/broadcasts.js +78 -38
- package/dist/tools/broadcasts.js.map +1 -1
- package/dist/tools/builtin-tools.js +19 -12
- package/dist/tools/builtin-tools.js.map +1 -1
- package/dist/tools/campaigns.js +149 -61
- package/dist/tools/campaigns.js.map +1 -1
- package/dist/tools/channels.js +163 -53
- package/dist/tools/channels.js.map +1 -1
- package/dist/tools/contact-lists.js +111 -51
- package/dist/tools/contact-lists.js.map +1 -1
- package/dist/tools/contacts.js +117 -44
- package/dist/tools/contacts.js.map +1 -1
- package/dist/tools/conversations.js +95 -50
- package/dist/tools/conversations.js.map +1 -1
- package/dist/tools/flows.d.ts +2 -0
- package/dist/tools/flows.js +242 -0
- package/dist/tools/flows.js.map +1 -0
- package/dist/tools/group-management.d.ts +2 -0
- package/dist/tools/group-management.js +239 -0
- package/dist/tools/group-management.js.map +1 -0
- package/dist/tools/leads.d.ts +2 -0
- package/dist/tools/leads.js +100 -0
- package/dist/tools/leads.js.map +1 -0
- package/dist/tools/list-campaigns.d.ts +2 -0
- package/dist/tools/list-campaigns.js +152 -0
- package/dist/tools/list-campaigns.js.map +1 -0
- package/dist/tools/list-pool.js +250 -33
- package/dist/tools/list-pool.js.map +1 -1
- package/dist/tools/media.js +12 -7
- package/dist/tools/media.js.map +1 -1
- package/dist/tools/newsletters.js +106 -26
- package/dist/tools/newsletters.js.map +1 -1
- package/dist/tools/organizations.js +76 -35
- package/dist/tools/organizations.js.map +1 -1
- package/dist/tools/outbound-webhooks.js +32 -20
- package/dist/tools/outbound-webhooks.js.map +1 -1
- package/dist/tools/payouts.js +44 -17
- package/dist/tools/payouts.js.map +1 -1
- package/dist/tools/personas.d.ts +2 -0
- package/dist/tools/personas.js +141 -0
- package/dist/tools/personas.js.map +1 -0
- package/dist/tools/polls.d.ts +2 -0
- package/dist/tools/polls.js +30 -0
- package/dist/tools/polls.js.map +1 -0
- package/dist/tools/pool.js +101 -43
- package/dist/tools/pool.js.map +1 -1
- package/dist/tools/products.d.ts +2 -0
- package/dist/tools/products.js +277 -0
- package/dist/tools/products.js.map +1 -0
- package/dist/tools/profile-privacy.d.ts +2 -0
- package/dist/tools/profile-privacy.js +195 -0
- package/dist/tools/profile-privacy.js.map +1 -0
- package/dist/tools/reflections.js +25 -13
- package/dist/tools/reflections.js.map +1 -1
- package/dist/tools/scheduled-messages.d.ts +2 -0
- package/dist/tools/scheduled-messages.js +124 -0
- package/dist/tools/scheduled-messages.js.map +1 -0
- package/dist/tools/social-channels.d.ts +2 -0
- package/dist/tools/social-channels.js +318 -0
- package/dist/tools/social-channels.js.map +1 -0
- package/dist/tools/tasks.d.ts +2 -0
- package/dist/tools/tasks.js +155 -0
- package/dist/tools/tasks.js.map +1 -0
- package/dist/tools/tools.js +86 -40
- package/dist/tools/tools.js.map +1 -1
- package/dist/tools/wallets.js +34 -12
- package/dist/tools/wallets.js.map +1 -1
- package/dist/tools/webhooks.js +35 -20
- package/dist/tools/webhooks.js.map +1 -1
- package/dist/tools/whatsapp-actions.d.ts +2 -0
- package/dist/tools/whatsapp-actions.js +186 -0
- package/dist/tools/whatsapp-actions.js.map +1 -0
- package/package.json +4 -31
- package/scripts/setup-delivahere-bot.ts +804 -0
- package/scripts/test-delivahere-bot.ts +128 -0
- package/scripts/update-letschop-prompt.ts +194 -0
- package/server.json +26 -0
- package/smithery.yaml +19 -0
- package/src/client.ts +169 -0
- package/src/index.ts +256 -0
- package/src/tools/ai.ts +35 -0
- package/src/tools/approvals.ts +231 -0
- package/src/tools/audit.ts +49 -0
- package/src/tools/auth.ts +536 -0
- package/src/tools/billing.ts +79 -0
- package/src/tools/blog.ts +264 -0
- package/src/tools/bot-api-keys.ts +87 -0
- package/src/tools/bot-api.ts +193 -0
- package/src/tools/bots.ts +320 -0
- package/src/tools/broadcasts.ts +224 -0
- package/src/tools/builtin-tools.ts +108 -0
- package/src/tools/campaigns.ts +429 -0
- package/src/tools/channels.ts +520 -0
- package/src/tools/contact-lists.ts +320 -0
- package/src/tools/contacts.ts +395 -0
- package/src/tools/conversations.ts +349 -0
- package/src/tools/flows.ts +298 -0
- package/src/tools/group-management.ts +265 -0
- package/src/tools/knowledge-bases.ts +451 -0
- package/src/tools/leads.ts +104 -0
- package/src/tools/list-campaigns.ts +190 -0
- package/src/tools/list-pool.ts +389 -0
- package/src/tools/media.ts +50 -0
- package/src/tools/newsletters.ts +271 -0
- package/src/tools/organizations.ts +287 -0
- package/src/tools/outbound-webhooks.ts +181 -0
- package/src/tools/payouts.ts +133 -0
- package/src/tools/personas.ts +145 -0
- package/src/tools/polls.ts +32 -0
- package/src/tools/pool.ts +293 -0
- package/src/tools/products.ts +280 -0
- package/src/tools/profile-privacy.ts +215 -0
- package/src/tools/reflections.ts +124 -0
- package/src/tools/scheduled-messages.ts +144 -0
- package/src/tools/social-channels.ts +396 -0
- package/src/tools/tasks.ts +198 -0
- package/src/tools/tools.ts +255 -0
- package/src/tools/wallets.ts +107 -0
- package/src/tools/webhooks.ts +166 -0
- package/src/tools/whatsapp-actions.ts +203 -0
- package/tsconfig.json +20 -0
- package/LICENSE +0 -21
package/dist/tools/bots.js
CHANGED
|
@@ -4,36 +4,32 @@ export function registerBotTools(server) {
|
|
|
4
4
|
// Create Bot
|
|
5
5
|
server.registerTool("neuron_create_bot", {
|
|
6
6
|
title: "Create Bot",
|
|
7
|
-
description: "Create a new bot with specified
|
|
8
|
-
annotations: {
|
|
7
|
+
description: "Create a new AI bot with specified name, model, and behavior instructions. Returns the created bot object.",
|
|
8
|
+
annotations: {
|
|
9
|
+
readOnlyHint: false,
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
idempotentHint: false,
|
|
12
|
+
openWorldHint: false,
|
|
13
|
+
},
|
|
9
14
|
inputSchema: z.object({
|
|
10
|
-
name: z.string().describe("
|
|
11
|
-
systemPrompt: z.string().describe("
|
|
12
|
-
assignment: z.string().optional().describe("One-sentence role definition (max 2000 chars)"),
|
|
13
|
-
responsibilities: z.array(z.string()).optional().describe("Array of responsibility descriptions"),
|
|
14
|
-
llmModel: z.string().optional().describe("OpenRouter model ID (e.g., google/gemini-2.5-flash-lite
|
|
15
|
-
llmTemperature: z.number().min(0).max(2).optional().describe("Temperature parameter
|
|
16
|
-
maxTokens: z.number().positive().optional().describe("Maximum tokens
|
|
17
|
-
escalationPrompt: z.string().optional().describe("Prompt template
|
|
18
|
-
greetingMessage: z.string().optional().describe("
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
name: z.string().describe("Display name for the bot"),
|
|
16
|
+
systemPrompt: z.string().describe("System prompt that defines the bot's behavior, personality, and response guidelines"),
|
|
17
|
+
assignment: z.string().optional().describe("One-sentence role definition for the bot (max 2000 chars)"),
|
|
18
|
+
responsibilities: z.array(z.string()).optional().describe("Array of responsibility descriptions defining what the bot handles"),
|
|
19
|
+
llmModel: z.string().optional().describe("OpenRouter model ID (e.g., 'google/gemini-2.5-flash-lite', 'openrouter/auto')"),
|
|
20
|
+
llmTemperature: z.number().min(0).max(2).optional().describe("Temperature parameter controlling response randomness (0 = deterministic, 2 = creative)"),
|
|
21
|
+
maxTokens: z.number().positive().optional().describe("Maximum number of tokens the bot can generate per response"),
|
|
22
|
+
escalationPrompt: z.string().optional().describe("Prompt template used when escalating to a human agent (max 5000 chars)"),
|
|
23
|
+
greetingMessage: z.string().optional().describe("Automatic greeting sent when a new conversation starts (max 2000 chars)"),
|
|
24
|
+
welcomeMessage: z.string().optional().describe("Welcome message sent to new members joining groups the bot manages. Setting this field activates the batched welcome feature — new members are accumulated over a window (default 60s) and welcomed in a single message with @mentions. Set to null to disable."),
|
|
25
|
+
fallbackMessage: z.string().optional().describe("Message sent when the bot cannot understand user input (max 2000 chars)"),
|
|
26
|
+
whatsappChannelId: z.string().optional().describe("Unique identifier (UUID) of the WhatsApp channel to associate with the bot"),
|
|
27
|
+
metadata: z.record(z.unknown()).optional().describe("Arbitrary metadata object stored with the bot. Known keys: 'communityExitFollowUp' (auto-DM users who leave watched groups — { enabled: boolean, groupJids: string[], message: string with {name} placeholder }), 'learningConfig' (self-learning from conversations — { enabled: boolean, folder: string, groupChats: string[], dmPhones: string[], useAdminPhones: boolean }), 'loadBalancing' (multi-channel round-robin — { enabled: boolean, strategy: string }), 'welcomeNewMembers' (fine-tune welcome behavior — { batchWindowSeconds: number, groupJids: string[] }). Additional custom keys are preserved as-is."),
|
|
21
28
|
}),
|
|
22
29
|
}, async (params) => {
|
|
23
30
|
try {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
systemPrompt: params.systemPrompt,
|
|
27
|
-
assignment: params.assignment,
|
|
28
|
-
responsibilities: params.responsibilities,
|
|
29
|
-
llmModel: params.llmModel,
|
|
30
|
-
llmTemperature: params.llmTemperature,
|
|
31
|
-
maxTokens: params.maxTokens,
|
|
32
|
-
escalationPrompt: params.escalationPrompt,
|
|
33
|
-
greetingMessage: params.greetingMessage,
|
|
34
|
-
fallbackMessage: params.fallbackMessage,
|
|
35
|
-
whatsappChannelId: params.whatsappChannelId,
|
|
36
|
-
});
|
|
31
|
+
const { name, systemPrompt, ...rest } = params;
|
|
32
|
+
const result = await api("POST", "bots", { name, systemPrompt, ...rest });
|
|
37
33
|
return jsonResult(result);
|
|
38
34
|
}
|
|
39
35
|
catch (error) {
|
|
@@ -43,8 +39,13 @@ export function registerBotTools(server) {
|
|
|
43
39
|
// List Bots
|
|
44
40
|
server.registerTool("neuron_list_bots", {
|
|
45
41
|
title: "List Bots",
|
|
46
|
-
description: "Retrieve
|
|
47
|
-
annotations: {
|
|
42
|
+
description: "Retrieve all bots accessible to the current user, including their configurations and status.",
|
|
43
|
+
annotations: {
|
|
44
|
+
readOnlyHint: true,
|
|
45
|
+
destructiveHint: false,
|
|
46
|
+
idempotentHint: true,
|
|
47
|
+
openWorldHint: false,
|
|
48
|
+
},
|
|
48
49
|
inputSchema: z.object({}),
|
|
49
50
|
}, async () => {
|
|
50
51
|
try {
|
|
@@ -58,10 +59,15 @@ export function registerBotTools(server) {
|
|
|
58
59
|
// Get Bot
|
|
59
60
|
server.registerTool("neuron_get_bot", {
|
|
60
61
|
title: "Get Bot",
|
|
61
|
-
description: "Retrieve detailed information about a specific bot
|
|
62
|
-
annotations: {
|
|
62
|
+
description: "Retrieve detailed information about a specific bot including its configuration, status, and associated resources.",
|
|
63
|
+
annotations: {
|
|
64
|
+
readOnlyHint: true,
|
|
65
|
+
destructiveHint: false,
|
|
66
|
+
idempotentHint: true,
|
|
67
|
+
openWorldHint: false,
|
|
68
|
+
},
|
|
63
69
|
inputSchema: z.object({
|
|
64
|
-
id: z.string().describe("
|
|
70
|
+
id: z.string().describe("Unique identifier (UUID) of the bot"),
|
|
65
71
|
}),
|
|
66
72
|
}, async (params) => {
|
|
67
73
|
try {
|
|
@@ -75,21 +81,28 @@ export function registerBotTools(server) {
|
|
|
75
81
|
// Update Bot
|
|
76
82
|
server.registerTool("neuron_update_bot", {
|
|
77
83
|
title: "Update Bot",
|
|
78
|
-
description: "Update an existing bot's configuration
|
|
79
|
-
annotations: {
|
|
84
|
+
description: "Update an existing bot's configuration. Only provided fields are modified; omitted fields remain unchanged.",
|
|
85
|
+
annotations: {
|
|
86
|
+
readOnlyHint: false,
|
|
87
|
+
destructiveHint: false,
|
|
88
|
+
idempotentHint: true,
|
|
89
|
+
openWorldHint: false,
|
|
90
|
+
},
|
|
80
91
|
inputSchema: z.object({
|
|
81
|
-
id: z.string().describe("
|
|
82
|
-
name: z.string().optional().describe("
|
|
83
|
-
systemPrompt: z.string().optional().describe("
|
|
84
|
-
assignment: z.string().optional().describe("One-sentence role definition (max 2000 chars)"),
|
|
85
|
-
responsibilities: z.array(z.string()).optional().describe("Array of responsibility descriptions"),
|
|
86
|
-
llmModel: z.string().optional().describe("OpenRouter model ID (e.g., google/gemini-2.5-flash-lite
|
|
87
|
-
llmTemperature: z.number().min(0).max(2).optional().describe("
|
|
88
|
-
maxTokens: z.number().positive().optional().describe("
|
|
89
|
-
escalationPrompt: z.string().optional().describe("Prompt template
|
|
90
|
-
greetingMessage: z.string().optional().describe("
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
id: z.string().describe("Unique identifier (UUID) of the bot to update"),
|
|
93
|
+
name: z.string().optional().describe("New display name for the bot"),
|
|
94
|
+
systemPrompt: z.string().optional().describe("New system prompt defining the bot's behavior and personality"),
|
|
95
|
+
assignment: z.string().optional().describe("One-sentence role definition for the bot (max 2000 chars)"),
|
|
96
|
+
responsibilities: z.array(z.string()).optional().describe("Array of responsibility descriptions defining what the bot handles"),
|
|
97
|
+
llmModel: z.string().optional().describe("OpenRouter model ID (e.g., 'google/gemini-2.5-flash-lite', 'openrouter/auto')"),
|
|
98
|
+
llmTemperature: z.number().min(0).max(2).optional().describe("Temperature parameter controlling response randomness (0 = deterministic, 2 = creative)"),
|
|
99
|
+
maxTokens: z.number().positive().optional().describe("Maximum number of tokens the bot can generate per response"),
|
|
100
|
+
escalationPrompt: z.string().optional().describe("Prompt template used when escalating to a human agent (max 5000 chars)"),
|
|
101
|
+
greetingMessage: z.string().optional().describe("Automatic greeting sent when a new conversation starts (max 2000 chars)"),
|
|
102
|
+
welcomeMessage: z.string().optional().describe("Welcome message sent to new members joining groups the bot manages. Setting this field activates the batched welcome feature — new members are accumulated over a window (default 60s) and welcomed in a single message with @mentions. Set to null to disable."),
|
|
103
|
+
fallbackMessage: z.string().optional().describe("Message sent when the bot cannot understand user input (max 2000 chars)"),
|
|
104
|
+
whatsappChannelId: z.string().optional().describe("Unique identifier (UUID) of the WhatsApp channel to associate with the bot"),
|
|
105
|
+
metadata: z.record(z.unknown()).optional().describe("Arbitrary metadata object stored with the bot. Replaces the entire metadata field — include ALL existing keys you want to keep. Known keys: 'communityExitFollowUp' (auto-DM users who leave watched groups — { enabled: boolean, groupJids: string[], message: string with {name} placeholder }), 'learningConfig' (self-learning from conversations — { enabled: boolean, folder: string, groupChats: string[], dmPhones: string[], useAdminPhones: boolean }), 'loadBalancing' (multi-channel round-robin — { enabled: boolean, strategy: string }), 'welcomeNewMembers' (fine-tune welcome behavior — { batchWindowSeconds: number, groupJids: string[] }). Additional custom keys are preserved as-is."),
|
|
93
106
|
}),
|
|
94
107
|
}, async (params) => {
|
|
95
108
|
try {
|
|
@@ -105,9 +118,14 @@ export function registerBotTools(server) {
|
|
|
105
118
|
server.registerTool("neuron_delete_bot", {
|
|
106
119
|
title: "Delete Bot",
|
|
107
120
|
description: "Permanently delete a bot and all its associated data. This action cannot be undone.",
|
|
108
|
-
annotations: {
|
|
121
|
+
annotations: {
|
|
122
|
+
readOnlyHint: false,
|
|
123
|
+
destructiveHint: true,
|
|
124
|
+
idempotentHint: true,
|
|
125
|
+
openWorldHint: false,
|
|
126
|
+
},
|
|
109
127
|
inputSchema: z.object({
|
|
110
|
-
id: z.string().describe("
|
|
128
|
+
id: z.string().describe("Unique identifier (UUID) of the bot to delete"),
|
|
111
129
|
}),
|
|
112
130
|
}, async (params) => {
|
|
113
131
|
try {
|
|
@@ -121,10 +139,15 @@ export function registerBotTools(server) {
|
|
|
121
139
|
// Pause Bot
|
|
122
140
|
server.registerTool("neuron_pause_bot", {
|
|
123
141
|
title: "Pause Bot",
|
|
124
|
-
description: "Pause a bot
|
|
125
|
-
annotations: {
|
|
142
|
+
description: "Pause a bot to temporarily stop it from processing new messages. The bot retains its configuration and can be resumed later.",
|
|
143
|
+
annotations: {
|
|
144
|
+
readOnlyHint: false,
|
|
145
|
+
destructiveHint: false,
|
|
146
|
+
idempotentHint: true,
|
|
147
|
+
openWorldHint: false,
|
|
148
|
+
},
|
|
126
149
|
inputSchema: z.object({
|
|
127
|
-
id: z.string().describe("
|
|
150
|
+
id: z.string().describe("Unique identifier (UUID) of the bot to pause"),
|
|
128
151
|
}),
|
|
129
152
|
}, async (params) => {
|
|
130
153
|
try {
|
|
@@ -138,10 +161,15 @@ export function registerBotTools(server) {
|
|
|
138
161
|
// Resume Bot
|
|
139
162
|
server.registerTool("neuron_resume_bot", {
|
|
140
163
|
title: "Resume Bot",
|
|
141
|
-
description: "Resume a paused bot
|
|
142
|
-
annotations: {
|
|
164
|
+
description: "Resume a previously paused bot so it begins processing new messages again.",
|
|
165
|
+
annotations: {
|
|
166
|
+
readOnlyHint: false,
|
|
167
|
+
destructiveHint: false,
|
|
168
|
+
idempotentHint: true,
|
|
169
|
+
openWorldHint: false,
|
|
170
|
+
},
|
|
143
171
|
inputSchema: z.object({
|
|
144
|
-
id: z.string().describe("
|
|
172
|
+
id: z.string().describe("Unique identifier (UUID) of the bot to resume"),
|
|
145
173
|
}),
|
|
146
174
|
}, async (params) => {
|
|
147
175
|
try {
|
|
@@ -155,10 +183,15 @@ export function registerBotTools(server) {
|
|
|
155
183
|
// Get Bot Analytics
|
|
156
184
|
server.registerTool("neuron_get_bot_analytics", {
|
|
157
185
|
title: "Get Bot Analytics",
|
|
158
|
-
description: "Retrieve analytics and usage statistics for a specific bot including message counts, response times, and conversation metrics.",
|
|
159
|
-
annotations: {
|
|
186
|
+
description: "Retrieve analytics and usage statistics for a specific bot, including message counts, response times, and conversation metrics.",
|
|
187
|
+
annotations: {
|
|
188
|
+
readOnlyHint: true,
|
|
189
|
+
destructiveHint: false,
|
|
190
|
+
idempotentHint: true,
|
|
191
|
+
openWorldHint: false,
|
|
192
|
+
},
|
|
160
193
|
inputSchema: z.object({
|
|
161
|
-
id: z.string().describe("
|
|
194
|
+
id: z.string().describe("Unique identifier (UUID) of the bot to retrieve analytics for"),
|
|
162
195
|
}),
|
|
163
196
|
}, async (params) => {
|
|
164
197
|
try {
|
|
@@ -172,12 +205,17 @@ export function registerBotTools(server) {
|
|
|
172
205
|
// Attach Knowledge Base
|
|
173
206
|
server.registerTool("neuron_attach_knowledge_base", {
|
|
174
207
|
title: "Attach Knowledge Base",
|
|
175
|
-
description: "Attach a knowledge base to a bot to enhance its responses with specific
|
|
176
|
-
annotations: {
|
|
208
|
+
description: "Attach a knowledge base to a bot to enhance its responses with domain-specific knowledge. Optional priority determines retrieval order when multiple knowledge bases are attached.",
|
|
209
|
+
annotations: {
|
|
210
|
+
readOnlyHint: false,
|
|
211
|
+
destructiveHint: false,
|
|
212
|
+
idempotentHint: false,
|
|
213
|
+
openWorldHint: false,
|
|
214
|
+
},
|
|
177
215
|
inputSchema: z.object({
|
|
178
|
-
id: z.string().describe("
|
|
179
|
-
knowledgeBaseId: z.string().describe("
|
|
180
|
-
priority: z.number().optional().describe("
|
|
216
|
+
id: z.string().describe("Unique identifier (UUID) of the bot"),
|
|
217
|
+
knowledgeBaseId: z.string().describe("Unique identifier (UUID) of the knowledge base to attach"),
|
|
218
|
+
priority: z.number().optional().describe("Priority level for knowledge base retrieval (higher values are checked first)"),
|
|
181
219
|
}),
|
|
182
220
|
}, async (params) => {
|
|
183
221
|
try {
|
|
@@ -192,10 +230,15 @@ export function registerBotTools(server) {
|
|
|
192
230
|
// List Bot Knowledge Bases
|
|
193
231
|
server.registerTool("neuron_list_bot_knowledge_bases", {
|
|
194
232
|
title: "List Bot Knowledge Bases",
|
|
195
|
-
description: "Retrieve all knowledge bases attached to a specific bot
|
|
196
|
-
annotations: {
|
|
233
|
+
description: "Retrieve all knowledge bases attached to a specific bot, including their priorities and metadata.",
|
|
234
|
+
annotations: {
|
|
235
|
+
readOnlyHint: true,
|
|
236
|
+
destructiveHint: false,
|
|
237
|
+
idempotentHint: true,
|
|
238
|
+
openWorldHint: false,
|
|
239
|
+
},
|
|
197
240
|
inputSchema: z.object({
|
|
198
|
-
id: z.string().describe("
|
|
241
|
+
id: z.string().describe("Unique identifier (UUID) of the bot"),
|
|
199
242
|
}),
|
|
200
243
|
}, async (params) => {
|
|
201
244
|
try {
|
|
@@ -209,11 +252,16 @@ export function registerBotTools(server) {
|
|
|
209
252
|
// Detach Knowledge Base
|
|
210
253
|
server.registerTool("neuron_detach_knowledge_base", {
|
|
211
254
|
title: "Detach Knowledge Base",
|
|
212
|
-
description: "Remove a knowledge base from a bot. The bot will no longer
|
|
213
|
-
annotations: {
|
|
255
|
+
description: "Remove a knowledge base from a bot. The bot will no longer reference this knowledge base when generating responses.",
|
|
256
|
+
annotations: {
|
|
257
|
+
readOnlyHint: false,
|
|
258
|
+
destructiveHint: true,
|
|
259
|
+
idempotentHint: true,
|
|
260
|
+
openWorldHint: false,
|
|
261
|
+
},
|
|
214
262
|
inputSchema: z.object({
|
|
215
|
-
id: z.string().describe("
|
|
216
|
-
kbId: z.string().describe("
|
|
263
|
+
id: z.string().describe("Unique identifier (UUID) of the bot"),
|
|
264
|
+
kbId: z.string().describe("Unique identifier (UUID) of the knowledge base to detach"),
|
|
217
265
|
}),
|
|
218
266
|
}, async (params) => {
|
|
219
267
|
try {
|
package/dist/tools/bots.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bots.js","sourceRoot":"","sources":["../../src/tools/bots.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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AC;KACH,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;QACf,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,KAAK,EAAE,QAAQ,MAAM,CAAC,EAAE,kBAAkB,CAAC,CAAC;YACrE,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;QAC5B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC,CACF,CAAC;IAEF,wBAAwB;IACxB,MAAM,CAAC,YAAY,CACjB,8BAA8B,EAC9B;QACE,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EAAE,qHAAqH;QAClI,WAAW,EAAE;YACX,YAAY,EAAE,KAAK;YACnB,eAAe,EAAE,IAAI;YACrB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,KAAK;SACrB;QACD,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACpB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;YAC9D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0DAA0D,CAAC;SACtF,CAAC;KACH,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;QACf,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,QAAQ,EAAE,QAAQ,MAAM,CAAC,EAAE,oBAAoB,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;YACvF,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;QAC5B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/dist/tools/broadcasts.js
CHANGED
|
@@ -4,13 +4,18 @@ export function registerBroadcastsTools(server) {
|
|
|
4
4
|
// List broadcasts
|
|
5
5
|
server.registerTool("neuron_list_broadcasts", {
|
|
6
6
|
title: "List Broadcasts",
|
|
7
|
-
description: "
|
|
7
|
+
description: "Retrieve a paginated list of all broadcasts with optional filtering by status such as draft, sent, or scheduled.",
|
|
8
8
|
inputSchema: z.object({
|
|
9
9
|
status: z.string().optional().describe("Filter by broadcast status (e.g., 'draft', 'sent', 'scheduled')"),
|
|
10
|
-
page: z.number().int().positive().optional().describe("Page number for pagination"),
|
|
11
|
-
limit: z.number().int().positive().optional().describe("Number of broadcasts per page"),
|
|
10
|
+
page: z.number().int().positive().optional().describe("Page number for pagination (default: 1)"),
|
|
11
|
+
limit: z.number().int().positive().optional().describe("Number of broadcasts per page (default: 20)"),
|
|
12
12
|
}),
|
|
13
|
-
annotations: {
|
|
13
|
+
annotations: {
|
|
14
|
+
readOnlyHint: true,
|
|
15
|
+
destructiveHint: false,
|
|
16
|
+
idempotentHint: true,
|
|
17
|
+
openWorldHint: false,
|
|
18
|
+
},
|
|
14
19
|
}, async (params) => {
|
|
15
20
|
try {
|
|
16
21
|
const result = await api("GET", "/broadcasts", undefined, {
|
|
@@ -27,26 +32,34 @@ export function registerBroadcastsTools(server) {
|
|
|
27
32
|
// Create broadcast
|
|
28
33
|
server.registerTool("neuron_create_broadcast", {
|
|
29
34
|
title: "Create Broadcast",
|
|
30
|
-
description: "Create a new broadcast message. Provide recipients directly
|
|
35
|
+
description: "Create a new broadcast message in draft status. Provide recipients directly or use recipientSources to resolve from contact lists. The WhatsApp channel is auto-resolved if not specified.",
|
|
31
36
|
inputSchema: z.object({
|
|
32
|
-
channelId: z.string().optional().describe("
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
channelId: z.string().optional().describe("Identifier (UUID) of the WhatsApp channel to send through (auto-resolved from default channel if omitted)"),
|
|
38
|
+
botId: z.string().optional().describe("Identifier (UUID) of a bot to send through. Each recipient's channel is picked by the bot's load-balancer + sticky sessions. Takes precedence over channelId."),
|
|
39
|
+
name: z.string().describe("Display name or label for the broadcast"),
|
|
40
|
+
message: z.string().describe("Message content to broadcast to recipients"),
|
|
41
|
+
messageType: z.string().optional().describe("Type of message to send (e.g., 'text', 'image', 'document')"),
|
|
42
|
+
mediaUrl: z.string().optional().describe("URL of media to attach (required for image or document message types)"),
|
|
37
43
|
recipients: z.array(z.object({
|
|
38
|
-
phone: z.string().describe("Recipient phone number"),
|
|
39
|
-
contactName: z.string().optional().describe("
|
|
44
|
+
phone: z.string().describe("Recipient phone number in E.164 format (e.g., '+2348012345678')"),
|
|
45
|
+
contactName: z.string().optional().describe("Display name of the recipient contact"),
|
|
40
46
|
})).optional().describe("Direct list of recipients (alternative to recipientSources)"),
|
|
41
47
|
recipientSources: z.object({
|
|
42
|
-
listIds: z.array(z.string()).optional().describe("Contact list
|
|
43
|
-
phones: z.array(z.string()).optional().describe("Individual phone numbers to include"),
|
|
48
|
+
listIds: z.array(z.string()).optional().describe("Contact list identifiers (UUIDs or slugs) to include as recipients"),
|
|
49
|
+
phones: z.array(z.string()).optional().describe("Individual phone numbers in E.164 format to include"),
|
|
44
50
|
filters: z.object({
|
|
45
|
-
tags: z.array(z.string()).optional().describe("Only include contacts
|
|
46
|
-
}).optional().describe("Additional filters to
|
|
47
|
-
excludeListIds: z.array(z.string()).optional().describe("Contact list
|
|
48
|
-
}).optional().describe("Resolve recipients from contact lists
|
|
51
|
+
tags: z.array(z.string()).optional().describe("Only include contacts matching these tags"),
|
|
52
|
+
}).optional().describe("Additional filters to narrow down recipients"),
|
|
53
|
+
excludeListIds: z.array(z.string()).optional().describe("Contact list identifiers (UUIDs or slugs) to exclude from recipients"),
|
|
54
|
+
}).optional().describe("Resolve recipients dynamically from contact lists with filtering and exclusion"),
|
|
55
|
+
scheduledAt: z.string().optional().describe("ISO 8601 date-time for scheduled broadcast delivery (e.g., '2025-12-31T10:00:00Z'). Creates as draft if omitted."),
|
|
49
56
|
}),
|
|
57
|
+
annotations: {
|
|
58
|
+
readOnlyHint: false,
|
|
59
|
+
destructiveHint: false,
|
|
60
|
+
idempotentHint: false,
|
|
61
|
+
openWorldHint: false,
|
|
62
|
+
},
|
|
50
63
|
}, async (params) => {
|
|
51
64
|
try {
|
|
52
65
|
const result = await api("POST", "/broadcasts", params);
|
|
@@ -59,11 +72,16 @@ export function registerBroadcastsTools(server) {
|
|
|
59
72
|
// Get broadcast
|
|
60
73
|
server.registerTool("neuron_get_broadcast", {
|
|
61
74
|
title: "Get Broadcast",
|
|
62
|
-
description: "
|
|
75
|
+
description: "Retrieve detailed information about a specific broadcast, including its status, message content, and recipient summary.",
|
|
63
76
|
inputSchema: z.object({
|
|
64
|
-
id: z.string().describe("
|
|
77
|
+
id: z.string().describe("Unique identifier (UUID) of the broadcast to retrieve"),
|
|
65
78
|
}),
|
|
66
|
-
annotations: {
|
|
79
|
+
annotations: {
|
|
80
|
+
readOnlyHint: true,
|
|
81
|
+
destructiveHint: false,
|
|
82
|
+
idempotentHint: true,
|
|
83
|
+
openWorldHint: false,
|
|
84
|
+
},
|
|
67
85
|
}, async (params) => {
|
|
68
86
|
try {
|
|
69
87
|
const result = await api("GET", `/broadcasts/${params.id}`);
|
|
@@ -76,14 +94,19 @@ export function registerBroadcastsTools(server) {
|
|
|
76
94
|
// Get broadcast recipients
|
|
77
95
|
server.registerTool("neuron_get_broadcast_recipients", {
|
|
78
96
|
title: "Get Broadcast Recipients",
|
|
79
|
-
description: "
|
|
97
|
+
description: "Retrieve the paginated list of recipients for a specific broadcast with their individual delivery status.",
|
|
80
98
|
inputSchema: z.object({
|
|
81
|
-
id: z.string().describe("
|
|
82
|
-
status: z.string().optional().describe("Filter by
|
|
83
|
-
page: z.number().int().positive().optional().describe("Page number for pagination"),
|
|
84
|
-
limit: z.number().int().positive().optional().describe("Number of recipients per page"),
|
|
99
|
+
id: z.string().describe("Unique identifier (UUID) of the broadcast"),
|
|
100
|
+
status: z.string().optional().describe("Filter recipients by delivery status (e.g., 'delivered', 'failed', 'pending')"),
|
|
101
|
+
page: z.number().int().positive().optional().describe("Page number for pagination (default: 1)"),
|
|
102
|
+
limit: z.number().int().positive().optional().describe("Number of recipients per page (default: 20)"),
|
|
85
103
|
}),
|
|
86
|
-
annotations: {
|
|
104
|
+
annotations: {
|
|
105
|
+
readOnlyHint: true,
|
|
106
|
+
destructiveHint: false,
|
|
107
|
+
idempotentHint: true,
|
|
108
|
+
openWorldHint: false,
|
|
109
|
+
},
|
|
87
110
|
}, async (params) => {
|
|
88
111
|
try {
|
|
89
112
|
const { id, ...query } = params;
|
|
@@ -101,14 +124,20 @@ export function registerBroadcastsTools(server) {
|
|
|
101
124
|
// Update broadcast
|
|
102
125
|
server.registerTool("neuron_update_broadcast", {
|
|
103
126
|
title: "Update Broadcast",
|
|
104
|
-
description: "Update an existing broadcast's
|
|
127
|
+
description: "Update an existing broadcast's name, message content, or media before sending. The broadcast must still be in draft status.",
|
|
105
128
|
inputSchema: z.object({
|
|
106
|
-
id: z.string().describe("
|
|
107
|
-
name: z.string().optional().describe("New name for the broadcast"),
|
|
108
|
-
message: z.string().optional().describe("New message content"),
|
|
109
|
-
messageType: z.string().optional().describe("New message type"),
|
|
110
|
-
mediaUrl: z.string().optional().describe("New media URL"),
|
|
129
|
+
id: z.string().describe("Unique identifier (UUID) of the broadcast to update"),
|
|
130
|
+
name: z.string().optional().describe("New display name or label for the broadcast"),
|
|
131
|
+
message: z.string().optional().describe("New message content to broadcast"),
|
|
132
|
+
messageType: z.string().optional().describe("New message type (e.g., 'text', 'image', 'document')"),
|
|
133
|
+
mediaUrl: z.string().optional().describe("New media URL to attach"),
|
|
111
134
|
}),
|
|
135
|
+
annotations: {
|
|
136
|
+
readOnlyHint: false,
|
|
137
|
+
destructiveHint: false,
|
|
138
|
+
idempotentHint: true,
|
|
139
|
+
openWorldHint: false,
|
|
140
|
+
},
|
|
112
141
|
}, async (params) => {
|
|
113
142
|
try {
|
|
114
143
|
const { id, ...body } = params;
|
|
@@ -122,11 +151,16 @@ export function registerBroadcastsTools(server) {
|
|
|
122
151
|
// Delete broadcast
|
|
123
152
|
server.registerTool("neuron_delete_broadcast", {
|
|
124
153
|
title: "Delete Broadcast",
|
|
125
|
-
description: "
|
|
154
|
+
description: "Permanently delete a broadcast and its recipient data. This action cannot be undone.",
|
|
126
155
|
inputSchema: z.object({
|
|
127
|
-
id: z.string().describe("
|
|
156
|
+
id: z.string().describe("Unique identifier (UUID) of the broadcast to delete"),
|
|
128
157
|
}),
|
|
129
|
-
annotations: {
|
|
158
|
+
annotations: {
|
|
159
|
+
readOnlyHint: false,
|
|
160
|
+
destructiveHint: true,
|
|
161
|
+
idempotentHint: true,
|
|
162
|
+
openWorldHint: false,
|
|
163
|
+
},
|
|
130
164
|
}, async (params) => {
|
|
131
165
|
try {
|
|
132
166
|
const result = await api("DELETE", `/broadcasts/${params.id}`);
|
|
@@ -139,10 +173,16 @@ export function registerBroadcastsTools(server) {
|
|
|
139
173
|
// Send broadcast
|
|
140
174
|
server.registerTool("neuron_send_broadcast", {
|
|
141
175
|
title: "Send Broadcast",
|
|
142
|
-
description: "Send a broadcast to all its recipients. The broadcast must be in draft status.",
|
|
176
|
+
description: "Send a broadcast message to all its recipients. The broadcast must be in draft status. This triggers message delivery and cannot be undone.",
|
|
143
177
|
inputSchema: z.object({
|
|
144
|
-
id: z.string().describe("
|
|
178
|
+
id: z.string().describe("Unique identifier (UUID) of the broadcast to send"),
|
|
145
179
|
}),
|
|
180
|
+
annotations: {
|
|
181
|
+
readOnlyHint: false,
|
|
182
|
+
destructiveHint: false,
|
|
183
|
+
idempotentHint: false,
|
|
184
|
+
openWorldHint: false,
|
|
185
|
+
},
|
|
146
186
|
}, async (params) => {
|
|
147
187
|
try {
|
|
148
188
|
const result = await api("POST", `/broadcasts/${params.id}/send`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"broadcasts.js","sourceRoot":"","sources":["../../src/tools/broadcasts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EA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,WAAW,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC,CACF,CAAC;IAEF,iBAAiB;IACjB,MAAM,CAAC,YAAY,CACjB,uBAAuB,EACvB;QACE,KAAK,EAAE,gBAAgB;QACvB,WAAW,EAAE,6IAA6I;QAC1J,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACpB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mDAAmD,CAAC;SAC7E,CAAC;QACF,WAAW,EAAE;YACX,YAAY,EAAE,KAAK;YACnB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,KAAK;YACrB,aAAa,EAAE,KAAK;SACrB;KACF,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;QACf,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE,eAAe,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC;YAClE,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;QAC5B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -7,14 +7,16 @@ export function registerBuiltinToolsTools(server) {
|
|
|
7
7
|
// 1. List Built-in Tools
|
|
8
8
|
server.registerTool("neuron_list_builtin_tools", {
|
|
9
9
|
title: "List Built-in Tools",
|
|
10
|
-
description: "
|
|
10
|
+
description: "Retrieve all available built-in tools with their enabled/disabled status for a specific bot. " +
|
|
11
11
|
"Built-in tools include WhatsApp actions (send messages, delete messages, post status), " +
|
|
12
12
|
"utility functions (web search, QR codes, weather), scheduling, knowledge base search, and more.",
|
|
13
13
|
inputSchema: z.object({
|
|
14
|
-
botId: z.string().describe("
|
|
14
|
+
botId: z.string().describe("Unique identifier (UUID) of the bot to list built-in tools for"),
|
|
15
15
|
}),
|
|
16
16
|
annotations: {
|
|
17
17
|
readOnlyHint: true,
|
|
18
|
+
destructiveHint: false,
|
|
19
|
+
idempotentHint: true,
|
|
18
20
|
openWorldHint: true,
|
|
19
21
|
},
|
|
20
22
|
}, async (args) => {
|
|
@@ -29,15 +31,18 @@ export function registerBuiltinToolsTools(server) {
|
|
|
29
31
|
// 2. Toggle Built-in Tool
|
|
30
32
|
server.registerTool("neuron_toggle_builtin_tool", {
|
|
31
33
|
title: "Toggle Built-in Tool",
|
|
32
|
-
description: "
|
|
34
|
+
description: "Toggle a built-in tool on or off for a specific bot. Enabled tools become available in the bot's conversations. " +
|
|
33
35
|
"Example tool IDs: delete_message, post_to_channel, post_status, web_search, " +
|
|
34
|
-
"send_direct_message, react_to_message, set_reminder, create_poll
|
|
36
|
+
"send_direct_message, react_to_message, set_reminder, create_poll.",
|
|
35
37
|
inputSchema: z.object({
|
|
36
|
-
botId: z.string().describe("
|
|
37
|
-
toolId: z.string().describe("
|
|
38
|
+
botId: z.string().describe("Unique identifier (UUID) of the bot to toggle the tool for"),
|
|
39
|
+
toolId: z.string().describe("Identifier of the built-in tool (e.g., 'delete_message', 'post_status', 'web_search')"),
|
|
38
40
|
enabled: z.boolean().describe("Whether to enable (true) or disable (false) the tool"),
|
|
39
41
|
}),
|
|
40
42
|
annotations: {
|
|
43
|
+
readOnlyHint: false,
|
|
44
|
+
destructiveHint: false,
|
|
45
|
+
idempotentHint: true,
|
|
41
46
|
openWorldHint: true,
|
|
42
47
|
},
|
|
43
48
|
}, async (args) => {
|
|
@@ -53,18 +58,20 @@ export function registerBuiltinToolsTools(server) {
|
|
|
53
58
|
// 3. Bulk Toggle Built-in Tools
|
|
54
59
|
server.registerTool("neuron_bulk_toggle_builtin_tools", {
|
|
55
60
|
title: "Bulk Toggle Built-in Tools",
|
|
56
|
-
description: "Enable or disable multiple built-in tools at once for a bot. "
|
|
57
|
-
"Pass an array of { toolId, enabled } settings.",
|
|
61
|
+
description: "Enable or disable multiple built-in tools at once for a bot. More efficient than toggling tools individually.",
|
|
58
62
|
inputSchema: z.object({
|
|
59
|
-
botId: z.string().describe("
|
|
63
|
+
botId: z.string().describe("Unique identifier (UUID) of the bot to update tools for"),
|
|
60
64
|
settings: z
|
|
61
65
|
.array(z.object({
|
|
62
|
-
toolId: z.string().describe("
|
|
63
|
-
enabled: z.boolean().describe("Whether to enable or disable"),
|
|
66
|
+
toolId: z.string().describe("Identifier of the built-in tool (e.g., 'web_search', 'send_direct_message')"),
|
|
67
|
+
enabled: z.boolean().describe("Whether to enable (true) or disable (false) this tool"),
|
|
64
68
|
}))
|
|
65
|
-
.describe("Array of tool settings to apply"),
|
|
69
|
+
.describe("Array of tool toggle settings to apply in bulk"),
|
|
66
70
|
}),
|
|
67
71
|
annotations: {
|
|
72
|
+
readOnlyHint: false,
|
|
73
|
+
destructiveHint: false,
|
|
74
|
+
idempotentHint: true,
|
|
68
75
|
openWorldHint: true,
|
|
69
76
|
},
|
|
70
77
|
}, async (args) => {
|