@agifyai/leadify-mcp 3.2.0 → 3.3.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/dist/server.js +1 -1
- package/dist/tools/pipeline.js +18 -10
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -16,7 +16,7 @@ import { registerPipelineTools } from "./tools/pipeline.js";
|
|
|
16
16
|
export function createServer() {
|
|
17
17
|
const server = new McpServer({
|
|
18
18
|
name: "leadify",
|
|
19
|
-
version: "
|
|
19
|
+
version: "3.3.0",
|
|
20
20
|
});
|
|
21
21
|
registerAuthTools(server);
|
|
22
22
|
registerOrganizationTools(server);
|
package/dist/tools/pipeline.js
CHANGED
|
@@ -15,10 +15,11 @@ export function registerPipelineTools(server) {
|
|
|
15
15
|
"card_* sequence fields to lead.data). " +
|
|
16
16
|
"The 'force' flag (default false) bypasses the 'already has a message?' guard — " +
|
|
17
17
|
"useful for re-generating on an already-processed lead. " +
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
18
|
+
"`campaign_id` is OPTIONAL: when omitted, the MCP sends no campaign hint to the backend " +
|
|
19
|
+
"(useful for dry-runs, smoke tests, or skill flows that want to skip the pilot-pinning). " +
|
|
20
|
+
"When provided, it must be a pilot slug (e.g. 'agify-medtech-fr-v2') that matches a pilot " +
|
|
21
|
+
"file pair in the Trigger.dev repo (pilots/{campaign_id}.md + .json), paired to the lead's " +
|
|
22
|
+
"group. The writer hard-fails if the pilot is missing on a real run. " +
|
|
22
23
|
"The lead's `leadGroupId` is resolved server-side from the lead (one extra " +
|
|
23
24
|
"`get_lead` call); the caller only needs `lead_id`. " +
|
|
24
25
|
"The response is decorated with a Trigger.dev `traceUrl` deep-link when missing " +
|
|
@@ -27,9 +28,11 @@ export function registerPipelineTools(server) {
|
|
|
27
28
|
lead_id: z.string().describe("ID of the lead to generate a message for."),
|
|
28
29
|
campaign_id: z
|
|
29
30
|
.string()
|
|
30
|
-
.
|
|
31
|
-
"
|
|
32
|
-
"
|
|
31
|
+
.optional()
|
|
32
|
+
.describe("OPTIONAL pilot slug driving the copywriting (e.g. 'agify-medtech-fr-v2'). NOT a DB " +
|
|
33
|
+
"campaign id. Must match a pilot file pair in the Trigger.dev repo whose .json is " +
|
|
34
|
+
"paired to this lead's group. The writer hard-fails if the pilot is missing. " +
|
|
35
|
+
"Omit to skip the pilot-pinning (e.g. for dry-runs or smoke tests)."),
|
|
33
36
|
dryrun: z
|
|
34
37
|
.boolean()
|
|
35
38
|
.optional()
|
|
@@ -59,13 +62,18 @@ export function registerPipelineTools(server) {
|
|
|
59
62
|
`The lead was not found, or it has no groupId. ` +
|
|
60
63
|
`Check that the lead exists via get_lead.`);
|
|
61
64
|
}
|
|
62
|
-
const
|
|
65
|
+
const body = {
|
|
63
66
|
leadId: lead_id,
|
|
64
67
|
leadGroupId,
|
|
65
|
-
campaignId: campaign_id,
|
|
66
68
|
dryrun,
|
|
67
69
|
force,
|
|
68
|
-
}
|
|
70
|
+
};
|
|
71
|
+
// campaignId is optional: only include it when the caller passed one.
|
|
72
|
+
// Backend defaults are left to handle the omitted case.
|
|
73
|
+
if (campaign_id !== undefined) {
|
|
74
|
+
body.campaignId = campaign_id;
|
|
75
|
+
}
|
|
76
|
+
const data = (await getClient().post("/api/trigger-outreach", body));
|
|
69
77
|
// Decorate the response with a Trigger.dev run deep-link when the
|
|
70
78
|
// backend didn't ship one. Applies to BOTH success and failure paths
|
|
71
79
|
// so the skill operator can always jump to the trace.
|