@helm-ai/mcp-server 0.1.10 → 0.2.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/README.md +101 -17
- package/dist/index.js +856 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
|
4
4
|
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
5
5
|
// Get configuration from environment variables
|
|
6
6
|
const HELM_API_KEY = process.env.HELM_API_KEY;
|
|
7
|
-
const HELM_API_URL = process.env.HELM_API_URL || "https://
|
|
7
|
+
const HELM_API_URL = process.env.HELM_API_URL || "https://api.gethelm.ai/functions/v1";
|
|
8
8
|
const SUPABASE_ANON_KEY = process.env.SUPABASE_ANON_KEY || "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJldmhucXd4b3ZvZmRnd292bG9xIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Mzk4Mjg1ODEsImV4cCI6MjA1NTQwNDU4MX0.xePlF-hXLpS3I7jKDm5zLDxnff2-rN23lL5hfXiWmtw";
|
|
9
9
|
const HELM_DEFAULT_PROJECT_ID = process.env.HELM_DEFAULT_PROJECT_ID;
|
|
10
10
|
if (!HELM_API_KEY) {
|
|
@@ -40,13 +40,23 @@ async function helmApiRequest(action, method = "GET", body) {
|
|
|
40
40
|
return data;
|
|
41
41
|
}
|
|
42
42
|
const TOOL_MODULES = {
|
|
43
|
+
helm__get_workflows: 'workflows', helm__get_workflow: 'workflows', helm__get_workflow_executions: 'workflows',
|
|
44
|
+
helm__create_workflow: 'workflows', helm__update_workflow: 'workflows', helm__delete_workflow: 'workflows',
|
|
45
|
+
helm__set_workflow_status: 'workflows', helm__execute_workflow: 'workflows',
|
|
46
|
+
helm__list_email_sequences: 'sequences', helm__get_sequence: 'sequences', helm__list_sequence_enrollments: 'sequences', helm__enroll_in_sequence: 'sequences',
|
|
47
|
+
helm__create_email_sequence: 'sequences', helm__create_sequence_email: 'sequences',
|
|
43
48
|
helm__get_accounts: 'contacts', helm__get_account: 'contacts', helm__add_account: 'contacts', helm__update_account: 'contacts',
|
|
44
|
-
helm__get_contacts: 'contacts', helm__get_contact: 'contacts', helm__add_contact: 'contacts', helm__update_contact: 'contacts',
|
|
49
|
+
helm__get_contacts: 'contacts', helm__get_contact: 'contacts', helm__add_contact: 'contacts', helm__update_contact: 'contacts', helm__delete_contact: 'contacts',
|
|
45
50
|
helm__get_deals: 'deals', helm__get_deal: 'deals', helm__add_deal: 'deals', helm__update_deal: 'deals', helm__delete_deal: 'deals',
|
|
51
|
+
helm__attach_product_to_deal: 'deals',
|
|
52
|
+
helm__list_account_products: 'contacts', helm__attach_product_to_account: 'contacts',
|
|
53
|
+
helm__update_account_product: 'contacts', helm__detach_product_from_account: 'contacts',
|
|
46
54
|
helm__get_invoices: 'invoices', helm__get_invoice: 'invoices', helm__create_invoice: 'invoices', helm__update_invoice: 'invoices',
|
|
47
55
|
helm__get_estimates: 'estimates', helm__create_estimate: 'estimates',
|
|
48
56
|
helm__get_time_entries: 'timesheets', helm__create_time_entry: 'timesheets',
|
|
49
57
|
helm__get_agent_schedules: 'ai_agents', helm__create_agent_schedule: 'ai_agents', helm__update_agent_schedule: 'ai_agents', helm__delete_agent_schedule: 'ai_agents',
|
|
58
|
+
// helm__list_products / get_product / create_product remain core (always-available — no `products` module yet)
|
|
59
|
+
// helm__add_line_item_from_product gates via the invoice OR estimate module — checked at the edge function layer
|
|
50
60
|
};
|
|
51
61
|
// Cache workspace module settings (refreshed on each ListTools call)
|
|
52
62
|
let cachedModules = null;
|
|
@@ -144,6 +154,20 @@ const tools = [
|
|
|
144
154
|
items: { type: "string" },
|
|
145
155
|
description: "Array of user IDs to assign to this task (max 5)",
|
|
146
156
|
},
|
|
157
|
+
attachments: {
|
|
158
|
+
type: "array",
|
|
159
|
+
description: "Files to attach to the task. Upload each file first with helm__upload_attachment, then pass the returned objects here. Max 20.",
|
|
160
|
+
items: {
|
|
161
|
+
type: "object",
|
|
162
|
+
properties: {
|
|
163
|
+
url: { type: "string", description: "Public URL returned by helm__upload_attachment" },
|
|
164
|
+
filename: { type: "string", description: "Display filename" },
|
|
165
|
+
size: { type: "number", description: "File size in bytes" },
|
|
166
|
+
content_type: { type: "string", description: "MIME type (e.g. application/pdf)" },
|
|
167
|
+
},
|
|
168
|
+
required: ["url", "filename"],
|
|
169
|
+
},
|
|
170
|
+
},
|
|
147
171
|
},
|
|
148
172
|
required: ["title"],
|
|
149
173
|
},
|
|
@@ -245,7 +269,7 @@ const tools = [
|
|
|
245
269
|
},
|
|
246
270
|
{
|
|
247
271
|
name: "helm__add_task_comment",
|
|
248
|
-
description: "Add a comment to a task.",
|
|
272
|
+
description: "Add a comment to a task. To attach files, upload each with helm__upload_attachment first, then pass the returned objects in `attachments`.",
|
|
249
273
|
inputSchema: {
|
|
250
274
|
type: "object",
|
|
251
275
|
properties: {
|
|
@@ -257,10 +281,46 @@ const tools = [
|
|
|
257
281
|
type: "string",
|
|
258
282
|
description: "The comment content",
|
|
259
283
|
},
|
|
284
|
+
attachments: {
|
|
285
|
+
type: "array",
|
|
286
|
+
description: "Files to attach to the comment. Upload each file first with helm__upload_attachment, then pass the returned objects here. Max 20.",
|
|
287
|
+
items: {
|
|
288
|
+
type: "object",
|
|
289
|
+
properties: {
|
|
290
|
+
url: { type: "string", description: "Public URL returned by helm__upload_attachment" },
|
|
291
|
+
filename: { type: "string", description: "Display filename" },
|
|
292
|
+
size: { type: "number", description: "File size in bytes" },
|
|
293
|
+
content_type: { type: "string", description: "MIME type (e.g. application/pdf)" },
|
|
294
|
+
},
|
|
295
|
+
required: ["url", "filename"],
|
|
296
|
+
},
|
|
297
|
+
},
|
|
260
298
|
},
|
|
261
299
|
required: ["task_id", "content"],
|
|
262
300
|
},
|
|
263
301
|
},
|
|
302
|
+
{
|
|
303
|
+
name: "helm__upload_attachment",
|
|
304
|
+
description: "Upload a file so it can be attached to a task or task comment. Returns an attachment object { url, filename, size, content_type } — pass it in the `attachments` array of helm__add_task or helm__add_task_comment. Provide the file as base64. Max 25MB.",
|
|
305
|
+
inputSchema: {
|
|
306
|
+
type: "object",
|
|
307
|
+
properties: {
|
|
308
|
+
filename: {
|
|
309
|
+
type: "string",
|
|
310
|
+
description: "Filename including extension, e.g. 'report.pdf'",
|
|
311
|
+
},
|
|
312
|
+
content_type: {
|
|
313
|
+
type: "string",
|
|
314
|
+
description: "MIME type, e.g. 'application/pdf', 'image/png'. Defaults to application/octet-stream.",
|
|
315
|
+
},
|
|
316
|
+
data_base64: {
|
|
317
|
+
type: "string",
|
|
318
|
+
description: "The file contents, base64-encoded (a 'data:' URL is also accepted).",
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
required: ["filename", "data_base64"],
|
|
322
|
+
},
|
|
323
|
+
},
|
|
264
324
|
{
|
|
265
325
|
name: "helm__create_document",
|
|
266
326
|
description: "Create a new document in Helm. Documents can optionally be linked to a project.",
|
|
@@ -693,6 +753,335 @@ const tools = [
|
|
|
693
753
|
required: [],
|
|
694
754
|
},
|
|
695
755
|
},
|
|
756
|
+
// Product tools
|
|
757
|
+
{
|
|
758
|
+
name: "helm__list_products",
|
|
759
|
+
description: "List products in the workspace catalog (what you sell). Use to find a product before pricing a deal or adding it to an invoice/estimate line item.",
|
|
760
|
+
inputSchema: {
|
|
761
|
+
type: "object",
|
|
762
|
+
properties: {
|
|
763
|
+
active_only: { type: "boolean", description: "Excludes archived products when true (default true)." },
|
|
764
|
+
category: { type: "string", description: "Filter by category (free-text bucket, e.g. 'Plugin', 'SEO')." },
|
|
765
|
+
billing_interval: { type: "string", enum: ["day", "week", "month", "year", "one_time"], description: "Filter by billing model. 'one_time' returns products with no billing_interval; otherwise returns recurring products at that cadence." },
|
|
766
|
+
limit: { type: "number", description: "Max products to return (default 100)." },
|
|
767
|
+
},
|
|
768
|
+
required: [],
|
|
769
|
+
},
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
name: "helm__get_product",
|
|
773
|
+
description: "Get a product by id or fuzzy name match.",
|
|
774
|
+
inputSchema: {
|
|
775
|
+
type: "object",
|
|
776
|
+
properties: {
|
|
777
|
+
product_id: { type: "string", description: "UUID of the product (preferred when known)." },
|
|
778
|
+
name: { type: "string", description: "Fuzzy name match." },
|
|
779
|
+
},
|
|
780
|
+
required: [],
|
|
781
|
+
},
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
name: "helm__create_product",
|
|
785
|
+
description: "Create a new product in the workspace catalog. Confirm with the user before adding unless explicitly requested.",
|
|
786
|
+
inputSchema: {
|
|
787
|
+
type: "object",
|
|
788
|
+
properties: {
|
|
789
|
+
name: { type: "string", description: "Display name, e.g. 'SEO Retainer'." },
|
|
790
|
+
description: { type: "string", description: "Short description; used as the default line-item text." },
|
|
791
|
+
category: { type: "string", description: "Free-text category, e.g. 'Plugin'." },
|
|
792
|
+
billing_interval: { type: "string", enum: ["day", "week", "month", "year"], description: "Set for recurring products. Omit for one-time." },
|
|
793
|
+
default_rate: { type: "number", description: "Default price." },
|
|
794
|
+
unit: { type: "string", enum: ["hour", "day", "week", "month", "project", "unit", "license", "seat", "word", "page"], description: "What the rate is per (mainly for one-time)." },
|
|
795
|
+
currency: { type: "string", description: "3-letter ISO code. Defaults to USD." },
|
|
796
|
+
tax_rate: { type: "number", description: "Default tax rate percentage." },
|
|
797
|
+
positioning: { type: "string", description: "Who it's for / what problem it solves." },
|
|
798
|
+
deliverables: { type: "array", items: { type: "string" }, description: "List of included items." },
|
|
799
|
+
},
|
|
800
|
+
required: ["name"],
|
|
801
|
+
},
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
name: "helm__update_product",
|
|
805
|
+
description: "Edit an existing product in the catalog. Only pass the fields you want to change — omitted fields are left as-is. Use to fix a rate, refine positioning/deliverables, recategorize, or reactivate (is_active: true).",
|
|
806
|
+
inputSchema: {
|
|
807
|
+
type: "object",
|
|
808
|
+
properties: {
|
|
809
|
+
product_id: { type: "string", description: "UUID of the product to update." },
|
|
810
|
+
name: { type: "string", description: "New display name." },
|
|
811
|
+
description: { type: "string", description: "New short description." },
|
|
812
|
+
category: { type: "string", description: "New free-text category." },
|
|
813
|
+
billing_interval: { type: "string", enum: ["day", "week", "month", "year"], description: "Make recurring at this cadence." },
|
|
814
|
+
default_rate: { type: "number", description: "New default price." },
|
|
815
|
+
unit: { type: "string", enum: ["hour", "day", "week", "month", "project", "unit", "license", "seat", "word", "page"], description: "What the rate is per." },
|
|
816
|
+
currency: { type: "string", description: "3-letter ISO code." },
|
|
817
|
+
tax_rate: { type: "number", description: "Default tax rate percentage." },
|
|
818
|
+
positioning: { type: "string", description: "Who it's for / what problem it solves." },
|
|
819
|
+
deliverables: { type: "array", items: { type: "string" }, description: "Replaces the full deliverables list." },
|
|
820
|
+
is_active: { type: "boolean", description: "Set false to archive, true to reactivate." },
|
|
821
|
+
},
|
|
822
|
+
required: ["product_id"],
|
|
823
|
+
},
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
name: "helm__archive_product",
|
|
827
|
+
description: "Archive a product so it no longer appears in active catalog lists or pickers, without deleting it (past invoice/estimate/deal links stay intact). Pass unarchive: true to bring it back.",
|
|
828
|
+
inputSchema: {
|
|
829
|
+
type: "object",
|
|
830
|
+
properties: {
|
|
831
|
+
product_id: { type: "string", description: "UUID of the product to archive." },
|
|
832
|
+
unarchive: { type: "boolean", description: "Set true to reactivate a previously archived product." },
|
|
833
|
+
},
|
|
834
|
+
required: ["product_id"],
|
|
835
|
+
},
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
name: "helm__attach_product_to_deal",
|
|
839
|
+
description: "Attach a product from the catalog to a deal. Sum of attached products suggests the deal value.",
|
|
840
|
+
inputSchema: {
|
|
841
|
+
type: "object",
|
|
842
|
+
properties: {
|
|
843
|
+
deal_id: { type: "string", description: "UUID of the deal." },
|
|
844
|
+
product_id: { type: "string", description: "UUID of the product." },
|
|
845
|
+
product_price_id: { type: "string", description: "UUID of a specific price tier (from the product's `prices`). Omit for the default tier." },
|
|
846
|
+
quantity: { type: "number", description: "Defaults to 1." },
|
|
847
|
+
rate: { type: "number", description: "Override the tier/default price. Omit to follow the chosen tier." },
|
|
848
|
+
notes: { type: "string", description: "Optional internal note." },
|
|
849
|
+
},
|
|
850
|
+
required: ["deal_id", "product_id"],
|
|
851
|
+
},
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
name: "helm__add_line_item_from_product",
|
|
855
|
+
description: "Add a line item to an invoice or estimate using a product from the catalog. Defaults description and rate from the product.",
|
|
856
|
+
inputSchema: {
|
|
857
|
+
type: "object",
|
|
858
|
+
properties: {
|
|
859
|
+
document_type: { type: "string", enum: ["invoice", "estimate"], description: "Which document type." },
|
|
860
|
+
document_id: { type: "string", description: "UUID of the invoice or estimate." },
|
|
861
|
+
product_id: { type: "string", description: "UUID of the product." },
|
|
862
|
+
product_price_id: { type: "string", description: "UUID of a specific price tier (from the product's `prices`). Omit for the default tier." },
|
|
863
|
+
quantity: { type: "number", description: "Defaults to 1." },
|
|
864
|
+
rate_override: { type: "number", description: "Override the tier/default price. Omit to follow the chosen tier." },
|
|
865
|
+
description_override: { type: "string", description: "Override the auto-derived description." },
|
|
866
|
+
},
|
|
867
|
+
required: ["document_type", "document_id", "product_id"],
|
|
868
|
+
},
|
|
869
|
+
},
|
|
870
|
+
// Product price tier tools
|
|
871
|
+
{
|
|
872
|
+
name: "helm__list_product_prices",
|
|
873
|
+
description: "List a product's price tiers (e.g. Single Site / 5 Sites / Unlimited), ordered. A product with no tiers uses its single default_rate; get_product also returns these inline as `prices`.",
|
|
874
|
+
inputSchema: {
|
|
875
|
+
type: "object",
|
|
876
|
+
properties: {
|
|
877
|
+
product_id: { type: "string", description: "UUID of the product." },
|
|
878
|
+
},
|
|
879
|
+
required: ["product_id"],
|
|
880
|
+
},
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
name: "helm__create_product_price",
|
|
884
|
+
description: "Add a price tier to a product. The first tier becomes the default automatically. The product's headline default_rate/currency/billing_interval/unit stay synced to whichever tier is the default. Confirm with the user before adding unless explicitly requested.",
|
|
885
|
+
inputSchema: {
|
|
886
|
+
type: "object",
|
|
887
|
+
properties: {
|
|
888
|
+
product_id: { type: "string", description: "UUID of the product to add a tier to." },
|
|
889
|
+
label: { type: "string", description: "Tier name, e.g. 'Single Site', '5 Sites', 'Unlimited'." },
|
|
890
|
+
amount: { type: "number", description: "Regular (list) price. Omit/null for 'on request'." },
|
|
891
|
+
sale_amount: { type: "number", description: "Optional sale price; charged when below amount." },
|
|
892
|
+
currency: { type: "string", description: "3-letter ISO code. Defaults to the product's currency." },
|
|
893
|
+
billing_interval: { type: "string", enum: ["day", "week", "month", "year"], description: "Set for recurring tiers. Omit for one-time." },
|
|
894
|
+
unit: { type: "string", enum: ["hour", "day", "week", "month", "project", "unit", "license", "seat", "word", "page"], description: "What the price is per." },
|
|
895
|
+
is_default: { type: "boolean", description: "Make this the default tier (clears the previous default)." },
|
|
896
|
+
},
|
|
897
|
+
required: ["product_id", "label"],
|
|
898
|
+
},
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
name: "helm__update_product_price",
|
|
902
|
+
description: "Edit a price tier. Only pass the fields you want to change. Setting is_default: true clears the previous default; the product's headline fields re-sync to the default tier.",
|
|
903
|
+
inputSchema: {
|
|
904
|
+
type: "object",
|
|
905
|
+
properties: {
|
|
906
|
+
price_id: { type: "string", description: "UUID of the price tier (from list_product_prices or a product's `prices`)." },
|
|
907
|
+
label: { type: "string", description: "New tier name." },
|
|
908
|
+
amount: { type: "number", description: "New regular price." },
|
|
909
|
+
sale_amount: { type: "number", description: "New sale price." },
|
|
910
|
+
currency: { type: "string", description: "3-letter ISO code." },
|
|
911
|
+
billing_interval: { type: "string", enum: ["day", "week", "month", "year"], description: "Make recurring at this cadence." },
|
|
912
|
+
unit: { type: "string", enum: ["hour", "day", "week", "month", "project", "unit", "license", "seat", "word", "page"], description: "What the price is per." },
|
|
913
|
+
is_default: { type: "boolean", description: "Set true to make this the default tier." },
|
|
914
|
+
},
|
|
915
|
+
required: ["price_id"],
|
|
916
|
+
},
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
name: "helm__delete_product_price",
|
|
920
|
+
description: "Delete a price tier. Past invoice/estimate/deal lines referencing it keep their snapshotted price. If you delete the default, another tier is promoted automatically.",
|
|
921
|
+
inputSchema: {
|
|
922
|
+
type: "object",
|
|
923
|
+
properties: {
|
|
924
|
+
price_id: { type: "string", description: "UUID of the price tier to delete." },
|
|
925
|
+
},
|
|
926
|
+
required: ["price_id"],
|
|
927
|
+
},
|
|
928
|
+
},
|
|
929
|
+
// Account-product attribution tools
|
|
930
|
+
{
|
|
931
|
+
name: "helm__list_account_products",
|
|
932
|
+
description: "Customer-360 view: what products an account uses / has bought / has in pipeline. Unifies four sources (direct attribution, paid invoices, won deals, open deals) with source badges per row.",
|
|
933
|
+
inputSchema: {
|
|
934
|
+
type: "object",
|
|
935
|
+
properties: {
|
|
936
|
+
account_id: { type: "string", description: "UUID of the account." },
|
|
937
|
+
},
|
|
938
|
+
required: ["account_id"],
|
|
939
|
+
},
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
name: "helm__attach_product_to_account",
|
|
943
|
+
description: "Record that an account is a customer for a product, WITHOUT creating an invoice or payment. Use for migrating customers from other systems, informal arrangements, or relationships billed outside Helm.",
|
|
944
|
+
inputSchema: {
|
|
945
|
+
type: "object",
|
|
946
|
+
properties: {
|
|
947
|
+
account_id: { type: "string", description: "UUID of the account." },
|
|
948
|
+
product_id: { type: "string", description: "UUID of the product." },
|
|
949
|
+
product_price_id: { type: "string", description: "UUID of a specific price tier (from the product's `prices`). Omit for the default tier." },
|
|
950
|
+
quantity: { type: "number", description: "Defaults to 1." },
|
|
951
|
+
rate: { type: "number", description: "Snapshot price for MRR calc. Follows the chosen tier if omitted." },
|
|
952
|
+
purchased_at: { type: "string", description: "ISO date the relationship began. Optional." },
|
|
953
|
+
ended_at: { type: "string", description: "ISO date the relationship ended. Omit for active customers." },
|
|
954
|
+
notes: { type: "string", description: "Optional context." },
|
|
955
|
+
},
|
|
956
|
+
required: ["account_id", "product_id"],
|
|
957
|
+
},
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
name: "helm__update_account_product",
|
|
961
|
+
description: "Update an account_products attribution row. Common: mark a relationship ended (set ended_at), change the price tier (upgrade/downgrade), adjust rate or quantity.",
|
|
962
|
+
inputSchema: {
|
|
963
|
+
type: "object",
|
|
964
|
+
properties: {
|
|
965
|
+
account_product_id: { type: "string", description: "UUID of the account_products row." },
|
|
966
|
+
product_price_id: { type: "string", description: "Switch to a different price tier of the same product (e.g. upgrade). Rate follows the new tier unless you also pass rate." },
|
|
967
|
+
quantity: { type: "number" },
|
|
968
|
+
rate: { type: "number" },
|
|
969
|
+
purchased_at: { type: "string", description: "ISO date." },
|
|
970
|
+
ended_at: { type: "string", description: "ISO date the relationship ended." },
|
|
971
|
+
notes: { type: "string" },
|
|
972
|
+
},
|
|
973
|
+
required: ["account_product_id"],
|
|
974
|
+
},
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
name: "helm__detach_product_from_account",
|
|
978
|
+
description: "Delete an account_products attribution row. Use only when it was a mistake — for relationships that ended naturally, prefer helm__update_account_product with ended_at.",
|
|
979
|
+
inputSchema: {
|
|
980
|
+
type: "object",
|
|
981
|
+
properties: {
|
|
982
|
+
account_product_id: { type: "string", description: "UUID of the account_products row." },
|
|
983
|
+
},
|
|
984
|
+
required: ["account_product_id"],
|
|
985
|
+
},
|
|
986
|
+
},
|
|
987
|
+
// Forms tools
|
|
988
|
+
{
|
|
989
|
+
name: "helm__list_forms",
|
|
990
|
+
description: "List lead-capture / intake forms with status (draft/live/archived) and submission/field counts. Use to find a form before reading submissions or editing.",
|
|
991
|
+
inputSchema: {
|
|
992
|
+
type: "object",
|
|
993
|
+
properties: {
|
|
994
|
+
status: { type: "string", enum: ["draft", "live", "archived"], description: "Filter by status." },
|
|
995
|
+
limit: { type: "number", description: "Max forms (default 100)." },
|
|
996
|
+
},
|
|
997
|
+
required: [],
|
|
998
|
+
},
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
name: "helm__get_form",
|
|
1002
|
+
description: "Get a form's full structure — steps, fields, status, and (if live) an inline embed snippet.",
|
|
1003
|
+
inputSchema: {
|
|
1004
|
+
type: "object",
|
|
1005
|
+
properties: { form_id: { type: "string", description: "UUID of the form." } },
|
|
1006
|
+
required: ["form_id"],
|
|
1007
|
+
},
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
name: "helm__get_form_submissions",
|
|
1011
|
+
description: "Read recent submissions (visitor-entered values) for a form. Use for 'show me recent leads from X'.",
|
|
1012
|
+
inputSchema: {
|
|
1013
|
+
type: "object",
|
|
1014
|
+
properties: {
|
|
1015
|
+
form_id: { type: "string", description: "UUID of the form." },
|
|
1016
|
+
limit: { type: "number", description: "Max submissions, newest first (default 20, max 100)." },
|
|
1017
|
+
},
|
|
1018
|
+
required: ["form_id"],
|
|
1019
|
+
},
|
|
1020
|
+
},
|
|
1021
|
+
{
|
|
1022
|
+
name: "helm__get_form_stats",
|
|
1023
|
+
description: "Get submission counts for a form (total, last 7 days, last 30 days).",
|
|
1024
|
+
inputSchema: {
|
|
1025
|
+
type: "object",
|
|
1026
|
+
properties: { form_id: { type: "string", description: "UUID of the form." } },
|
|
1027
|
+
required: ["form_id"],
|
|
1028
|
+
},
|
|
1029
|
+
},
|
|
1030
|
+
{
|
|
1031
|
+
name: "helm__create_form",
|
|
1032
|
+
description: "Create a new form (draft by default). Add fields with helm__add_form_field, then helm__set_form_status to 'live'. Confirm with the user first.",
|
|
1033
|
+
inputSchema: {
|
|
1034
|
+
type: "object",
|
|
1035
|
+
properties: {
|
|
1036
|
+
name: { type: "string", description: "Form name." },
|
|
1037
|
+
description: { type: "string", description: "Optional description shown above the form." },
|
|
1038
|
+
status: { type: "string", enum: ["draft", "live", "archived"], description: "Defaults to draft." },
|
|
1039
|
+
},
|
|
1040
|
+
required: ["name"],
|
|
1041
|
+
},
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
name: "helm__add_form_step",
|
|
1045
|
+
description: "Add a step (page) to a form, making it multi-step. Assign fields to a step via helm__add_form_field's step_id.",
|
|
1046
|
+
inputSchema: {
|
|
1047
|
+
type: "object",
|
|
1048
|
+
properties: {
|
|
1049
|
+
form_id: { type: "string", description: "UUID of the form." },
|
|
1050
|
+
title: { type: "string", description: "Step heading." },
|
|
1051
|
+
subtitle: { type: "string", description: "Optional subtitle." },
|
|
1052
|
+
},
|
|
1053
|
+
required: ["form_id"],
|
|
1054
|
+
},
|
|
1055
|
+
},
|
|
1056
|
+
{
|
|
1057
|
+
name: "helm__add_form_field",
|
|
1058
|
+
description: "Add a field to a form. For select/radio/checkbox/choice_cards pass an options list. choice_cards renders big tappable buttons that auto-advance. email/phone fields are format-validated.",
|
|
1059
|
+
inputSchema: {
|
|
1060
|
+
type: "object",
|
|
1061
|
+
properties: {
|
|
1062
|
+
form_id: { type: "string", description: "UUID of the form." },
|
|
1063
|
+
type: { type: "string", enum: ["text", "textarea", "email", "phone", "number", "date", "time", "select", "radio", "checkbox", "file", "choice_cards"], description: "Field type." },
|
|
1064
|
+
label: { type: "string", description: "Field label." },
|
|
1065
|
+
required: { type: "boolean", description: "Whether the field is required (default false)." },
|
|
1066
|
+
placeholder: { type: "string", description: "Placeholder text." },
|
|
1067
|
+
options: { type: "array", items: { type: "string" }, description: "Choices (required for select/radio/checkbox/choice_cards)." },
|
|
1068
|
+
step_id: { type: "string", description: "Step UUID (for multi-step forms)." },
|
|
1069
|
+
},
|
|
1070
|
+
required: ["form_id", "type", "label"],
|
|
1071
|
+
},
|
|
1072
|
+
},
|
|
1073
|
+
{
|
|
1074
|
+
name: "helm__set_form_status",
|
|
1075
|
+
description: "Publish/unpublish a form. 'live' makes it embeddable + accept submissions; 'draft' takes it offline; 'archived' retires it.",
|
|
1076
|
+
inputSchema: {
|
|
1077
|
+
type: "object",
|
|
1078
|
+
properties: {
|
|
1079
|
+
form_id: { type: "string", description: "UUID of the form." },
|
|
1080
|
+
status: { type: "string", enum: ["draft", "live", "archived"], description: "New status." },
|
|
1081
|
+
},
|
|
1082
|
+
required: ["form_id", "status"],
|
|
1083
|
+
},
|
|
1084
|
+
},
|
|
696
1085
|
// Account tools
|
|
697
1086
|
{
|
|
698
1087
|
name: "helm__get_accounts",
|
|
@@ -716,7 +1105,11 @@ const tools = [
|
|
|
716
1105
|
},
|
|
717
1106
|
limit: {
|
|
718
1107
|
type: "number",
|
|
719
|
-
description: "Maximum number of accounts to return (default: 50)",
|
|
1108
|
+
description: "Maximum number of accounts to return (default: 50, max 1000 per page)",
|
|
1109
|
+
},
|
|
1110
|
+
offset: {
|
|
1111
|
+
type: "number",
|
|
1112
|
+
description: "Number of records to skip — page through large result sets (default: 0)",
|
|
720
1113
|
},
|
|
721
1114
|
},
|
|
722
1115
|
required: [],
|
|
@@ -736,6 +1129,28 @@ const tools = [
|
|
|
736
1129
|
required: ["account_id"],
|
|
737
1130
|
},
|
|
738
1131
|
},
|
|
1132
|
+
{
|
|
1133
|
+
name: "helm__log_activity",
|
|
1134
|
+
description: "Log an activity on a record's timeline — an action/event (call, email, note, meeting, status change) or a data point (a named metric like NPS or MRR). Use a record id from a previous result as entity_id.",
|
|
1135
|
+
inputSchema: {
|
|
1136
|
+
type: "object",
|
|
1137
|
+
properties: {
|
|
1138
|
+
entity_type: {
|
|
1139
|
+
type: "string",
|
|
1140
|
+
enum: ["account", "contact", "deal", "project", "task", "invoice", "estimate", "document", "time_entry"],
|
|
1141
|
+
description: "Type of record to attach the activity to",
|
|
1142
|
+
},
|
|
1143
|
+
entity_id: { type: "string", description: "UUID of the record" },
|
|
1144
|
+
mode: { type: "string", enum: ["action", "data_point"], description: "Default 'action'." },
|
|
1145
|
+
activity_type: { type: "string", description: "Action mode: note, call, email, meeting, sms, status_changed, etc. Default 'note'." },
|
|
1146
|
+
description: { type: "string", description: "What happened (action), or optional context (data point)" },
|
|
1147
|
+
data_name: { type: "string", description: "Data point mode: the metric name, e.g. 'NPS'" },
|
|
1148
|
+
data_value: { type: "string", description: "Data point mode: the value, e.g. '9'" },
|
|
1149
|
+
data_unit: { type: "string", description: "Data point mode: optional unit, e.g. '$', '%'" },
|
|
1150
|
+
},
|
|
1151
|
+
required: ["entity_type", "entity_id"],
|
|
1152
|
+
},
|
|
1153
|
+
},
|
|
739
1154
|
{
|
|
740
1155
|
name: "helm__add_account",
|
|
741
1156
|
description: "Create a new account/client in Helm",
|
|
@@ -792,6 +1207,16 @@ const tools = [
|
|
|
792
1207
|
type: "string",
|
|
793
1208
|
description: "Country",
|
|
794
1209
|
},
|
|
1210
|
+
tags: {
|
|
1211
|
+
type: "array",
|
|
1212
|
+
items: { type: "string" },
|
|
1213
|
+
description: "Tags for categorization",
|
|
1214
|
+
},
|
|
1215
|
+
custom_fields: {
|
|
1216
|
+
type: "object",
|
|
1217
|
+
additionalProperties: true,
|
|
1218
|
+
description: "Custom field values as a JSON object (key → value)",
|
|
1219
|
+
},
|
|
795
1220
|
owner_id: {
|
|
796
1221
|
type: "string",
|
|
797
1222
|
description: "ID of the account owner (user)",
|
|
@@ -860,6 +1285,16 @@ const tools = [
|
|
|
860
1285
|
type: "string",
|
|
861
1286
|
description: "Updated country",
|
|
862
1287
|
},
|
|
1288
|
+
tags: {
|
|
1289
|
+
type: "array",
|
|
1290
|
+
items: { type: "string" },
|
|
1291
|
+
description: "Updated tags (replaces the existing set)",
|
|
1292
|
+
},
|
|
1293
|
+
custom_fields: {
|
|
1294
|
+
type: "object",
|
|
1295
|
+
additionalProperties: true,
|
|
1296
|
+
description: "Updated custom field values as a JSON object (key → value)",
|
|
1297
|
+
},
|
|
863
1298
|
owner_id: {
|
|
864
1299
|
type: "string",
|
|
865
1300
|
description: "Updated account owner ID",
|
|
@@ -891,7 +1326,11 @@ const tools = [
|
|
|
891
1326
|
},
|
|
892
1327
|
limit: {
|
|
893
1328
|
type: "number",
|
|
894
|
-
description: "Maximum number of contacts to return (default: 50)",
|
|
1329
|
+
description: "Maximum number of contacts to return (default: 50, max 1000 per page)",
|
|
1330
|
+
},
|
|
1331
|
+
offset: {
|
|
1332
|
+
type: "number",
|
|
1333
|
+
description: "Number of records to skip — page through large result sets (default: 0)",
|
|
895
1334
|
},
|
|
896
1335
|
},
|
|
897
1336
|
required: [],
|
|
@@ -955,6 +1394,16 @@ const tools = [
|
|
|
955
1394
|
type: "string",
|
|
956
1395
|
description: "Notes about the contact",
|
|
957
1396
|
},
|
|
1397
|
+
tags: {
|
|
1398
|
+
type: "array",
|
|
1399
|
+
items: { type: "string" },
|
|
1400
|
+
description: "Tags for categorization",
|
|
1401
|
+
},
|
|
1402
|
+
custom_fields: {
|
|
1403
|
+
type: "object",
|
|
1404
|
+
additionalProperties: true,
|
|
1405
|
+
description: "Custom field values as a JSON object (key → value)",
|
|
1406
|
+
},
|
|
958
1407
|
},
|
|
959
1408
|
required: ["first_name"],
|
|
960
1409
|
},
|
|
@@ -1007,6 +1456,30 @@ const tools = [
|
|
|
1007
1456
|
type: "string",
|
|
1008
1457
|
description: "Updated notes",
|
|
1009
1458
|
},
|
|
1459
|
+
tags: {
|
|
1460
|
+
type: "array",
|
|
1461
|
+
items: { type: "string" },
|
|
1462
|
+
description: "Updated tags (replaces the existing set)",
|
|
1463
|
+
},
|
|
1464
|
+
custom_fields: {
|
|
1465
|
+
type: "object",
|
|
1466
|
+
additionalProperties: true,
|
|
1467
|
+
description: "Updated custom field values as a JSON object (key → value)",
|
|
1468
|
+
},
|
|
1469
|
+
},
|
|
1470
|
+
required: ["contact_id"],
|
|
1471
|
+
},
|
|
1472
|
+
},
|
|
1473
|
+
{
|
|
1474
|
+
name: "helm__delete_contact",
|
|
1475
|
+
description: "Delete a contact/person permanently",
|
|
1476
|
+
inputSchema: {
|
|
1477
|
+
type: "object",
|
|
1478
|
+
properties: {
|
|
1479
|
+
contact_id: {
|
|
1480
|
+
type: "string",
|
|
1481
|
+
description: "The ID of the contact to delete",
|
|
1482
|
+
},
|
|
1010
1483
|
},
|
|
1011
1484
|
required: ["contact_id"],
|
|
1012
1485
|
},
|
|
@@ -1612,6 +2085,329 @@ const tools = [
|
|
|
1612
2085
|
required: ["schedule_id"],
|
|
1613
2086
|
},
|
|
1614
2087
|
},
|
|
2088
|
+
// Workflow tools (read-only)
|
|
2089
|
+
{
|
|
2090
|
+
name: "helm__get_workflows",
|
|
2091
|
+
description: "List automation workflows in the workspace. Returns id, name, status (draft/live/archived), trigger entity type, and step count. Optionally filter by status.",
|
|
2092
|
+
inputSchema: {
|
|
2093
|
+
type: "object",
|
|
2094
|
+
properties: {
|
|
2095
|
+
status: {
|
|
2096
|
+
type: "string",
|
|
2097
|
+
enum: ["draft", "live", "archived"],
|
|
2098
|
+
description: "Filter by workflow status",
|
|
2099
|
+
},
|
|
2100
|
+
limit: {
|
|
2101
|
+
type: "number",
|
|
2102
|
+
description: "Maximum number of workflows to return (default: 100)",
|
|
2103
|
+
},
|
|
2104
|
+
},
|
|
2105
|
+
required: [],
|
|
2106
|
+
},
|
|
2107
|
+
},
|
|
2108
|
+
{
|
|
2109
|
+
name: "helm__get_workflow",
|
|
2110
|
+
description: "Get a single workflow by ID, including its trigger configuration and full step definitions.",
|
|
2111
|
+
inputSchema: {
|
|
2112
|
+
type: "object",
|
|
2113
|
+
properties: {
|
|
2114
|
+
workflow_id: {
|
|
2115
|
+
type: "string",
|
|
2116
|
+
description: "ID (UUID) of the workflow",
|
|
2117
|
+
},
|
|
2118
|
+
},
|
|
2119
|
+
required: ["workflow_id"],
|
|
2120
|
+
},
|
|
2121
|
+
},
|
|
2122
|
+
{
|
|
2123
|
+
name: "helm__get_workflow_executions",
|
|
2124
|
+
description: "List recent workflow execution runs with their status (running/completed/failed/cancelled) and any error message. Filter by workflow_id and/or status.",
|
|
2125
|
+
inputSchema: {
|
|
2126
|
+
type: "object",
|
|
2127
|
+
properties: {
|
|
2128
|
+
workflow_id: {
|
|
2129
|
+
type: "string",
|
|
2130
|
+
description: "Filter executions to a single workflow",
|
|
2131
|
+
},
|
|
2132
|
+
status: {
|
|
2133
|
+
type: "string",
|
|
2134
|
+
enum: ["running", "completed", "failed", "cancelled"],
|
|
2135
|
+
description: "Filter by execution status",
|
|
2136
|
+
},
|
|
2137
|
+
limit: {
|
|
2138
|
+
type: "number",
|
|
2139
|
+
description: "Maximum number of executions to return (default: 25)",
|
|
2140
|
+
},
|
|
2141
|
+
},
|
|
2142
|
+
required: [],
|
|
2143
|
+
},
|
|
2144
|
+
},
|
|
2145
|
+
// Workflow authoring + lifecycle tools
|
|
2146
|
+
{
|
|
2147
|
+
name: "helm__get_workflow_schema",
|
|
2148
|
+
description: "Get the workflow authoring grammar BEFORE building a workflow: valid trigger types, triggerable record types, every step type and its required config, entities and their writable columns, condition operators, and the template path rules. Call this first so create_workflow/update_workflow succeed on the first try.",
|
|
2149
|
+
inputSchema: { type: "object", properties: {}, required: [] },
|
|
2150
|
+
},
|
|
2151
|
+
{
|
|
2152
|
+
name: "helm__create_workflow",
|
|
2153
|
+
description: "Create an automation workflow. A workflow = a trigger_config + an ordered steps_config array. CALL get_workflow_schema FIRST for the full grammar. Key rules: (1) step config templates need a prefix — '{{trigger.account.email}}', '{{steps.<stepId>.id}}', or '{{item.field}}' inside for_each; a bare '{{account.email}}' resolves to empty. (2) Conditions (in trigger_config.conditions and condition steps) are FLAT — no prefix, e.g. field 'invoice.status'. (3) Status events like 'invoice paid' are record_updated + a condition, not their own trigger. Saved as draft by default; set status 'live' only when it passes full validation (the call returns errors with hints if not). Omit canvas positions — the visual builder auto-lays-out the result.",
|
|
2154
|
+
inputSchema: {
|
|
2155
|
+
type: "object",
|
|
2156
|
+
properties: {
|
|
2157
|
+
name: { type: "string", description: "Workflow name" },
|
|
2158
|
+
description: { type: "string", description: "Optional description" },
|
|
2159
|
+
trigger_config: {
|
|
2160
|
+
type: "object",
|
|
2161
|
+
description: "Trigger spec. e.g. { entity_type: 'record_updated', record_type: 'invoice', conditions: [{ field: 'invoice.status', operator: 'equals', value: 'paid' }] }. entity_type ∈ record_created|record_updated|form_submission|webhook_received|scheduled.",
|
|
2162
|
+
},
|
|
2163
|
+
steps_config: {
|
|
2164
|
+
type: "array",
|
|
2165
|
+
description: "Ordered steps. Each: { id?, type, name?, config }. id auto-generated if omitted. See get_workflow_schema for every step type and its required config.",
|
|
2166
|
+
items: { type: "object" },
|
|
2167
|
+
},
|
|
2168
|
+
settings: { type: "object", description: "Optional settings (error_handling, notifications). Omit canvas positions — auto-laid-out." },
|
|
2169
|
+
status: { type: "string", enum: ["draft", "live"], description: "Default draft. 'live' requires the workflow to pass full validation." },
|
|
2170
|
+
},
|
|
2171
|
+
required: ["name", "trigger_config"],
|
|
2172
|
+
},
|
|
2173
|
+
},
|
|
2174
|
+
{
|
|
2175
|
+
name: "helm__update_workflow",
|
|
2176
|
+
description: "Update an existing workflow. Only the fields you pass are changed; the merged result is validated. Setting status to 'live' requires it to pass full validation (the call returns errors with hints otherwise). A live workflow must stay valid — an edit that would leave it incomplete is rejected; pass status:'draft' to take it offline while you finish.",
|
|
2177
|
+
inputSchema: {
|
|
2178
|
+
type: "object",
|
|
2179
|
+
properties: {
|
|
2180
|
+
workflow_id: { type: "string", description: "ID (UUID) of the workflow" },
|
|
2181
|
+
name: { type: "string" },
|
|
2182
|
+
description: { type: "string" },
|
|
2183
|
+
trigger_config: { type: "object", description: "Replaces the trigger spec (see create_workflow)." },
|
|
2184
|
+
steps_config: { type: "array", description: "Replaces the steps array (see create_workflow).", items: { type: "object" } },
|
|
2185
|
+
settings: { type: "object" },
|
|
2186
|
+
status: { type: "string", enum: ["draft", "live", "archived"] },
|
|
2187
|
+
},
|
|
2188
|
+
required: ["workflow_id"],
|
|
2189
|
+
},
|
|
2190
|
+
},
|
|
2191
|
+
{
|
|
2192
|
+
name: "helm__delete_workflow",
|
|
2193
|
+
description: "Permanently delete a workflow.",
|
|
2194
|
+
inputSchema: {
|
|
2195
|
+
type: "object",
|
|
2196
|
+
properties: { workflow_id: { type: "string", description: "ID (UUID) of the workflow" } },
|
|
2197
|
+
required: ["workflow_id"],
|
|
2198
|
+
},
|
|
2199
|
+
},
|
|
2200
|
+
{
|
|
2201
|
+
name: "helm__set_workflow_status",
|
|
2202
|
+
description: "Set a workflow's status: 'live' to enable it, 'draft' to pause, 'archived' to retire. (To change the definition, use update_workflow.)",
|
|
2203
|
+
inputSchema: {
|
|
2204
|
+
type: "object",
|
|
2205
|
+
properties: {
|
|
2206
|
+
workflow_id: { type: "string", description: "ID (UUID) of the workflow" },
|
|
2207
|
+
status: { type: "string", enum: ["draft", "live", "archived"], description: "New status" },
|
|
2208
|
+
},
|
|
2209
|
+
required: ["workflow_id", "status"],
|
|
2210
|
+
},
|
|
2211
|
+
},
|
|
2212
|
+
{
|
|
2213
|
+
name: "helm__execute_workflow",
|
|
2214
|
+
description: "Manually run a workflow now, bypassing trigger-condition gating. Optionally pass trigger_data the steps can reference.",
|
|
2215
|
+
inputSchema: {
|
|
2216
|
+
type: "object",
|
|
2217
|
+
properties: {
|
|
2218
|
+
workflow_id: { type: "string", description: "ID (UUID) of the workflow" },
|
|
2219
|
+
trigger_data: { type: "object", description: "Optional data made available to steps as {{trigger.*}}" },
|
|
2220
|
+
},
|
|
2221
|
+
required: ["workflow_id"],
|
|
2222
|
+
},
|
|
2223
|
+
},
|
|
2224
|
+
// Email sequence tools
|
|
2225
|
+
{
|
|
2226
|
+
name: "helm__list_email_sequences",
|
|
2227
|
+
description: "List email sequences in the workspace so you can pick one by name. Returns id, name, status (draft/live/archived), and step count.",
|
|
2228
|
+
inputSchema: {
|
|
2229
|
+
type: "object",
|
|
2230
|
+
properties: {
|
|
2231
|
+
status: {
|
|
2232
|
+
type: "string",
|
|
2233
|
+
enum: ["draft", "live", "archived"],
|
|
2234
|
+
description: "Filter by sequence status",
|
|
2235
|
+
},
|
|
2236
|
+
},
|
|
2237
|
+
required: [],
|
|
2238
|
+
},
|
|
2239
|
+
},
|
|
2240
|
+
{
|
|
2241
|
+
name: "helm__get_sequence",
|
|
2242
|
+
description: "Get a single email sequence by ID, including its ordered steps and per-step + overall enrollment stats.",
|
|
2243
|
+
inputSchema: {
|
|
2244
|
+
type: "object",
|
|
2245
|
+
properties: {
|
|
2246
|
+
sequence_id: {
|
|
2247
|
+
type: "string",
|
|
2248
|
+
description: "ID (UUID) of the sequence",
|
|
2249
|
+
},
|
|
2250
|
+
},
|
|
2251
|
+
required: ["sequence_id"],
|
|
2252
|
+
},
|
|
2253
|
+
},
|
|
2254
|
+
{
|
|
2255
|
+
name: "helm__list_sequence_enrollments",
|
|
2256
|
+
description: "List the contacts enrolled in an email sequence, with their current step, status, and next send time. Optionally filter by enrollment status.",
|
|
2257
|
+
inputSchema: {
|
|
2258
|
+
type: "object",
|
|
2259
|
+
properties: {
|
|
2260
|
+
sequence_id: {
|
|
2261
|
+
type: "string",
|
|
2262
|
+
description: "ID (UUID) of the sequence",
|
|
2263
|
+
},
|
|
2264
|
+
status: {
|
|
2265
|
+
type: "string",
|
|
2266
|
+
description: "Filter by enrollment status (e.g. active, paused, completed, exited_reply)",
|
|
2267
|
+
},
|
|
2268
|
+
},
|
|
2269
|
+
required: ["sequence_id"],
|
|
2270
|
+
},
|
|
2271
|
+
},
|
|
2272
|
+
{
|
|
2273
|
+
name: "helm__enroll_in_sequence",
|
|
2274
|
+
description: "Enroll a contact into an email sequence. Provide the sequence_id plus either the person_id (UUID) or their email address. The sequence must be live with a sender identity and at least one step.",
|
|
2275
|
+
inputSchema: {
|
|
2276
|
+
type: "object",
|
|
2277
|
+
properties: {
|
|
2278
|
+
sequence_id: {
|
|
2279
|
+
type: "string",
|
|
2280
|
+
description: "ID (UUID) of the sequence to enroll into",
|
|
2281
|
+
},
|
|
2282
|
+
person_id: {
|
|
2283
|
+
type: "string",
|
|
2284
|
+
description: "Contact/person UUID to enroll",
|
|
2285
|
+
},
|
|
2286
|
+
email: {
|
|
2287
|
+
type: "string",
|
|
2288
|
+
description: "Email address of the contact (workspace-scoped lookup); used if person_id is not provided",
|
|
2289
|
+
},
|
|
2290
|
+
},
|
|
2291
|
+
required: ["sequence_id"],
|
|
2292
|
+
},
|
|
2293
|
+
},
|
|
2294
|
+
{
|
|
2295
|
+
name: "helm__create_email_sequence",
|
|
2296
|
+
description: "Create a new email sequence. It starts as a draft — add emails with helm__create_sequence_email, then publish it once it has a sender identity and at least one email. Returns the new sequence (including its id).",
|
|
2297
|
+
inputSchema: {
|
|
2298
|
+
type: "object",
|
|
2299
|
+
properties: {
|
|
2300
|
+
name: {
|
|
2301
|
+
type: "string",
|
|
2302
|
+
description: "Internal name for the sequence, e.g. \"New lead nurture\".",
|
|
2303
|
+
},
|
|
2304
|
+
description: {
|
|
2305
|
+
type: "string",
|
|
2306
|
+
description: "Optional short note on what the sequence is for.",
|
|
2307
|
+
},
|
|
2308
|
+
sender_identity_id: {
|
|
2309
|
+
type: "string",
|
|
2310
|
+
description: "UUID of the verified sender identity. Optional now, required before publishing.",
|
|
2311
|
+
},
|
|
2312
|
+
exit_on_reply: {
|
|
2313
|
+
type: "boolean",
|
|
2314
|
+
description: "Stop sending once a contact replies (default true).",
|
|
2315
|
+
},
|
|
2316
|
+
exit_on_bounce: {
|
|
2317
|
+
type: "boolean",
|
|
2318
|
+
description: "Stop sending once an email bounces (default true).",
|
|
2319
|
+
},
|
|
2320
|
+
},
|
|
2321
|
+
required: ["name"],
|
|
2322
|
+
},
|
|
2323
|
+
},
|
|
2324
|
+
{
|
|
2325
|
+
name: "helm__create_sequence_email",
|
|
2326
|
+
description: "Add an email to a sequence. Emails send in order; the delay is the wait BEFORE this email, measured from the previous email (or from enrollment for the first email — use delay_value=0 to send immediately). Call once per email. Provide html_body and/or text_body. Personalize with merge tags: {{contact.first_name}}, {{contact.last_name}}, {{contact.full_name}}, {{contact.email}}. An unsubscribe link is appended automatically (or place {{unsubscribe_link}}). Only those tags are supported — any other {{token}} is sent literally, so don't invent merge tags.",
|
|
2327
|
+
inputSchema: {
|
|
2328
|
+
type: "object",
|
|
2329
|
+
properties: {
|
|
2330
|
+
sequence_id: {
|
|
2331
|
+
type: "string",
|
|
2332
|
+
description: "UUID of the sequence to add the email to",
|
|
2333
|
+
},
|
|
2334
|
+
subject: {
|
|
2335
|
+
type: "string",
|
|
2336
|
+
description: "Email subject line",
|
|
2337
|
+
},
|
|
2338
|
+
html_body: {
|
|
2339
|
+
type: "string",
|
|
2340
|
+
description: "HTML body. Provide this and/or text_body.",
|
|
2341
|
+
},
|
|
2342
|
+
text_body: {
|
|
2343
|
+
type: "string",
|
|
2344
|
+
description: "Plain-text body. Provide this and/or html_body.",
|
|
2345
|
+
},
|
|
2346
|
+
delay_value: {
|
|
2347
|
+
type: "number",
|
|
2348
|
+
description: "How long to wait before sending, combined with delay_unit. Use 0 for the first email.",
|
|
2349
|
+
},
|
|
2350
|
+
delay_unit: {
|
|
2351
|
+
type: "string",
|
|
2352
|
+
enum: ["minutes", "hours", "days"],
|
|
2353
|
+
description: "Unit for delay_value",
|
|
2354
|
+
},
|
|
2355
|
+
position: {
|
|
2356
|
+
type: "number",
|
|
2357
|
+
description: "Optional 1-based insert position (later emails shift down). Omit to append.",
|
|
2358
|
+
},
|
|
2359
|
+
},
|
|
2360
|
+
required: ["sequence_id", "subject", "delay_value", "delay_unit"],
|
|
2361
|
+
},
|
|
2362
|
+
},
|
|
2363
|
+
{
|
|
2364
|
+
name: "helm__agent_send_email",
|
|
2365
|
+
description: "Send an outbound email AS one of the workspace's AI agents (\"have Ava email …\"), from that agent's bound, verified sender identity. The agent must already have a verified sender identity assigned (Agent Settings → Email) or this returns an error. Two modes:\n- Default (mechanical): you supply subject + body and it is sent verbatim as the agent. Draft the email for the user and confirm before calling. Provide text_body and/or html_body.\n- delegate=true: you supply only an `intent` (what the email should accomplish) and the agent writes the email itself in its own voice, then sends. Use when the user wants the agent to compose it, not you. `subject`/`body` are optional in this mode (subject becomes a suggestion).\nThe from-address is always the agent's own identity — never pass it. Returns the agent, from_address, and message/thread ids.",
|
|
2366
|
+
inputSchema: {
|
|
2367
|
+
type: "object",
|
|
2368
|
+
properties: {
|
|
2369
|
+
agent: {
|
|
2370
|
+
type: "string",
|
|
2371
|
+
description: "Which agent sends it — the agent's name (e.g. \"Ava\"), slug, or id. Resolved within the workspace.",
|
|
2372
|
+
},
|
|
2373
|
+
to: {
|
|
2374
|
+
type: ["string", "array"],
|
|
2375
|
+
items: { type: "string" },
|
|
2376
|
+
description: "Recipient email address, or an array of addresses.",
|
|
2377
|
+
},
|
|
2378
|
+
cc: {
|
|
2379
|
+
type: ["string", "array"],
|
|
2380
|
+
items: { type: "string" },
|
|
2381
|
+
description: "Optional Cc address or array of addresses.",
|
|
2382
|
+
},
|
|
2383
|
+
subject: {
|
|
2384
|
+
type: "string",
|
|
2385
|
+
description: "Subject line. Required in mechanical mode; an optional suggestion when delegate=true.",
|
|
2386
|
+
},
|
|
2387
|
+
text_body: {
|
|
2388
|
+
type: "string",
|
|
2389
|
+
description: "Plain-text body (mechanical mode). Provide this and/or html_body.",
|
|
2390
|
+
},
|
|
2391
|
+
html_body: {
|
|
2392
|
+
type: "string",
|
|
2393
|
+
description: "HTML body (mechanical mode). Provide this and/or text_body.",
|
|
2394
|
+
},
|
|
2395
|
+
delegate: {
|
|
2396
|
+
type: "boolean",
|
|
2397
|
+
description: "When true, the agent composes the email itself from `intent` instead of sending your supplied body. Default false.",
|
|
2398
|
+
},
|
|
2399
|
+
intent: {
|
|
2400
|
+
type: "string",
|
|
2401
|
+
description: "Required when delegate=true: what the email needs to accomplish, in plain language (e.g. \"reschedule Thursday's call to Friday 2pm\").",
|
|
2402
|
+
},
|
|
2403
|
+
context: {
|
|
2404
|
+
type: "string",
|
|
2405
|
+
description: "Optional extra context handed to the agent in delegate mode (facts, constraints, tone).",
|
|
2406
|
+
},
|
|
2407
|
+
},
|
|
2408
|
+
required: ["agent", "to"],
|
|
2409
|
+
},
|
|
2410
|
+
},
|
|
1615
2411
|
];
|
|
1616
2412
|
// Create MCP server
|
|
1617
2413
|
const server = new Server({
|
|
@@ -1637,6 +2433,7 @@ const TOOL_ROUTES = {
|
|
|
1637
2433
|
helm__get_task: { action: "get_task", method: "GET", resultKey: "task" },
|
|
1638
2434
|
helm__update_task: { action: "update_task", method: "POST", resultKey: "task", successMsg: "Task updated successfully!" },
|
|
1639
2435
|
helm__add_task_comment: { action: "add_task_comment", method: "POST", resultKey: "comment", successMsg: "Comment added successfully!" },
|
|
2436
|
+
helm__upload_attachment: { action: "upload_attachment", method: "POST", resultKey: "attachment", successMsg: "File uploaded. Pass this object in the attachments array of add_task or add_task_comment." },
|
|
1640
2437
|
// Documents
|
|
1641
2438
|
helm__create_document: { action: "create_document", method: "POST", resultKey: "document", successMsg: "Document created successfully!" },
|
|
1642
2439
|
helm__update_document: { action: "update_document", method: "POST", resultKey: "document", successMsg: "Document updated successfully!" },
|
|
@@ -1656,16 +2453,45 @@ const TOOL_ROUTES = {
|
|
|
1656
2453
|
// Estimates
|
|
1657
2454
|
helm__create_estimate: { action: "create_estimate", method: "POST", resultKey: "estimate", successMsg: "Estimate created successfully!" },
|
|
1658
2455
|
helm__get_estimates: { action: "get_estimates", method: "GET", resultKey: "estimates" },
|
|
2456
|
+
// Products
|
|
2457
|
+
helm__list_products: { action: "list_products", method: "GET", resultKey: "products" },
|
|
2458
|
+
helm__get_product: { action: "get_product", method: "GET", resultKey: "product" },
|
|
2459
|
+
helm__create_product: { action: "create_product", method: "POST", resultKey: "product", successMsg: "Product created successfully!" },
|
|
2460
|
+
helm__update_product: { action: "update_product", method: "POST", resultKey: "product", successMsg: "Product updated." },
|
|
2461
|
+
helm__archive_product: { action: "archive_product", method: "POST", resultKey: "product", successMsg: "Product archived." },
|
|
2462
|
+
helm__attach_product_to_deal: { action: "attach_product_to_deal", method: "POST", successMsg: "Product attached to deal." },
|
|
2463
|
+
helm__add_line_item_from_product: { action: "add_line_item_from_product", method: "POST", successMsg: "Line item added." },
|
|
2464
|
+
// Product price tiers
|
|
2465
|
+
helm__list_product_prices: { action: "list_product_prices", method: "GET", resultKey: "prices" },
|
|
2466
|
+
helm__create_product_price: { action: "create_product_price", method: "POST", resultKey: "price", successMsg: "Price tier added." },
|
|
2467
|
+
helm__update_product_price: { action: "update_product_price", method: "POST", resultKey: "price", successMsg: "Price tier updated." },
|
|
2468
|
+
helm__delete_product_price: { action: "delete_product_price", method: "POST", successMsg: "Price tier deleted." },
|
|
2469
|
+
// Account-product attribution
|
|
2470
|
+
helm__list_account_products: { action: "list_account_products", method: "GET", resultKey: "rows" },
|
|
2471
|
+
helm__attach_product_to_account: { action: "attach_product_to_account", method: "POST", successMsg: "Product attached to account." },
|
|
2472
|
+
helm__update_account_product: { action: "update_account_product", method: "POST", resultKey: "account_product", successMsg: "Updated." },
|
|
2473
|
+
helm__detach_product_from_account: { action: "detach_product_from_account", method: "POST", successMsg: "Detached." },
|
|
2474
|
+
// Forms
|
|
2475
|
+
helm__list_forms: { action: "list_forms", method: "GET", resultKey: "forms" },
|
|
2476
|
+
helm__get_form: { action: "get_form", method: "GET", resultKey: "form" },
|
|
2477
|
+
helm__get_form_submissions: { action: "get_form_submissions", method: "GET", resultKey: "submissions" },
|
|
2478
|
+
helm__get_form_stats: { action: "get_form_stats", method: "GET", resultKey: "stats" },
|
|
2479
|
+
helm__create_form: { action: "create_form", method: "POST", resultKey: "form", successMsg: "Form created." },
|
|
2480
|
+
helm__add_form_step: { action: "add_form_step", method: "POST", resultKey: "step", successMsg: "Step added." },
|
|
2481
|
+
helm__add_form_field: { action: "add_form_field", method: "POST", resultKey: "field", successMsg: "Field added." },
|
|
2482
|
+
helm__set_form_status: { action: "set_form_status", method: "POST", resultKey: "form", successMsg: "Form status updated." },
|
|
1659
2483
|
// Accounts
|
|
1660
2484
|
helm__get_accounts: { action: "get_accounts", method: "GET", resultKey: "accounts" },
|
|
1661
2485
|
helm__get_account: { action: "get_account", method: "GET", resultKey: "account" },
|
|
1662
2486
|
helm__add_account: { action: "add_account", method: "POST", resultKey: "account", successMsg: "Account created successfully!" },
|
|
2487
|
+
helm__log_activity: { action: "log_activity", method: "POST", successMsg: "Activity logged." },
|
|
1663
2488
|
helm__update_account: { action: "update_account", method: "POST", resultKey: "account", successMsg: "Account updated successfully!" },
|
|
1664
2489
|
// Contacts
|
|
1665
2490
|
helm__get_contacts: { action: "get_contacts", method: "GET", resultKey: "contacts" },
|
|
1666
2491
|
helm__get_contact: { action: "get_contact", method: "GET", resultKey: "contact" },
|
|
1667
2492
|
helm__add_contact: { action: "add_contact", method: "POST", resultKey: "contact", successMsg: "Contact created successfully!" },
|
|
1668
2493
|
helm__update_contact: { action: "update_contact", method: "POST", resultKey: "contact", successMsg: "Contact updated successfully!" },
|
|
2494
|
+
helm__delete_contact: { action: "delete_contact", method: "POST", successMsg: "Contact deleted successfully!" },
|
|
1669
2495
|
// Deals
|
|
1670
2496
|
helm__get_deals: { action: "get_deals", method: "GET", resultKey: "deals" },
|
|
1671
2497
|
helm__get_deal: { action: "get_deal", method: "GET", resultKey: "deal" },
|
|
@@ -1688,6 +2514,31 @@ const TOOL_ROUTES = {
|
|
|
1688
2514
|
helm__create_agent_schedule: { action: "create_agent_schedule", method: "POST", resultKey: "schedule", successMsg: "Schedule created successfully!" },
|
|
1689
2515
|
helm__update_agent_schedule: { action: "update_agent_schedule", method: "POST", resultKey: "schedule", successMsg: "Schedule updated successfully!" },
|
|
1690
2516
|
helm__delete_agent_schedule: { action: "delete_agent_schedule", method: "POST", successMsg: "Schedule deleted successfully." },
|
|
2517
|
+
// Workflows (read + authoring + lifecycle)
|
|
2518
|
+
helm__get_workflows: { action: "get_workflows", method: "GET", resultKey: "workflows" },
|
|
2519
|
+
helm__get_workflow: { action: "get_workflow", method: "GET", resultKey: "workflow" },
|
|
2520
|
+
helm__get_workflow_executions: { action: "get_workflow_executions", method: "GET", resultKey: "executions" },
|
|
2521
|
+
helm__get_workflow_schema: { action: "get_workflow_schema", method: "GET", resultKey: "schema" },
|
|
2522
|
+
// sentinel resultKey "__full__" (never present) → returns the whole payload, so
|
|
2523
|
+
// create/update surface { workflow, warnings, incomplete } and execute/delete
|
|
2524
|
+
// surface their full result, not just a success string.
|
|
2525
|
+
helm__create_workflow: { action: "create_workflow", method: "POST", resultKey: "__full__", successMsg: "Workflow created." },
|
|
2526
|
+
helm__update_workflow: { action: "update_workflow", method: "POST", resultKey: "__full__", successMsg: "Workflow updated." },
|
|
2527
|
+
helm__delete_workflow: { action: "delete_workflow", method: "POST", resultKey: "__full__", successMsg: "Workflow deleted." },
|
|
2528
|
+
helm__set_workflow_status: { action: "set_workflow_status", method: "POST", resultKey: "workflow", successMsg: "Workflow status updated." },
|
|
2529
|
+
helm__execute_workflow: { action: "execute_workflow", method: "POST", resultKey: "__full__", successMsg: "Workflow execution requested." },
|
|
2530
|
+
// Email sequences
|
|
2531
|
+
helm__list_email_sequences: { action: "list_email_sequences", method: "GET", resultKey: "sequences" },
|
|
2532
|
+
// resultKey "detail" is intentionally absent → the full { sequence, steps } payload
|
|
2533
|
+
// surfaces via the `result[resultKey] ?? result` fallback (a plain "sequence" key would drop steps).
|
|
2534
|
+
helm__get_sequence: { action: "get_sequence", method: "GET", resultKey: "detail" },
|
|
2535
|
+
helm__list_sequence_enrollments: { action: "list_sequence_enrollments", method: "GET", resultKey: "enrollments" },
|
|
2536
|
+
// resultKey "enrollment" is intentionally absent → handler's flat { ok, enrolled, skipped_reason } shape
|
|
2537
|
+
// surfaces in full via the `result[resultKey] ?? result` fallback, so the model sees skip reasons.
|
|
2538
|
+
helm__enroll_in_sequence: { action: "enroll_in_sequence", method: "POST", resultKey: "enrollment", successMsg: "Enrollment processed." },
|
|
2539
|
+
helm__create_email_sequence: { action: "create_email_sequence", method: "POST", resultKey: "sequence", successMsg: "Sequence created (draft)." },
|
|
2540
|
+
helm__create_sequence_email: { action: "create_sequence_email", method: "POST", resultKey: "step", successMsg: "Email added to sequence." },
|
|
2541
|
+
helm__agent_send_email: { action: "agent_send_email", method: "POST", successMsg: "Email sent by the agent." },
|
|
1691
2542
|
};
|
|
1692
2543
|
// Handle tool execution
|
|
1693
2544
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|