@agifyai/leadify-mcp 3.6.0 → 3.6.2
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/client.d.ts +1 -0
- package/dist/client.js +6 -1
- package/dist/server.js +1 -1
- package/dist/tools/fine_tuning.js +8 -3
- package/dist/tools/pipeline.js +1 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export declare class LeadifyClient {
|
|
|
6
6
|
get(path: string, params?: URLSearchParams): Promise<unknown>;
|
|
7
7
|
post(path: string, body: unknown): Promise<unknown>;
|
|
8
8
|
put(path: string, body: unknown): Promise<unknown>;
|
|
9
|
+
patch(path: string, body: unknown): Promise<unknown>;
|
|
9
10
|
delete(path: string): Promise<unknown>;
|
|
10
11
|
}
|
|
11
12
|
export declare function getClient(): LeadifyClient;
|
package/dist/client.js
CHANGED
|
@@ -16,7 +16,8 @@ export class LeadifyClient {
|
|
|
16
16
|
Authorization: `Bearer ${this.apiKey}`,
|
|
17
17
|
};
|
|
18
18
|
const init = { method, headers };
|
|
19
|
-
if (body !== undefined &&
|
|
19
|
+
if (body !== undefined &&
|
|
20
|
+
(method === "POST" || method === "PUT" || method === "PATCH")) {
|
|
20
21
|
headers["Content-Type"] = "application/json";
|
|
21
22
|
init.body = JSON.stringify(body);
|
|
22
23
|
}
|
|
@@ -48,6 +49,10 @@ export class LeadifyClient {
|
|
|
48
49
|
const url = new URL(path, this.baseUrl);
|
|
49
50
|
return this.request("PUT", url, body);
|
|
50
51
|
}
|
|
52
|
+
async patch(path, body) {
|
|
53
|
+
const url = new URL(path, this.baseUrl);
|
|
54
|
+
return this.request("PATCH", url, body);
|
|
55
|
+
}
|
|
51
56
|
async delete(path) {
|
|
52
57
|
const url = new URL(path, this.baseUrl);
|
|
53
58
|
return this.request("DELETE", url);
|
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: "3.6.
|
|
19
|
+
version: "3.6.2",
|
|
20
20
|
});
|
|
21
21
|
registerAuthTools(server);
|
|
22
22
|
registerOrganizationTools(server);
|
|
@@ -57,21 +57,26 @@ export function registerFineTuningTools(server) {
|
|
|
57
57
|
"or examples). " +
|
|
58
58
|
"The 4 replaceable sections are: nonNegotiableRules, pitfalls, structure, examples. " +
|
|
59
59
|
"Languages (supportedLanguages, fallbackLanguage) are managed separately via the " +
|
|
60
|
-
"Fine Tuning UI or by a dedicated languages tool — this endpoint does not touch them."
|
|
60
|
+
"Fine Tuning UI or by a dedicated languages tool — this endpoint does not touch them. " +
|
|
61
|
+
"Wired to PATCH /api/lead-group/{id}/fine-tuning/section/{section} per the Leadify API " +
|
|
62
|
+
"contract: section is in the URL path (not the body), the request is a partial update " +
|
|
63
|
+
"(not a wholesale row replace — for that, fall back to the Leadify UI or a follow-up " +
|
|
64
|
+
"MCP tool, neither of which exists yet as of 3.6.1).", {
|
|
61
65
|
lead_group_id: z
|
|
62
66
|
.string()
|
|
63
67
|
.describe("ID of the lead group whose fine tuning section to overwrite."),
|
|
64
68
|
section: z
|
|
65
69
|
.enum(["nonNegotiableRules", "pitfalls", "structure", "examples"])
|
|
66
70
|
.describe("Which Fine Tuning section to replace. One of: " +
|
|
67
|
-
"nonNegotiableRules | pitfalls | structure | examples."
|
|
71
|
+
"nonNegotiableRules | pitfalls | structure | examples. " +
|
|
72
|
+
"Goes into the URL path as /section/{section} — not the request body."),
|
|
68
73
|
content: z
|
|
69
74
|
.string()
|
|
70
75
|
.describe("New content for the section (Markdown). The section is replaced WHOLESALE — " +
|
|
71
76
|
"any previous content is lost. Pass an empty string to clear the section."),
|
|
72
77
|
}, async ({ lead_group_id, section, content }) => {
|
|
73
78
|
try {
|
|
74
|
-
const data = await getClient().
|
|
79
|
+
const data = await getClient().patch(`/api/lead-group/${encodeURIComponent(lead_group_id)}/fine-tuning/section/${encodeURIComponent(section)}`, { content });
|
|
75
80
|
return toolResult({
|
|
76
81
|
...(data && typeof data === "object" ? data : {}),
|
|
77
82
|
_note: `Wholesale replace of section '${section}' for lead group ${lead_group_id}.`,
|
package/dist/tools/pipeline.js
CHANGED
|
@@ -21,7 +21,7 @@ export function registerPipelineTools(server) {
|
|
|
21
21
|
"`get_lead` call); the caller only needs `lead_id`. " +
|
|
22
22
|
"The response is decorated with a Trigger.dev `traceUrl` deep-link when missing " +
|
|
23
23
|
"(https://cloud.trigger.dev/runs/{runId}), so you can always jump to the trace. " +
|
|
24
|
-
"Waits up to
|
|
24
|
+
"Waits up to 300s for the remote agent to complete.", {
|
|
25
25
|
lead_id: z.string().describe("ID of the lead to generate a message for."),
|
|
26
26
|
dryrun: z
|
|
27
27
|
.boolean()
|