@agifyai/leadify-mcp 8.6.3 → 8.6.5
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 +6 -0
- package/dist/client.js +13 -0
- package/dist/tools/context_entities.d.ts +32 -32
- package/dist/tools/personas.d.ts +2 -4
- package/dist/tools/personas.js +117 -1108
- package/dist/tools/schema.d.ts +1 -1
- package/dist/tools/schema.js +36 -0
- package/package.json +1 -1
package/dist/tools/schema.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import { type LeadifyClient } from "../client.js";
|
|
3
|
-
type SchemaClient = Pick<LeadifyClient, "get" | "post">;
|
|
3
|
+
type SchemaClient = Pick<LeadifyClient, "get" | "post" | "rpc">;
|
|
4
4
|
export declare function registerSchemaTools(server: McpServer, client?: SchemaClient): void;
|
|
5
5
|
export {};
|
package/dist/tools/schema.js
CHANGED
|
@@ -78,6 +78,42 @@ export function registerSchemaTools(server, client) {
|
|
|
78
78
|
return handleToolError(error);
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
|
+
// ── schema_migration_preview / apply_schema_migration ─────────────────
|
|
82
|
+
server.tool("schema_migration_preview", "Preview the exact hash-pinned schema migration required to make a lead group READY. " +
|
|
83
|
+
"This is read-only. Review the returned expectedSchemaHash, planHash, impacted leads and " +
|
|
84
|
+
"conversion actions before calling apply_schema_migration.", {
|
|
85
|
+
lead_group_id: z.string().describe("ID of the lead group to inspect."),
|
|
86
|
+
}, async ({ lead_group_id }) => {
|
|
87
|
+
try {
|
|
88
|
+
const data = await (client ?? getClient()).rpc("leadGroups/schemaMigrationPreview", { leadGroupId: lead_group_id });
|
|
89
|
+
return toolResult(data);
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
return handleToolError(error);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
server.tool("apply_schema_migration", "Apply a destructive schema migration only after schema_migration_preview has been read and " +
|
|
96
|
+
"the exact expected_schema_hash and expected_plan_hash have been supplied. This API performs " +
|
|
97
|
+
"its own optimistic hash checks. Use only for the reviewed lead group; reread its leads and " +
|
|
98
|
+
"schema readiness afterwards.", {
|
|
99
|
+
lead_group_id: z.string().describe("ID of the reviewed lead group."),
|
|
100
|
+
expected_schema_hash: z.string().regex(/^[a-f0-9]{64}$/).describe("expectedSchemaHash from the fresh preview."),
|
|
101
|
+
expected_plan_hash: z.string().regex(/^[a-f0-9]{64}$/).describe("planHash from the same fresh preview."),
|
|
102
|
+
confirmation: z.literal("apply_destructive_schema_migration").describe("Exact acknowledgement required by the server."),
|
|
103
|
+
}, async ({ lead_group_id, expected_schema_hash, expected_plan_hash, confirmation }) => {
|
|
104
|
+
try {
|
|
105
|
+
const data = await (client ?? getClient()).rpc("leadGroups/applySchemaMigration", {
|
|
106
|
+
leadGroupId: lead_group_id,
|
|
107
|
+
expectedSchemaHash: expected_schema_hash,
|
|
108
|
+
expectedPlanHash: expected_plan_hash,
|
|
109
|
+
confirmation,
|
|
110
|
+
});
|
|
111
|
+
return toolResult(data);
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
return handleToolError(error);
|
|
115
|
+
}
|
|
116
|
+
});
|
|
81
117
|
// ── delete_columns ─────────────────────────────────────────────────────
|
|
82
118
|
server.tool("delete_columns", "Remove one or more columns (fields) from a lead group's schema and all lead data " +
|
|
83
119
|
"stored in those fields. This action is irreversible — field definitions and values " +
|