@agifyai/leadify-mcp 8.6.10 → 8.6.11
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/README.md +1 -1
- package/dist/tools/campaigns.js +35 -30
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -255,7 +255,7 @@ Leadify et ne doit jamais être envoyée par un agent MCP.
|
|
|
255
255
|
| `delete_campaign_log` | Supprimer une entrée de log de campagne. |
|
|
256
256
|
| `update_campaign_stats` | Mettre à jour les statistiques d'email d'une campagne pour un groupe de leads. |
|
|
257
257
|
| `create_campaign` | Créer une campagne DRAFT mono-canal rattachée à un Lead Group qui possède déjà sa paire Persona–Offre. Aucun `persona_id` ou contexte indépendant n’est accepté au niveau Campagne. `channel` (`LINKEDIN` ou `EMAIL`) est obligatoire ; `start_at` inclusif, `end_at` exclusif et `timezone` IANA configurent la fenêtre métier. À `end_at`, Leadify met la campagne en pause réversible (`WINDOW_END`) sans la clôturer. |
|
|
258
|
-
| `update_campaign_configuration` | Modifier le nom, la description et la fenêtre de toute campagne encore `OPEN`; le canal reste modifiable uniquement en DRAFT. Prolonger `end_at` dans le futur ou le supprimer relance automatiquement une pause `WINDOW_END` après validation du fournisseur, mais jamais une pause manuelle. La fenêtre demandée reste enregistrée si cette validation échoue. La Persona est héritée du Lead Group et n’est pas modifiable au niveau Campagne. |
|
|
258
|
+
| `update_campaign` / `update_campaign_configuration` | Modifier le nom, la description et la fenêtre de toute campagne encore `OPEN`; le canal reste modifiable uniquement en DRAFT. Prolonger `end_at` dans le futur ou le supprimer relance automatiquement une pause `WINDOW_END` après validation du fournisseur, mais jamais une pause manuelle. La fenêtre demandée reste enregistrée si cette validation échoue. La Persona est héritée du Lead Group et n’est pas modifiable au niveau Campagne. |
|
|
259
259
|
| `delete_campaign` | Supprimer irréversiblement une campagne `DRAFT` ou `PAUSED` encore `OPEN`, avec la confirmation explicite `delete_campaign`. Une campagne active ou clôturée est refusée, et aucun envoi n’est déclenché. |
|
|
260
260
|
| `list_campaigns` | Lister compactement les campagnes d'une organisation explicitement sélectionnée, avec état effectif, fenêtre, motif de pause et clôture. |
|
|
261
261
|
| `get_campaign` | Récupérer les détails d'une campagne, son état effectif, sa clôture et son éventuel rapport final figé, ainsi que ses KPIs temps réel. |
|
package/dist/tools/campaigns.js
CHANGED
|
@@ -130,39 +130,44 @@ export function registerCampaignTools(server, readClient, writeClient, mutationC
|
|
|
130
130
|
return handleToolError(error);
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
|
-
|
|
133
|
+
const registerCampaignUpdateTool = (name, description) => {
|
|
134
|
+
server.tool(name, description, {
|
|
135
|
+
id: z.string().describe("Campaign ID."),
|
|
136
|
+
channel: z.enum(["LINKEDIN", "EMAIL"]).optional().describe("Delivery channel; mutable only while status is DRAFT."),
|
|
137
|
+
start_at: z.string().datetime().nullable().optional().describe("Inclusive UTC start timestamp, or null to remove the lower bound."),
|
|
138
|
+
end_at: z.string().datetime().nullable().optional().describe("Exclusive UTC end timestamp, or null to remove the upper bound. A future value or null can auto-resume only a WINDOW_END pause."),
|
|
139
|
+
timezone: z.string().min(1).optional().describe("IANA timezone used for the business window, for example Europe/Paris."),
|
|
140
|
+
name: z.string().min(1).optional().describe("New campaign name."),
|
|
141
|
+
description: z.string().nullable().optional().describe("New campaign description, or null to clear it."),
|
|
142
|
+
}, async ({ id, channel, start_at, end_at, timezone, name, description }) => {
|
|
143
|
+
try {
|
|
144
|
+
const body = {};
|
|
145
|
+
if (channel !== undefined)
|
|
146
|
+
body.channel = channel;
|
|
147
|
+
if (start_at !== undefined)
|
|
148
|
+
body.startAt = start_at;
|
|
149
|
+
if (end_at !== undefined)
|
|
150
|
+
body.endAt = end_at;
|
|
151
|
+
if (timezone !== undefined)
|
|
152
|
+
body.timezone = timezone;
|
|
153
|
+
if (name !== undefined)
|
|
154
|
+
body.name = name;
|
|
155
|
+
if (description !== undefined)
|
|
156
|
+
body.description = description;
|
|
157
|
+
return toolResult(await (mutationClient ?? getClient()).put(`/api/campaign/${encodeURIComponent(id)}/configuration`, body));
|
|
158
|
+
}
|
|
159
|
+
catch (error) {
|
|
160
|
+
return handleToolError(error);
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
};
|
|
164
|
+
const updateCampaignDescription = "Edit the name, description, and lifecycle window of any OPEN campaign; changing channel remains limited to DRAFT. " +
|
|
134
165
|
"Extending endAt into the future or removing it automatically resumes only a campaign paused " +
|
|
135
166
|
"because WINDOW_END, after provider validation and immediate replanning. A MANUAL pause never " +
|
|
136
167
|
"auto-resumes. The requested window remains saved when provider validation fails, and a CLOSED " +
|
|
137
|
-
"campaign is terminal."
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
start_at: z.string().datetime().nullable().optional().describe("Inclusive UTC start timestamp, or null to remove the lower bound."),
|
|
141
|
-
end_at: z.string().datetime().nullable().optional().describe("Exclusive UTC end timestamp, or null to remove the upper bound. A future value or null can auto-resume only a WINDOW_END pause."),
|
|
142
|
-
timezone: z.string().min(1).optional().describe("IANA timezone used for the business window, for example Europe/Paris."),
|
|
143
|
-
name: z.string().min(1).optional().describe("New campaign name."),
|
|
144
|
-
description: z.string().nullable().optional().describe("New campaign description, or null to clear it."),
|
|
145
|
-
}, async ({ id, channel, start_at, end_at, timezone, name, description }) => {
|
|
146
|
-
try {
|
|
147
|
-
const body = {};
|
|
148
|
-
if (channel !== undefined)
|
|
149
|
-
body.channel = channel;
|
|
150
|
-
if (start_at !== undefined)
|
|
151
|
-
body.startAt = start_at;
|
|
152
|
-
if (end_at !== undefined)
|
|
153
|
-
body.endAt = end_at;
|
|
154
|
-
if (timezone !== undefined)
|
|
155
|
-
body.timezone = timezone;
|
|
156
|
-
if (name !== undefined)
|
|
157
|
-
body.name = name;
|
|
158
|
-
if (description !== undefined)
|
|
159
|
-
body.description = description;
|
|
160
|
-
return toolResult(await (mutationClient ?? getClient()).put(`/api/campaign/${encodeURIComponent(id)}/configuration`, body));
|
|
161
|
-
}
|
|
162
|
-
catch (error) {
|
|
163
|
-
return handleToolError(error);
|
|
164
|
-
}
|
|
165
|
-
});
|
|
168
|
+
"campaign is terminal. Persona is inherited from the Lead Group and cannot be changed here.";
|
|
169
|
+
registerCampaignUpdateTool("update_campaign", updateCampaignDescription);
|
|
170
|
+
registerCampaignUpdateTool("update_campaign_configuration", updateCampaignDescription);
|
|
166
171
|
server.tool("delete_campaign", "Irreversibly delete one OPEN campaign that is DRAFT or PAUSED. Active and permanently closed campaigns are refused. This operation never sends outreach. Always confirm with the user before calling this tool.", {
|
|
167
172
|
id: z.string().describe("Campaign ID."),
|
|
168
173
|
confirmation: z.literal("delete_campaign").describe("Exact acknowledgement required before deleting the campaign."),
|