@helm-ai/mcp-server 0.1.10 → 0.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/README.md +101 -17
- package/dist/index.js +1132 -9
- 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,27 @@ 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',
|
|
48
|
+
helm__update_email_sequence: 'sequences', helm__delete_email_sequence: 'sequences',
|
|
49
|
+
helm__update_sequence_email: 'sequences', helm__delete_sequence_email: 'sequences', helm__reorder_sequence_emails: 'sequences',
|
|
43
50
|
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',
|
|
51
|
+
helm__get_contacts: 'contacts', helm__get_contact: 'contacts', helm__add_contact: 'contacts', helm__update_contact: 'contacts', helm__delete_contact: 'contacts',
|
|
45
52
|
helm__get_deals: 'deals', helm__get_deal: 'deals', helm__add_deal: 'deals', helm__update_deal: 'deals', helm__delete_deal: 'deals',
|
|
53
|
+
helm__attach_product_to_deal: 'deals',
|
|
54
|
+
helm__list_account_products: 'contacts', helm__attach_product_to_account: 'contacts',
|
|
55
|
+
helm__update_account_product: 'contacts', helm__detach_product_from_account: 'contacts',
|
|
46
56
|
helm__get_invoices: 'invoices', helm__get_invoice: 'invoices', helm__create_invoice: 'invoices', helm__update_invoice: 'invoices',
|
|
47
57
|
helm__get_estimates: 'estimates', helm__create_estimate: 'estimates',
|
|
48
58
|
helm__get_time_entries: 'timesheets', helm__create_time_entry: 'timesheets',
|
|
49
59
|
helm__get_agent_schedules: 'ai_agents', helm__create_agent_schedule: 'ai_agents', helm__update_agent_schedule: 'ai_agents', helm__delete_agent_schedule: 'ai_agents',
|
|
60
|
+
helm__get_agent_objectives: 'ai_agents', helm__create_agent_objective: 'ai_agents', helm__update_agent_objective: 'ai_agents', helm__delete_agent_objective: 'ai_agents',
|
|
61
|
+
helm__get_agent_watches: 'ai_agents', helm__create_agent_watch: 'ai_agents', helm__update_agent_watch: 'ai_agents', helm__delete_agent_watch: 'ai_agents',
|
|
62
|
+
// helm__list_products / get_product / create_product remain core (always-available — no `products` module yet)
|
|
63
|
+
// helm__add_line_item_from_product gates via the invoice OR estimate module — checked at the edge function layer
|
|
50
64
|
};
|
|
51
65
|
// Cache workspace module settings (refreshed on each ListTools call)
|
|
52
66
|
let cachedModules = null;
|
|
@@ -144,6 +158,20 @@ const tools = [
|
|
|
144
158
|
items: { type: "string" },
|
|
145
159
|
description: "Array of user IDs to assign to this task (max 5)",
|
|
146
160
|
},
|
|
161
|
+
attachments: {
|
|
162
|
+
type: "array",
|
|
163
|
+
description: "Files to attach to the task. Upload each file first with helm__upload_attachment, then pass the returned objects here. Max 20.",
|
|
164
|
+
items: {
|
|
165
|
+
type: "object",
|
|
166
|
+
properties: {
|
|
167
|
+
url: { type: "string", description: "Public URL returned by helm__upload_attachment" },
|
|
168
|
+
filename: { type: "string", description: "Display filename" },
|
|
169
|
+
size: { type: "number", description: "File size in bytes" },
|
|
170
|
+
content_type: { type: "string", description: "MIME type (e.g. application/pdf)" },
|
|
171
|
+
},
|
|
172
|
+
required: ["url", "filename"],
|
|
173
|
+
},
|
|
174
|
+
},
|
|
147
175
|
},
|
|
148
176
|
required: ["title"],
|
|
149
177
|
},
|
|
@@ -245,7 +273,7 @@ const tools = [
|
|
|
245
273
|
},
|
|
246
274
|
{
|
|
247
275
|
name: "helm__add_task_comment",
|
|
248
|
-
description: "Add a comment to a task.",
|
|
276
|
+
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
277
|
inputSchema: {
|
|
250
278
|
type: "object",
|
|
251
279
|
properties: {
|
|
@@ -257,10 +285,46 @@ const tools = [
|
|
|
257
285
|
type: "string",
|
|
258
286
|
description: "The comment content",
|
|
259
287
|
},
|
|
288
|
+
attachments: {
|
|
289
|
+
type: "array",
|
|
290
|
+
description: "Files to attach to the comment. Upload each file first with helm__upload_attachment, then pass the returned objects here. Max 20.",
|
|
291
|
+
items: {
|
|
292
|
+
type: "object",
|
|
293
|
+
properties: {
|
|
294
|
+
url: { type: "string", description: "Public URL returned by helm__upload_attachment" },
|
|
295
|
+
filename: { type: "string", description: "Display filename" },
|
|
296
|
+
size: { type: "number", description: "File size in bytes" },
|
|
297
|
+
content_type: { type: "string", description: "MIME type (e.g. application/pdf)" },
|
|
298
|
+
},
|
|
299
|
+
required: ["url", "filename"],
|
|
300
|
+
},
|
|
301
|
+
},
|
|
260
302
|
},
|
|
261
303
|
required: ["task_id", "content"],
|
|
262
304
|
},
|
|
263
305
|
},
|
|
306
|
+
{
|
|
307
|
+
name: "helm__upload_attachment",
|
|
308
|
+
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.",
|
|
309
|
+
inputSchema: {
|
|
310
|
+
type: "object",
|
|
311
|
+
properties: {
|
|
312
|
+
filename: {
|
|
313
|
+
type: "string",
|
|
314
|
+
description: "Filename including extension, e.g. 'report.pdf'",
|
|
315
|
+
},
|
|
316
|
+
content_type: {
|
|
317
|
+
type: "string",
|
|
318
|
+
description: "MIME type, e.g. 'application/pdf', 'image/png'. Defaults to application/octet-stream.",
|
|
319
|
+
},
|
|
320
|
+
data_base64: {
|
|
321
|
+
type: "string",
|
|
322
|
+
description: "The file contents, base64-encoded (a 'data:' URL is also accepted).",
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
required: ["filename", "data_base64"],
|
|
326
|
+
},
|
|
327
|
+
},
|
|
264
328
|
{
|
|
265
329
|
name: "helm__create_document",
|
|
266
330
|
description: "Create a new document in Helm. Documents can optionally be linked to a project.",
|
|
@@ -693,6 +757,335 @@ const tools = [
|
|
|
693
757
|
required: [],
|
|
694
758
|
},
|
|
695
759
|
},
|
|
760
|
+
// Product tools
|
|
761
|
+
{
|
|
762
|
+
name: "helm__list_products",
|
|
763
|
+
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.",
|
|
764
|
+
inputSchema: {
|
|
765
|
+
type: "object",
|
|
766
|
+
properties: {
|
|
767
|
+
active_only: { type: "boolean", description: "Excludes archived products when true (default true)." },
|
|
768
|
+
category: { type: "string", description: "Filter by category (free-text bucket, e.g. 'Plugin', 'SEO')." },
|
|
769
|
+
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." },
|
|
770
|
+
limit: { type: "number", description: "Max products to return (default 100)." },
|
|
771
|
+
},
|
|
772
|
+
required: [],
|
|
773
|
+
},
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
name: "helm__get_product",
|
|
777
|
+
description: "Get a product by id or fuzzy name match.",
|
|
778
|
+
inputSchema: {
|
|
779
|
+
type: "object",
|
|
780
|
+
properties: {
|
|
781
|
+
product_id: { type: "string", description: "UUID of the product (preferred when known)." },
|
|
782
|
+
name: { type: "string", description: "Fuzzy name match." },
|
|
783
|
+
},
|
|
784
|
+
required: [],
|
|
785
|
+
},
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
name: "helm__create_product",
|
|
789
|
+
description: "Create a new product in the workspace catalog. Confirm with the user before adding unless explicitly requested.",
|
|
790
|
+
inputSchema: {
|
|
791
|
+
type: "object",
|
|
792
|
+
properties: {
|
|
793
|
+
name: { type: "string", description: "Display name, e.g. 'SEO Retainer'." },
|
|
794
|
+
description: { type: "string", description: "Short description; used as the default line-item text." },
|
|
795
|
+
category: { type: "string", description: "Free-text category, e.g. 'Plugin'." },
|
|
796
|
+
billing_interval: { type: "string", enum: ["day", "week", "month", "year"], description: "Set for recurring products. Omit for one-time." },
|
|
797
|
+
default_rate: { type: "number", description: "Default price." },
|
|
798
|
+
unit: { type: "string", enum: ["hour", "day", "week", "month", "project", "unit", "license", "seat", "word", "page"], description: "What the rate is per (mainly for one-time)." },
|
|
799
|
+
currency: { type: "string", description: "3-letter ISO code. Defaults to USD." },
|
|
800
|
+
tax_rate: { type: "number", description: "Default tax rate percentage." },
|
|
801
|
+
positioning: { type: "string", description: "Who it's for / what problem it solves." },
|
|
802
|
+
deliverables: { type: "array", items: { type: "string" }, description: "List of included items." },
|
|
803
|
+
},
|
|
804
|
+
required: ["name"],
|
|
805
|
+
},
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
name: "helm__update_product",
|
|
809
|
+
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).",
|
|
810
|
+
inputSchema: {
|
|
811
|
+
type: "object",
|
|
812
|
+
properties: {
|
|
813
|
+
product_id: { type: "string", description: "UUID of the product to update." },
|
|
814
|
+
name: { type: "string", description: "New display name." },
|
|
815
|
+
description: { type: "string", description: "New short description." },
|
|
816
|
+
category: { type: "string", description: "New free-text category." },
|
|
817
|
+
billing_interval: { type: "string", enum: ["day", "week", "month", "year"], description: "Make recurring at this cadence." },
|
|
818
|
+
default_rate: { type: "number", description: "New default price." },
|
|
819
|
+
unit: { type: "string", enum: ["hour", "day", "week", "month", "project", "unit", "license", "seat", "word", "page"], description: "What the rate is per." },
|
|
820
|
+
currency: { type: "string", description: "3-letter ISO code." },
|
|
821
|
+
tax_rate: { type: "number", description: "Default tax rate percentage." },
|
|
822
|
+
positioning: { type: "string", description: "Who it's for / what problem it solves." },
|
|
823
|
+
deliverables: { type: "array", items: { type: "string" }, description: "Replaces the full deliverables list." },
|
|
824
|
+
is_active: { type: "boolean", description: "Set false to archive, true to reactivate." },
|
|
825
|
+
},
|
|
826
|
+
required: ["product_id"],
|
|
827
|
+
},
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
name: "helm__archive_product",
|
|
831
|
+
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.",
|
|
832
|
+
inputSchema: {
|
|
833
|
+
type: "object",
|
|
834
|
+
properties: {
|
|
835
|
+
product_id: { type: "string", description: "UUID of the product to archive." },
|
|
836
|
+
unarchive: { type: "boolean", description: "Set true to reactivate a previously archived product." },
|
|
837
|
+
},
|
|
838
|
+
required: ["product_id"],
|
|
839
|
+
},
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
name: "helm__attach_product_to_deal",
|
|
843
|
+
description: "Attach a product from the catalog to a deal. Sum of attached products suggests the deal value.",
|
|
844
|
+
inputSchema: {
|
|
845
|
+
type: "object",
|
|
846
|
+
properties: {
|
|
847
|
+
deal_id: { type: "string", description: "UUID of the deal." },
|
|
848
|
+
product_id: { type: "string", description: "UUID of the product." },
|
|
849
|
+
product_price_id: { type: "string", description: "UUID of a specific price tier (from the product's `prices`). Omit for the default tier." },
|
|
850
|
+
quantity: { type: "number", description: "Defaults to 1." },
|
|
851
|
+
rate: { type: "number", description: "Override the tier/default price. Omit to follow the chosen tier." },
|
|
852
|
+
notes: { type: "string", description: "Optional internal note." },
|
|
853
|
+
},
|
|
854
|
+
required: ["deal_id", "product_id"],
|
|
855
|
+
},
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
name: "helm__add_line_item_from_product",
|
|
859
|
+
description: "Add a line item to an invoice or estimate using a product from the catalog. Defaults description and rate from the product.",
|
|
860
|
+
inputSchema: {
|
|
861
|
+
type: "object",
|
|
862
|
+
properties: {
|
|
863
|
+
document_type: { type: "string", enum: ["invoice", "estimate"], description: "Which document type." },
|
|
864
|
+
document_id: { type: "string", description: "UUID of the invoice or estimate." },
|
|
865
|
+
product_id: { type: "string", description: "UUID of the product." },
|
|
866
|
+
product_price_id: { type: "string", description: "UUID of a specific price tier (from the product's `prices`). Omit for the default tier." },
|
|
867
|
+
quantity: { type: "number", description: "Defaults to 1." },
|
|
868
|
+
rate_override: { type: "number", description: "Override the tier/default price. Omit to follow the chosen tier." },
|
|
869
|
+
description_override: { type: "string", description: "Override the auto-derived description." },
|
|
870
|
+
},
|
|
871
|
+
required: ["document_type", "document_id", "product_id"],
|
|
872
|
+
},
|
|
873
|
+
},
|
|
874
|
+
// Product price tier tools
|
|
875
|
+
{
|
|
876
|
+
name: "helm__list_product_prices",
|
|
877
|
+
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`.",
|
|
878
|
+
inputSchema: {
|
|
879
|
+
type: "object",
|
|
880
|
+
properties: {
|
|
881
|
+
product_id: { type: "string", description: "UUID of the product." },
|
|
882
|
+
},
|
|
883
|
+
required: ["product_id"],
|
|
884
|
+
},
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
name: "helm__create_product_price",
|
|
888
|
+
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.",
|
|
889
|
+
inputSchema: {
|
|
890
|
+
type: "object",
|
|
891
|
+
properties: {
|
|
892
|
+
product_id: { type: "string", description: "UUID of the product to add a tier to." },
|
|
893
|
+
label: { type: "string", description: "Tier name, e.g. 'Single Site', '5 Sites', 'Unlimited'." },
|
|
894
|
+
amount: { type: "number", description: "Regular (list) price. Omit/null for 'on request'." },
|
|
895
|
+
sale_amount: { type: "number", description: "Optional sale price; charged when below amount." },
|
|
896
|
+
currency: { type: "string", description: "3-letter ISO code. Defaults to the product's currency." },
|
|
897
|
+
billing_interval: { type: "string", enum: ["day", "week", "month", "year"], description: "Set for recurring tiers. Omit for one-time." },
|
|
898
|
+
unit: { type: "string", enum: ["hour", "day", "week", "month", "project", "unit", "license", "seat", "word", "page"], description: "What the price is per." },
|
|
899
|
+
is_default: { type: "boolean", description: "Make this the default tier (clears the previous default)." },
|
|
900
|
+
},
|
|
901
|
+
required: ["product_id", "label"],
|
|
902
|
+
},
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
name: "helm__update_product_price",
|
|
906
|
+
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.",
|
|
907
|
+
inputSchema: {
|
|
908
|
+
type: "object",
|
|
909
|
+
properties: {
|
|
910
|
+
price_id: { type: "string", description: "UUID of the price tier (from list_product_prices or a product's `prices`)." },
|
|
911
|
+
label: { type: "string", description: "New tier name." },
|
|
912
|
+
amount: { type: "number", description: "New regular price." },
|
|
913
|
+
sale_amount: { type: "number", description: "New sale price." },
|
|
914
|
+
currency: { type: "string", description: "3-letter ISO code." },
|
|
915
|
+
billing_interval: { type: "string", enum: ["day", "week", "month", "year"], description: "Make recurring at this cadence." },
|
|
916
|
+
unit: { type: "string", enum: ["hour", "day", "week", "month", "project", "unit", "license", "seat", "word", "page"], description: "What the price is per." },
|
|
917
|
+
is_default: { type: "boolean", description: "Set true to make this the default tier." },
|
|
918
|
+
},
|
|
919
|
+
required: ["price_id"],
|
|
920
|
+
},
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
name: "helm__delete_product_price",
|
|
924
|
+
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.",
|
|
925
|
+
inputSchema: {
|
|
926
|
+
type: "object",
|
|
927
|
+
properties: {
|
|
928
|
+
price_id: { type: "string", description: "UUID of the price tier to delete." },
|
|
929
|
+
},
|
|
930
|
+
required: ["price_id"],
|
|
931
|
+
},
|
|
932
|
+
},
|
|
933
|
+
// Account-product attribution tools
|
|
934
|
+
{
|
|
935
|
+
name: "helm__list_account_products",
|
|
936
|
+
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.",
|
|
937
|
+
inputSchema: {
|
|
938
|
+
type: "object",
|
|
939
|
+
properties: {
|
|
940
|
+
account_id: { type: "string", description: "UUID of the account." },
|
|
941
|
+
},
|
|
942
|
+
required: ["account_id"],
|
|
943
|
+
},
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
name: "helm__attach_product_to_account",
|
|
947
|
+
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.",
|
|
948
|
+
inputSchema: {
|
|
949
|
+
type: "object",
|
|
950
|
+
properties: {
|
|
951
|
+
account_id: { type: "string", description: "UUID of the account." },
|
|
952
|
+
product_id: { type: "string", description: "UUID of the product." },
|
|
953
|
+
product_price_id: { type: "string", description: "UUID of a specific price tier (from the product's `prices`). Omit for the default tier." },
|
|
954
|
+
quantity: { type: "number", description: "Defaults to 1." },
|
|
955
|
+
rate: { type: "number", description: "Snapshot price for MRR calc. Follows the chosen tier if omitted." },
|
|
956
|
+
purchased_at: { type: "string", description: "ISO date the relationship began. Optional." },
|
|
957
|
+
ended_at: { type: "string", description: "ISO date the relationship ended. Omit for active customers." },
|
|
958
|
+
notes: { type: "string", description: "Optional context." },
|
|
959
|
+
},
|
|
960
|
+
required: ["account_id", "product_id"],
|
|
961
|
+
},
|
|
962
|
+
},
|
|
963
|
+
{
|
|
964
|
+
name: "helm__update_account_product",
|
|
965
|
+
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.",
|
|
966
|
+
inputSchema: {
|
|
967
|
+
type: "object",
|
|
968
|
+
properties: {
|
|
969
|
+
account_product_id: { type: "string", description: "UUID of the account_products row." },
|
|
970
|
+
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." },
|
|
971
|
+
quantity: { type: "number" },
|
|
972
|
+
rate: { type: "number" },
|
|
973
|
+
purchased_at: { type: "string", description: "ISO date." },
|
|
974
|
+
ended_at: { type: "string", description: "ISO date the relationship ended." },
|
|
975
|
+
notes: { type: "string" },
|
|
976
|
+
},
|
|
977
|
+
required: ["account_product_id"],
|
|
978
|
+
},
|
|
979
|
+
},
|
|
980
|
+
{
|
|
981
|
+
name: "helm__detach_product_from_account",
|
|
982
|
+
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.",
|
|
983
|
+
inputSchema: {
|
|
984
|
+
type: "object",
|
|
985
|
+
properties: {
|
|
986
|
+
account_product_id: { type: "string", description: "UUID of the account_products row." },
|
|
987
|
+
},
|
|
988
|
+
required: ["account_product_id"],
|
|
989
|
+
},
|
|
990
|
+
},
|
|
991
|
+
// Forms tools
|
|
992
|
+
{
|
|
993
|
+
name: "helm__list_forms",
|
|
994
|
+
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.",
|
|
995
|
+
inputSchema: {
|
|
996
|
+
type: "object",
|
|
997
|
+
properties: {
|
|
998
|
+
status: { type: "string", enum: ["draft", "live", "archived"], description: "Filter by status." },
|
|
999
|
+
limit: { type: "number", description: "Max forms (default 100)." },
|
|
1000
|
+
},
|
|
1001
|
+
required: [],
|
|
1002
|
+
},
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
name: "helm__get_form",
|
|
1006
|
+
description: "Get a form's full structure — steps, fields, status, and (if live) an inline embed snippet.",
|
|
1007
|
+
inputSchema: {
|
|
1008
|
+
type: "object",
|
|
1009
|
+
properties: { form_id: { type: "string", description: "UUID of the form." } },
|
|
1010
|
+
required: ["form_id"],
|
|
1011
|
+
},
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
name: "helm__get_form_submissions",
|
|
1015
|
+
description: "Read recent submissions (visitor-entered values) for a form. Use for 'show me recent leads from X'.",
|
|
1016
|
+
inputSchema: {
|
|
1017
|
+
type: "object",
|
|
1018
|
+
properties: {
|
|
1019
|
+
form_id: { type: "string", description: "UUID of the form." },
|
|
1020
|
+
limit: { type: "number", description: "Max submissions, newest first (default 20, max 100)." },
|
|
1021
|
+
},
|
|
1022
|
+
required: ["form_id"],
|
|
1023
|
+
},
|
|
1024
|
+
},
|
|
1025
|
+
{
|
|
1026
|
+
name: "helm__get_form_stats",
|
|
1027
|
+
description: "Get submission counts for a form (total, last 7 days, last 30 days).",
|
|
1028
|
+
inputSchema: {
|
|
1029
|
+
type: "object",
|
|
1030
|
+
properties: { form_id: { type: "string", description: "UUID of the form." } },
|
|
1031
|
+
required: ["form_id"],
|
|
1032
|
+
},
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
name: "helm__create_form",
|
|
1036
|
+
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.",
|
|
1037
|
+
inputSchema: {
|
|
1038
|
+
type: "object",
|
|
1039
|
+
properties: {
|
|
1040
|
+
name: { type: "string", description: "Form name." },
|
|
1041
|
+
description: { type: "string", description: "Optional description shown above the form." },
|
|
1042
|
+
status: { type: "string", enum: ["draft", "live", "archived"], description: "Defaults to draft." },
|
|
1043
|
+
},
|
|
1044
|
+
required: ["name"],
|
|
1045
|
+
},
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
name: "helm__add_form_step",
|
|
1049
|
+
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.",
|
|
1050
|
+
inputSchema: {
|
|
1051
|
+
type: "object",
|
|
1052
|
+
properties: {
|
|
1053
|
+
form_id: { type: "string", description: "UUID of the form." },
|
|
1054
|
+
title: { type: "string", description: "Step heading." },
|
|
1055
|
+
subtitle: { type: "string", description: "Optional subtitle." },
|
|
1056
|
+
},
|
|
1057
|
+
required: ["form_id"],
|
|
1058
|
+
},
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
name: "helm__add_form_field",
|
|
1062
|
+
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.",
|
|
1063
|
+
inputSchema: {
|
|
1064
|
+
type: "object",
|
|
1065
|
+
properties: {
|
|
1066
|
+
form_id: { type: "string", description: "UUID of the form." },
|
|
1067
|
+
type: { type: "string", enum: ["text", "textarea", "email", "phone", "number", "date", "time", "select", "radio", "checkbox", "file", "choice_cards"], description: "Field type." },
|
|
1068
|
+
label: { type: "string", description: "Field label." },
|
|
1069
|
+
required: { type: "boolean", description: "Whether the field is required (default false)." },
|
|
1070
|
+
placeholder: { type: "string", description: "Placeholder text." },
|
|
1071
|
+
options: { type: "array", items: { type: "string" }, description: "Choices (required for select/radio/checkbox/choice_cards)." },
|
|
1072
|
+
step_id: { type: "string", description: "Step UUID (for multi-step forms)." },
|
|
1073
|
+
},
|
|
1074
|
+
required: ["form_id", "type", "label"],
|
|
1075
|
+
},
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
name: "helm__set_form_status",
|
|
1079
|
+
description: "Publish/unpublish a form. 'live' makes it embeddable + accept submissions; 'draft' takes it offline; 'archived' retires it.",
|
|
1080
|
+
inputSchema: {
|
|
1081
|
+
type: "object",
|
|
1082
|
+
properties: {
|
|
1083
|
+
form_id: { type: "string", description: "UUID of the form." },
|
|
1084
|
+
status: { type: "string", enum: ["draft", "live", "archived"], description: "New status." },
|
|
1085
|
+
},
|
|
1086
|
+
required: ["form_id", "status"],
|
|
1087
|
+
},
|
|
1088
|
+
},
|
|
696
1089
|
// Account tools
|
|
697
1090
|
{
|
|
698
1091
|
name: "helm__get_accounts",
|
|
@@ -716,7 +1109,11 @@ const tools = [
|
|
|
716
1109
|
},
|
|
717
1110
|
limit: {
|
|
718
1111
|
type: "number",
|
|
719
|
-
description: "Maximum number of accounts to return (default: 50)",
|
|
1112
|
+
description: "Maximum number of accounts to return (default: 50, max 1000 per page)",
|
|
1113
|
+
},
|
|
1114
|
+
offset: {
|
|
1115
|
+
type: "number",
|
|
1116
|
+
description: "Number of records to skip — page through large result sets (default: 0)",
|
|
720
1117
|
},
|
|
721
1118
|
},
|
|
722
1119
|
required: [],
|
|
@@ -736,6 +1133,28 @@ const tools = [
|
|
|
736
1133
|
required: ["account_id"],
|
|
737
1134
|
},
|
|
738
1135
|
},
|
|
1136
|
+
{
|
|
1137
|
+
name: "helm__log_activity",
|
|
1138
|
+
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.",
|
|
1139
|
+
inputSchema: {
|
|
1140
|
+
type: "object",
|
|
1141
|
+
properties: {
|
|
1142
|
+
entity_type: {
|
|
1143
|
+
type: "string",
|
|
1144
|
+
enum: ["account", "contact", "deal", "project", "task", "invoice", "estimate", "document", "time_entry"],
|
|
1145
|
+
description: "Type of record to attach the activity to",
|
|
1146
|
+
},
|
|
1147
|
+
entity_id: { type: "string", description: "UUID of the record" },
|
|
1148
|
+
mode: { type: "string", enum: ["action", "data_point"], description: "Default 'action'." },
|
|
1149
|
+
activity_type: { type: "string", description: "Action mode: note, call, email, meeting, sms, status_changed, etc. Default 'note'." },
|
|
1150
|
+
description: { type: "string", description: "What happened (action), or optional context (data point)" },
|
|
1151
|
+
data_name: { type: "string", description: "Data point mode: the metric name, e.g. 'NPS'" },
|
|
1152
|
+
data_value: { type: "string", description: "Data point mode: the value, e.g. '9'" },
|
|
1153
|
+
data_unit: { type: "string", description: "Data point mode: optional unit, e.g. '$', '%'" },
|
|
1154
|
+
},
|
|
1155
|
+
required: ["entity_type", "entity_id"],
|
|
1156
|
+
},
|
|
1157
|
+
},
|
|
739
1158
|
{
|
|
740
1159
|
name: "helm__add_account",
|
|
741
1160
|
description: "Create a new account/client in Helm",
|
|
@@ -792,6 +1211,16 @@ const tools = [
|
|
|
792
1211
|
type: "string",
|
|
793
1212
|
description: "Country",
|
|
794
1213
|
},
|
|
1214
|
+
tags: {
|
|
1215
|
+
type: "array",
|
|
1216
|
+
items: { type: "string" },
|
|
1217
|
+
description: "Tags for categorization",
|
|
1218
|
+
},
|
|
1219
|
+
custom_fields: {
|
|
1220
|
+
type: "object",
|
|
1221
|
+
additionalProperties: true,
|
|
1222
|
+
description: "Custom field values as a JSON object (key → value)",
|
|
1223
|
+
},
|
|
795
1224
|
owner_id: {
|
|
796
1225
|
type: "string",
|
|
797
1226
|
description: "ID of the account owner (user)",
|
|
@@ -860,6 +1289,16 @@ const tools = [
|
|
|
860
1289
|
type: "string",
|
|
861
1290
|
description: "Updated country",
|
|
862
1291
|
},
|
|
1292
|
+
tags: {
|
|
1293
|
+
type: "array",
|
|
1294
|
+
items: { type: "string" },
|
|
1295
|
+
description: "Updated tags (replaces the existing set)",
|
|
1296
|
+
},
|
|
1297
|
+
custom_fields: {
|
|
1298
|
+
type: "object",
|
|
1299
|
+
additionalProperties: true,
|
|
1300
|
+
description: "Updated custom field values as a JSON object (key → value)",
|
|
1301
|
+
},
|
|
863
1302
|
owner_id: {
|
|
864
1303
|
type: "string",
|
|
865
1304
|
description: "Updated account owner ID",
|
|
@@ -891,7 +1330,11 @@ const tools = [
|
|
|
891
1330
|
},
|
|
892
1331
|
limit: {
|
|
893
1332
|
type: "number",
|
|
894
|
-
description: "Maximum number of contacts to return (default: 50)",
|
|
1333
|
+
description: "Maximum number of contacts to return (default: 50, max 1000 per page)",
|
|
1334
|
+
},
|
|
1335
|
+
offset: {
|
|
1336
|
+
type: "number",
|
|
1337
|
+
description: "Number of records to skip — page through large result sets (default: 0)",
|
|
895
1338
|
},
|
|
896
1339
|
},
|
|
897
1340
|
required: [],
|
|
@@ -955,6 +1398,16 @@ const tools = [
|
|
|
955
1398
|
type: "string",
|
|
956
1399
|
description: "Notes about the contact",
|
|
957
1400
|
},
|
|
1401
|
+
tags: {
|
|
1402
|
+
type: "array",
|
|
1403
|
+
items: { type: "string" },
|
|
1404
|
+
description: "Tags for categorization",
|
|
1405
|
+
},
|
|
1406
|
+
custom_fields: {
|
|
1407
|
+
type: "object",
|
|
1408
|
+
additionalProperties: true,
|
|
1409
|
+
description: "Custom field values as a JSON object (key → value)",
|
|
1410
|
+
},
|
|
958
1411
|
},
|
|
959
1412
|
required: ["first_name"],
|
|
960
1413
|
},
|
|
@@ -1007,6 +1460,30 @@ const tools = [
|
|
|
1007
1460
|
type: "string",
|
|
1008
1461
|
description: "Updated notes",
|
|
1009
1462
|
},
|
|
1463
|
+
tags: {
|
|
1464
|
+
type: "array",
|
|
1465
|
+
items: { type: "string" },
|
|
1466
|
+
description: "Updated tags (replaces the existing set)",
|
|
1467
|
+
},
|
|
1468
|
+
custom_fields: {
|
|
1469
|
+
type: "object",
|
|
1470
|
+
additionalProperties: true,
|
|
1471
|
+
description: "Updated custom field values as a JSON object (key → value)",
|
|
1472
|
+
},
|
|
1473
|
+
},
|
|
1474
|
+
required: ["contact_id"],
|
|
1475
|
+
},
|
|
1476
|
+
},
|
|
1477
|
+
{
|
|
1478
|
+
name: "helm__delete_contact",
|
|
1479
|
+
description: "Delete a contact/person permanently",
|
|
1480
|
+
inputSchema: {
|
|
1481
|
+
type: "object",
|
|
1482
|
+
properties: {
|
|
1483
|
+
contact_id: {
|
|
1484
|
+
type: "string",
|
|
1485
|
+
description: "The ID of the contact to delete",
|
|
1486
|
+
},
|
|
1010
1487
|
},
|
|
1011
1488
|
required: ["contact_id"],
|
|
1012
1489
|
},
|
|
@@ -1547,12 +2024,17 @@ const tools = [
|
|
|
1547
2024
|
},
|
|
1548
2025
|
day_of_week: {
|
|
1549
2026
|
type: "number",
|
|
1550
|
-
description: "
|
|
2027
|
+
description: "Single day of week for weekly schedules (0=Sun, 1=Mon, ..., 6=Sat). Prefer days_of_week for multiple days.",
|
|
1551
2028
|
},
|
|
1552
2029
|
day_of_month: {
|
|
1553
2030
|
type: "number",
|
|
1554
2031
|
description: "Day of month for monthly schedules (1-28)",
|
|
1555
2032
|
},
|
|
2033
|
+
days_of_week: {
|
|
2034
|
+
type: "array",
|
|
2035
|
+
items: { type: "number" },
|
|
2036
|
+
description: "Days of week the schedule runs (0=Sun..6=Sat). For 'daily', restrict to specific days (e.g. [1,2,3,4,5] = weekdays only, skipping weekends). For 'weekly', the set of days to fire on. Omit for every day (daily) or the single day_of_week (weekly).",
|
|
2037
|
+
},
|
|
1556
2038
|
time_of_day: {
|
|
1557
2039
|
type: "string",
|
|
1558
2040
|
description: "Time to run in HH:MM format (default: '09:00')",
|
|
@@ -1561,14 +2043,18 @@ const tools = [
|
|
|
1561
2043
|
type: "string",
|
|
1562
2044
|
description: "Timezone (default: 'America/New_York')",
|
|
1563
2045
|
},
|
|
2046
|
+
model: {
|
|
2047
|
+
type: "string",
|
|
2048
|
+
description: "Optional model override for this routine (e.g. 'claude-sonnet-4-20250514'). Omit for the cost-optimized default (Haiku).",
|
|
2049
|
+
},
|
|
1564
2050
|
output_channel: {
|
|
1565
2051
|
type: "string",
|
|
1566
|
-
enum: ["notification", "slack", "task_comment"],
|
|
2052
|
+
enum: ["notification", "slack", "task_comment", "email"],
|
|
1567
2053
|
description: "Where to deliver results (default: 'notification')",
|
|
1568
2054
|
},
|
|
1569
2055
|
output_config: {
|
|
1570
2056
|
type: "object",
|
|
1571
|
-
description: "Output config: slack needs {channel_id, channel_name}, task_comment needs {task_id}",
|
|
2057
|
+
description: "Output config: slack needs {channel_id, channel_name}, task_comment needs {task_id}, email needs {to} (string or array of email addresses; defaults to the creator's email)",
|
|
1572
2058
|
},
|
|
1573
2059
|
},
|
|
1574
2060
|
required: ["agent_id", "name", "prompt", "frequency"],
|
|
@@ -1589,9 +2075,11 @@ const tools = [
|
|
|
1589
2075
|
frequency: { type: "string", enum: ["daily", "weekly", "monthly"] },
|
|
1590
2076
|
day_of_week: { type: "number" },
|
|
1591
2077
|
day_of_month: { type: "number" },
|
|
2078
|
+
days_of_week: { type: "array", items: { type: "number" }, description: "Days of week the schedule runs (0=Sun..6=Sat). e.g. [1,2,3,4,5] = weekdays only." },
|
|
1592
2079
|
time_of_day: { type: "string" },
|
|
1593
2080
|
timezone: { type: "string" },
|
|
1594
|
-
|
|
2081
|
+
model: { type: "string", description: "Optional model override; omit for the cost-optimized default (Haiku)." },
|
|
2082
|
+
output_channel: { type: "string", enum: ["notification", "slack", "task_comment", "email"] },
|
|
1595
2083
|
output_config: { type: "object" },
|
|
1596
2084
|
enabled: { type: "boolean", description: "Enable or disable the schedule" },
|
|
1597
2085
|
},
|
|
@@ -1612,6 +2100,573 @@ const tools = [
|
|
|
1612
2100
|
required: ["schedule_id"],
|
|
1613
2101
|
},
|
|
1614
2102
|
},
|
|
2103
|
+
// Proactive agents: standing objectives + entity watches
|
|
2104
|
+
{
|
|
2105
|
+
name: "helm__get_agent_objectives",
|
|
2106
|
+
description: "List standing objectives (persistent goals an AI agent pursues across runs). Optionally filter by agent_id.",
|
|
2107
|
+
inputSchema: {
|
|
2108
|
+
type: "object",
|
|
2109
|
+
properties: { agent_id: { type: "string", description: "Filter objectives by agent ID" } },
|
|
2110
|
+
required: [],
|
|
2111
|
+
},
|
|
2112
|
+
},
|
|
2113
|
+
{
|
|
2114
|
+
name: "helm__create_agent_objective",
|
|
2115
|
+
description: "Create a standing objective: a persistent goal an agent works toward across runs (e.g. 'No invoice goes more than 7 days overdue without a reminder'). Link entity watches to it (via create_agent_watch with objective_id) so the agent is woken when relevant records change. The objective text + accumulated state are injected into each run for continuity.",
|
|
2116
|
+
inputSchema: {
|
|
2117
|
+
type: "object",
|
|
2118
|
+
properties: {
|
|
2119
|
+
agent_id: { type: "string", description: "ID of the agent that owns this objective" },
|
|
2120
|
+
name: { type: "string", description: "Short name (e.g. 'Keep AR current')" },
|
|
2121
|
+
objective: { type: "string", description: "The persistent goal in plain language" },
|
|
2122
|
+
max_acts_per_day: { type: "number", description: "Max full agent runs this objective may trigger per day (default 10). The cost/noise cap." },
|
|
2123
|
+
autonomy: { type: "string", enum: ["observe", "suggest", "auto"], description: "Default 'suggest'" },
|
|
2124
|
+
output_channel: { type: "string", enum: ["notification", "slack", "task_comment", "email"], description: "Where results are delivered (default 'notification')" },
|
|
2125
|
+
output_config: { type: "object", description: "Channel config: slack {channel_id, channel_name}, task_comment {task_id}, email {to}" },
|
|
2126
|
+
enabled: { type: "boolean", description: "Default true; set false to pause (halts all its watches)" },
|
|
2127
|
+
},
|
|
2128
|
+
required: ["agent_id", "name", "objective"],
|
|
2129
|
+
},
|
|
2130
|
+
},
|
|
2131
|
+
{
|
|
2132
|
+
name: "helm__update_agent_objective",
|
|
2133
|
+
description: "Update a standing objective. Pass objective_id plus fields to change. Watermarks (eval_count/act_count/etc.) cannot be set.",
|
|
2134
|
+
inputSchema: {
|
|
2135
|
+
type: "object",
|
|
2136
|
+
properties: {
|
|
2137
|
+
objective_id: { type: "string" },
|
|
2138
|
+
name: { type: "string" },
|
|
2139
|
+
objective: { type: "string" },
|
|
2140
|
+
max_acts_per_day: { type: "number" },
|
|
2141
|
+
autonomy: { type: "string", enum: ["observe", "suggest", "auto"] },
|
|
2142
|
+
output_channel: { type: "string", enum: ["notification", "slack", "task_comment", "email"] },
|
|
2143
|
+
output_config: { type: "object" },
|
|
2144
|
+
enabled: { type: "boolean" },
|
|
2145
|
+
},
|
|
2146
|
+
required: ["objective_id"],
|
|
2147
|
+
},
|
|
2148
|
+
},
|
|
2149
|
+
{
|
|
2150
|
+
name: "helm__delete_agent_objective",
|
|
2151
|
+
description: "Delete a standing objective permanently. Linked watches are unlinked (not deleted).",
|
|
2152
|
+
inputSchema: {
|
|
2153
|
+
type: "object",
|
|
2154
|
+
properties: { objective_id: { type: "string", description: "ID of the objective to delete" } },
|
|
2155
|
+
required: ["objective_id"],
|
|
2156
|
+
},
|
|
2157
|
+
},
|
|
2158
|
+
{
|
|
2159
|
+
name: "helm__get_agent_watches",
|
|
2160
|
+
description: "List entity watches (triggers that fire an agent relative to a record's date). Optionally filter by agent_id or objective_id.",
|
|
2161
|
+
inputSchema: {
|
|
2162
|
+
type: "object",
|
|
2163
|
+
properties: {
|
|
2164
|
+
agent_id: { type: "string", description: "Filter by agent ID" },
|
|
2165
|
+
objective_id: { type: "string", description: "Filter by linked objective ID" },
|
|
2166
|
+
},
|
|
2167
|
+
required: [],
|
|
2168
|
+
},
|
|
2169
|
+
},
|
|
2170
|
+
{
|
|
2171
|
+
name: "helm__create_agent_watch",
|
|
2172
|
+
description: "Create an entity watch: fire an agent relative to a date column on a record (e.g. '3 days before each invoice's due date', '7 days after a deal entered its stage'). The proactive gate evaluates each fire and only runs the agent when warranted (skips already-resolved records). Link to a standing objective via objective_id.",
|
|
2173
|
+
inputSchema: {
|
|
2174
|
+
type: "object",
|
|
2175
|
+
properties: {
|
|
2176
|
+
agent_id: { type: "string", description: "ID of the agent to fire" },
|
|
2177
|
+
name: { type: "string", description: "Name (e.g. 'Invoice due reminder')" },
|
|
2178
|
+
prompt: { type: "string", description: "What the agent should produce when it fires" },
|
|
2179
|
+
entity_type: { type: "string", enum: ["calendar_event", "task", "invoice", "deal", "estimate", "project", "subscription"], description: "Which record type to watch" },
|
|
2180
|
+
time_column: { type: "string", description: "Date column to anchor on. Allowed per entity — calendar_event: start_time; task: due_date|scheduled_start|scheduled_end|start_date; invoice: due_date|issue_date; deal: expected_close_date|actual_close_date|stage_entered_at; estimate: expiry_date|issue_date|accepted_date; project: stage_entered_at|created_at; subscription: current_period_end|trial_end" },
|
|
2181
|
+
offset_minutes: { type: "number", description: "Minutes relative to time_column to fire. Negative = before (e.g. -4320 = 3 days before), positive = after. Range ±43200 (±30 days)." },
|
|
2182
|
+
scope: { type: "string", enum: ["personal", "workspace"], description: "'workspace' (default) watches all matching records; 'personal' only the creator's records" },
|
|
2183
|
+
objective_id: { type: "string", description: "Optional: link this watch to a standing objective for continuity + rate limiting" },
|
|
2184
|
+
description: { type: "string" },
|
|
2185
|
+
output_channel: { type: "string", enum: ["notification", "slack", "task_comment", "email"], description: "Default 'notification'" },
|
|
2186
|
+
output_config: { type: "object", description: "Channel config (see create_agent_objective)" },
|
|
2187
|
+
enabled: { type: "boolean", description: "Default true" },
|
|
2188
|
+
},
|
|
2189
|
+
required: ["agent_id", "name", "prompt", "entity_type", "time_column", "offset_minutes"],
|
|
2190
|
+
},
|
|
2191
|
+
},
|
|
2192
|
+
{
|
|
2193
|
+
name: "helm__update_agent_watch",
|
|
2194
|
+
description: "Update an entity watch. Pass watch_id plus fields to change. entity_type/time_column changes are re-validated.",
|
|
2195
|
+
inputSchema: {
|
|
2196
|
+
type: "object",
|
|
2197
|
+
properties: {
|
|
2198
|
+
watch_id: { type: "string" },
|
|
2199
|
+
name: { type: "string" },
|
|
2200
|
+
prompt: { type: "string" },
|
|
2201
|
+
entity_type: { type: "string", enum: ["calendar_event", "task", "invoice", "deal", "estimate", "project", "subscription"] },
|
|
2202
|
+
time_column: { type: "string" },
|
|
2203
|
+
offset_minutes: { type: "number" },
|
|
2204
|
+
scope: { type: "string", enum: ["personal", "workspace"] },
|
|
2205
|
+
objective_id: { type: "string" },
|
|
2206
|
+
description: { type: "string" },
|
|
2207
|
+
output_channel: { type: "string", enum: ["notification", "slack", "task_comment", "email"] },
|
|
2208
|
+
output_config: { type: "object" },
|
|
2209
|
+
enabled: { type: "boolean" },
|
|
2210
|
+
},
|
|
2211
|
+
required: ["watch_id"],
|
|
2212
|
+
},
|
|
2213
|
+
},
|
|
2214
|
+
{
|
|
2215
|
+
name: "helm__delete_agent_watch",
|
|
2216
|
+
description: "Delete an entity watch permanently.",
|
|
2217
|
+
inputSchema: {
|
|
2218
|
+
type: "object",
|
|
2219
|
+
properties: { watch_id: { type: "string", description: "ID of the watch to delete" } },
|
|
2220
|
+
required: ["watch_id"],
|
|
2221
|
+
},
|
|
2222
|
+
},
|
|
2223
|
+
// Workflow tools (read-only)
|
|
2224
|
+
{
|
|
2225
|
+
name: "helm__get_workflows",
|
|
2226
|
+
description: "List automation workflows in the workspace. Returns id, name, status (draft/live/archived), trigger entity type, and step count. Optionally filter by status.",
|
|
2227
|
+
inputSchema: {
|
|
2228
|
+
type: "object",
|
|
2229
|
+
properties: {
|
|
2230
|
+
status: {
|
|
2231
|
+
type: "string",
|
|
2232
|
+
enum: ["draft", "live", "archived"],
|
|
2233
|
+
description: "Filter by workflow status",
|
|
2234
|
+
},
|
|
2235
|
+
limit: {
|
|
2236
|
+
type: "number",
|
|
2237
|
+
description: "Maximum number of workflows to return (default: 100)",
|
|
2238
|
+
},
|
|
2239
|
+
},
|
|
2240
|
+
required: [],
|
|
2241
|
+
},
|
|
2242
|
+
},
|
|
2243
|
+
{
|
|
2244
|
+
name: "helm__get_workflow",
|
|
2245
|
+
description: "Get a single workflow by ID, including its trigger configuration and full step definitions.",
|
|
2246
|
+
inputSchema: {
|
|
2247
|
+
type: "object",
|
|
2248
|
+
properties: {
|
|
2249
|
+
workflow_id: {
|
|
2250
|
+
type: "string",
|
|
2251
|
+
description: "ID (UUID) of the workflow",
|
|
2252
|
+
},
|
|
2253
|
+
},
|
|
2254
|
+
required: ["workflow_id"],
|
|
2255
|
+
},
|
|
2256
|
+
},
|
|
2257
|
+
{
|
|
2258
|
+
name: "helm__get_workflow_executions",
|
|
2259
|
+
description: "List recent workflow execution runs with their status (running/completed/failed/cancelled) and any error message. Filter by workflow_id and/or status.",
|
|
2260
|
+
inputSchema: {
|
|
2261
|
+
type: "object",
|
|
2262
|
+
properties: {
|
|
2263
|
+
workflow_id: {
|
|
2264
|
+
type: "string",
|
|
2265
|
+
description: "Filter executions to a single workflow",
|
|
2266
|
+
},
|
|
2267
|
+
status: {
|
|
2268
|
+
type: "string",
|
|
2269
|
+
enum: ["running", "completed", "failed", "cancelled"],
|
|
2270
|
+
description: "Filter by execution status",
|
|
2271
|
+
},
|
|
2272
|
+
limit: {
|
|
2273
|
+
type: "number",
|
|
2274
|
+
description: "Maximum number of executions to return (default: 25)",
|
|
2275
|
+
},
|
|
2276
|
+
},
|
|
2277
|
+
required: [],
|
|
2278
|
+
},
|
|
2279
|
+
},
|
|
2280
|
+
// Workflow authoring + lifecycle tools
|
|
2281
|
+
{
|
|
2282
|
+
name: "helm__get_workflow_schema",
|
|
2283
|
+
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.",
|
|
2284
|
+
inputSchema: { type: "object", properties: {}, required: [] },
|
|
2285
|
+
},
|
|
2286
|
+
{
|
|
2287
|
+
name: "helm__create_workflow",
|
|
2288
|
+
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.",
|
|
2289
|
+
inputSchema: {
|
|
2290
|
+
type: "object",
|
|
2291
|
+
properties: {
|
|
2292
|
+
name: { type: "string", description: "Workflow name" },
|
|
2293
|
+
description: { type: "string", description: "Optional description" },
|
|
2294
|
+
trigger_config: {
|
|
2295
|
+
type: "object",
|
|
2296
|
+
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.",
|
|
2297
|
+
},
|
|
2298
|
+
steps_config: {
|
|
2299
|
+
type: "array",
|
|
2300
|
+
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.",
|
|
2301
|
+
items: { type: "object" },
|
|
2302
|
+
},
|
|
2303
|
+
settings: { type: "object", description: "Optional settings (error_handling, notifications). Omit canvas positions — auto-laid-out." },
|
|
2304
|
+
status: { type: "string", enum: ["draft", "live"], description: "Default draft. 'live' requires the workflow to pass full validation." },
|
|
2305
|
+
},
|
|
2306
|
+
required: ["name", "trigger_config"],
|
|
2307
|
+
},
|
|
2308
|
+
},
|
|
2309
|
+
{
|
|
2310
|
+
name: "helm__update_workflow",
|
|
2311
|
+
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.",
|
|
2312
|
+
inputSchema: {
|
|
2313
|
+
type: "object",
|
|
2314
|
+
properties: {
|
|
2315
|
+
workflow_id: { type: "string", description: "ID (UUID) of the workflow" },
|
|
2316
|
+
name: { type: "string" },
|
|
2317
|
+
description: { type: "string" },
|
|
2318
|
+
trigger_config: { type: "object", description: "Replaces the trigger spec (see create_workflow)." },
|
|
2319
|
+
steps_config: { type: "array", description: "Replaces the steps array (see create_workflow).", items: { type: "object" } },
|
|
2320
|
+
settings: { type: "object" },
|
|
2321
|
+
status: { type: "string", enum: ["draft", "live", "archived"] },
|
|
2322
|
+
},
|
|
2323
|
+
required: ["workflow_id"],
|
|
2324
|
+
},
|
|
2325
|
+
},
|
|
2326
|
+
{
|
|
2327
|
+
name: "helm__delete_workflow",
|
|
2328
|
+
description: "Permanently delete a workflow.",
|
|
2329
|
+
inputSchema: {
|
|
2330
|
+
type: "object",
|
|
2331
|
+
properties: { workflow_id: { type: "string", description: "ID (UUID) of the workflow" } },
|
|
2332
|
+
required: ["workflow_id"],
|
|
2333
|
+
},
|
|
2334
|
+
},
|
|
2335
|
+
{
|
|
2336
|
+
name: "helm__set_workflow_status",
|
|
2337
|
+
description: "Set a workflow's status: 'live' to enable it, 'draft' to pause, 'archived' to retire. (To change the definition, use update_workflow.)",
|
|
2338
|
+
inputSchema: {
|
|
2339
|
+
type: "object",
|
|
2340
|
+
properties: {
|
|
2341
|
+
workflow_id: { type: "string", description: "ID (UUID) of the workflow" },
|
|
2342
|
+
status: { type: "string", enum: ["draft", "live", "archived"], description: "New status" },
|
|
2343
|
+
},
|
|
2344
|
+
required: ["workflow_id", "status"],
|
|
2345
|
+
},
|
|
2346
|
+
},
|
|
2347
|
+
{
|
|
2348
|
+
name: "helm__execute_workflow",
|
|
2349
|
+
description: "Manually run a workflow now, bypassing trigger-condition gating. Optionally pass trigger_data the steps can reference.",
|
|
2350
|
+
inputSchema: {
|
|
2351
|
+
type: "object",
|
|
2352
|
+
properties: {
|
|
2353
|
+
workflow_id: { type: "string", description: "ID (UUID) of the workflow" },
|
|
2354
|
+
trigger_data: { type: "object", description: "Optional data made available to steps as {{trigger.*}}" },
|
|
2355
|
+
},
|
|
2356
|
+
required: ["workflow_id"],
|
|
2357
|
+
},
|
|
2358
|
+
},
|
|
2359
|
+
// Email sequence tools
|
|
2360
|
+
{
|
|
2361
|
+
name: "helm__list_email_sequences",
|
|
2362
|
+
description: "List email sequences in the workspace so you can pick one by name. Returns id, name, status (draft/live/archived), and step count.",
|
|
2363
|
+
inputSchema: {
|
|
2364
|
+
type: "object",
|
|
2365
|
+
properties: {
|
|
2366
|
+
status: {
|
|
2367
|
+
type: "string",
|
|
2368
|
+
enum: ["draft", "live", "archived"],
|
|
2369
|
+
description: "Filter by sequence status",
|
|
2370
|
+
},
|
|
2371
|
+
},
|
|
2372
|
+
required: [],
|
|
2373
|
+
},
|
|
2374
|
+
},
|
|
2375
|
+
{
|
|
2376
|
+
name: "helm__get_sequence",
|
|
2377
|
+
description: "Get a single email sequence by ID, including its ordered steps and per-step + overall enrollment stats.",
|
|
2378
|
+
inputSchema: {
|
|
2379
|
+
type: "object",
|
|
2380
|
+
properties: {
|
|
2381
|
+
sequence_id: {
|
|
2382
|
+
type: "string",
|
|
2383
|
+
description: "ID (UUID) of the sequence",
|
|
2384
|
+
},
|
|
2385
|
+
},
|
|
2386
|
+
required: ["sequence_id"],
|
|
2387
|
+
},
|
|
2388
|
+
},
|
|
2389
|
+
{
|
|
2390
|
+
name: "helm__list_sequence_enrollments",
|
|
2391
|
+
description: "List the contacts enrolled in an email sequence, with their current step, status, and next send time. Optionally filter by enrollment status.",
|
|
2392
|
+
inputSchema: {
|
|
2393
|
+
type: "object",
|
|
2394
|
+
properties: {
|
|
2395
|
+
sequence_id: {
|
|
2396
|
+
type: "string",
|
|
2397
|
+
description: "ID (UUID) of the sequence",
|
|
2398
|
+
},
|
|
2399
|
+
status: {
|
|
2400
|
+
type: "string",
|
|
2401
|
+
description: "Filter by enrollment status (e.g. active, paused, completed, exited_reply)",
|
|
2402
|
+
},
|
|
2403
|
+
},
|
|
2404
|
+
required: ["sequence_id"],
|
|
2405
|
+
},
|
|
2406
|
+
},
|
|
2407
|
+
{
|
|
2408
|
+
name: "helm__enroll_in_sequence",
|
|
2409
|
+
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.",
|
|
2410
|
+
inputSchema: {
|
|
2411
|
+
type: "object",
|
|
2412
|
+
properties: {
|
|
2413
|
+
sequence_id: {
|
|
2414
|
+
type: "string",
|
|
2415
|
+
description: "ID (UUID) of the sequence to enroll into",
|
|
2416
|
+
},
|
|
2417
|
+
person_id: {
|
|
2418
|
+
type: "string",
|
|
2419
|
+
description: "Contact/person UUID to enroll",
|
|
2420
|
+
},
|
|
2421
|
+
email: {
|
|
2422
|
+
type: "string",
|
|
2423
|
+
description: "Email address of the contact (workspace-scoped lookup); used if person_id is not provided",
|
|
2424
|
+
},
|
|
2425
|
+
},
|
|
2426
|
+
required: ["sequence_id"],
|
|
2427
|
+
},
|
|
2428
|
+
},
|
|
2429
|
+
{
|
|
2430
|
+
name: "helm__create_email_sequence",
|
|
2431
|
+
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).",
|
|
2432
|
+
inputSchema: {
|
|
2433
|
+
type: "object",
|
|
2434
|
+
properties: {
|
|
2435
|
+
name: {
|
|
2436
|
+
type: "string",
|
|
2437
|
+
description: "Internal name for the sequence, e.g. \"New lead nurture\".",
|
|
2438
|
+
},
|
|
2439
|
+
description: {
|
|
2440
|
+
type: "string",
|
|
2441
|
+
description: "Optional short note on what the sequence is for.",
|
|
2442
|
+
},
|
|
2443
|
+
sender_identity_id: {
|
|
2444
|
+
type: "string",
|
|
2445
|
+
description: "UUID of the verified sender identity. Optional now, required before publishing.",
|
|
2446
|
+
},
|
|
2447
|
+
exit_on_reply: {
|
|
2448
|
+
type: "boolean",
|
|
2449
|
+
description: "Stop sending once a contact replies (default true).",
|
|
2450
|
+
},
|
|
2451
|
+
exit_on_bounce: {
|
|
2452
|
+
type: "boolean",
|
|
2453
|
+
description: "Stop sending once an email bounces (default true).",
|
|
2454
|
+
},
|
|
2455
|
+
},
|
|
2456
|
+
required: ["name"],
|
|
2457
|
+
},
|
|
2458
|
+
},
|
|
2459
|
+
{
|
|
2460
|
+
name: "helm__create_sequence_email",
|
|
2461
|
+
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.",
|
|
2462
|
+
inputSchema: {
|
|
2463
|
+
type: "object",
|
|
2464
|
+
properties: {
|
|
2465
|
+
sequence_id: {
|
|
2466
|
+
type: "string",
|
|
2467
|
+
description: "UUID of the sequence to add the email to",
|
|
2468
|
+
},
|
|
2469
|
+
subject: {
|
|
2470
|
+
type: "string",
|
|
2471
|
+
description: "Email subject line",
|
|
2472
|
+
},
|
|
2473
|
+
html_body: {
|
|
2474
|
+
type: "string",
|
|
2475
|
+
description: "HTML body. Provide this and/or text_body.",
|
|
2476
|
+
},
|
|
2477
|
+
text_body: {
|
|
2478
|
+
type: "string",
|
|
2479
|
+
description: "Plain-text body. Provide this and/or html_body.",
|
|
2480
|
+
},
|
|
2481
|
+
delay_value: {
|
|
2482
|
+
type: "number",
|
|
2483
|
+
description: "How long to wait before sending, combined with delay_unit. Use 0 for the first email.",
|
|
2484
|
+
},
|
|
2485
|
+
delay_unit: {
|
|
2486
|
+
type: "string",
|
|
2487
|
+
enum: ["minutes", "hours", "days"],
|
|
2488
|
+
description: "Unit for delay_value",
|
|
2489
|
+
},
|
|
2490
|
+
position: {
|
|
2491
|
+
type: "number",
|
|
2492
|
+
description: "Optional 1-based insert position (later emails shift down). Omit to append.",
|
|
2493
|
+
},
|
|
2494
|
+
},
|
|
2495
|
+
required: ["sequence_id", "subject", "delay_value", "delay_unit"],
|
|
2496
|
+
},
|
|
2497
|
+
},
|
|
2498
|
+
{
|
|
2499
|
+
name: "helm__update_email_sequence",
|
|
2500
|
+
description: "Edit an email sequence's settings — rename it, change its description, set/replace the sender identity, or toggle the exit-on-reply / exit-on-bounce rules. Only the fields you pass change; the emails are untouched (use helm__update_sequence_email to edit an email). Returns the updated sequence.",
|
|
2501
|
+
inputSchema: {
|
|
2502
|
+
type: "object",
|
|
2503
|
+
properties: {
|
|
2504
|
+
sequence_id: {
|
|
2505
|
+
type: "string",
|
|
2506
|
+
description: "UUID of the sequence to edit",
|
|
2507
|
+
},
|
|
2508
|
+
name: {
|
|
2509
|
+
type: "string",
|
|
2510
|
+
description: "New internal name.",
|
|
2511
|
+
},
|
|
2512
|
+
description: {
|
|
2513
|
+
type: "string",
|
|
2514
|
+
description: "New short note on what the sequence is for.",
|
|
2515
|
+
},
|
|
2516
|
+
sender_identity_id: {
|
|
2517
|
+
type: "string",
|
|
2518
|
+
description: "UUID of the verified sender identity to send from (required before publishing).",
|
|
2519
|
+
},
|
|
2520
|
+
exit_on_reply: {
|
|
2521
|
+
type: "boolean",
|
|
2522
|
+
description: "Stop sending once a contact replies.",
|
|
2523
|
+
},
|
|
2524
|
+
exit_on_bounce: {
|
|
2525
|
+
type: "boolean",
|
|
2526
|
+
description: "Stop sending once an email bounces.",
|
|
2527
|
+
},
|
|
2528
|
+
},
|
|
2529
|
+
required: ["sequence_id"],
|
|
2530
|
+
},
|
|
2531
|
+
},
|
|
2532
|
+
{
|
|
2533
|
+
name: "helm__delete_email_sequence",
|
|
2534
|
+
description: "Permanently delete an email sequence, including all of its emails and enrollments. This cannot be undone. To simply stop a live sequence, pause it via helm__set_sequence_status (status=\"draft\") instead.",
|
|
2535
|
+
inputSchema: {
|
|
2536
|
+
type: "object",
|
|
2537
|
+
properties: {
|
|
2538
|
+
sequence_id: {
|
|
2539
|
+
type: "string",
|
|
2540
|
+
description: "UUID of the sequence to delete",
|
|
2541
|
+
},
|
|
2542
|
+
},
|
|
2543
|
+
required: ["sequence_id"],
|
|
2544
|
+
},
|
|
2545
|
+
},
|
|
2546
|
+
{
|
|
2547
|
+
name: "helm__update_sequence_email",
|
|
2548
|
+
description: "Edit an existing email in a sequence in place — fix subject/body copy or change how long to wait before it sends. Only the fields you pass change; the email keeps its position in the sequence. Use this instead of adding a new email when copy is wrong. Same merge tags as helm__create_sequence_email: {{contact.first_name}}, {{contact.last_name}}, {{contact.full_name}}, {{contact.email}}, {{unsubscribe_link}}. Returns the updated email.",
|
|
2549
|
+
inputSchema: {
|
|
2550
|
+
type: "object",
|
|
2551
|
+
properties: {
|
|
2552
|
+
id: {
|
|
2553
|
+
type: "string",
|
|
2554
|
+
description: "UUID of the email (step) to edit — from helm__get_sequence.",
|
|
2555
|
+
},
|
|
2556
|
+
sequence_id: {
|
|
2557
|
+
type: "string",
|
|
2558
|
+
description: "UUID of the sequence the email belongs to (guards against cross-sequence edits).",
|
|
2559
|
+
},
|
|
2560
|
+
subject: {
|
|
2561
|
+
type: "string",
|
|
2562
|
+
description: "New subject line.",
|
|
2563
|
+
},
|
|
2564
|
+
html_body: {
|
|
2565
|
+
type: "string",
|
|
2566
|
+
description: "New HTML body.",
|
|
2567
|
+
},
|
|
2568
|
+
text_body: {
|
|
2569
|
+
type: "string",
|
|
2570
|
+
description: "New plain-text body.",
|
|
2571
|
+
},
|
|
2572
|
+
delay_value: {
|
|
2573
|
+
type: "number",
|
|
2574
|
+
description: "New wait before this email sends, combined with delay_unit.",
|
|
2575
|
+
},
|
|
2576
|
+
delay_unit: {
|
|
2577
|
+
type: "string",
|
|
2578
|
+
enum: ["minutes", "hours", "days"],
|
|
2579
|
+
description: "Unit for delay_value.",
|
|
2580
|
+
},
|
|
2581
|
+
},
|
|
2582
|
+
required: ["id", "sequence_id"],
|
|
2583
|
+
},
|
|
2584
|
+
},
|
|
2585
|
+
{
|
|
2586
|
+
name: "helm__delete_sequence_email",
|
|
2587
|
+
description: "Remove an email from a sequence. The remaining emails move up to close the gap. Returns confirmation.",
|
|
2588
|
+
inputSchema: {
|
|
2589
|
+
type: "object",
|
|
2590
|
+
properties: {
|
|
2591
|
+
id: {
|
|
2592
|
+
type: "string",
|
|
2593
|
+
description: "UUID of the email (step) to delete — from helm__get_sequence.",
|
|
2594
|
+
},
|
|
2595
|
+
sequence_id: {
|
|
2596
|
+
type: "string",
|
|
2597
|
+
description: "UUID of the sequence the email belongs to.",
|
|
2598
|
+
},
|
|
2599
|
+
},
|
|
2600
|
+
required: ["id", "sequence_id"],
|
|
2601
|
+
},
|
|
2602
|
+
},
|
|
2603
|
+
{
|
|
2604
|
+
name: "helm__reorder_sequence_emails",
|
|
2605
|
+
description: "Change the order of the emails in a sequence. Pass EVERY email id in the new order; positions are renumbered 1..N to match. Delays are relative to the previous email, so reordering changes when each email sends.",
|
|
2606
|
+
inputSchema: {
|
|
2607
|
+
type: "object",
|
|
2608
|
+
properties: {
|
|
2609
|
+
sequence_id: {
|
|
2610
|
+
type: "string",
|
|
2611
|
+
description: "UUID of the sequence to reorder",
|
|
2612
|
+
},
|
|
2613
|
+
ordered_step_ids: {
|
|
2614
|
+
type: "array",
|
|
2615
|
+
items: { type: "string" },
|
|
2616
|
+
description: "All email (step) ids for the sequence, in the desired order. Must include every email exactly once.",
|
|
2617
|
+
},
|
|
2618
|
+
},
|
|
2619
|
+
required: ["sequence_id", "ordered_step_ids"],
|
|
2620
|
+
},
|
|
2621
|
+
},
|
|
2622
|
+
{
|
|
2623
|
+
name: "helm__agent_send_email",
|
|
2624
|
+
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.",
|
|
2625
|
+
inputSchema: {
|
|
2626
|
+
type: "object",
|
|
2627
|
+
properties: {
|
|
2628
|
+
agent: {
|
|
2629
|
+
type: "string",
|
|
2630
|
+
description: "Which agent sends it — the agent's name (e.g. \"Ava\"), slug, or id. Resolved within the workspace.",
|
|
2631
|
+
},
|
|
2632
|
+
to: {
|
|
2633
|
+
type: ["string", "array"],
|
|
2634
|
+
items: { type: "string" },
|
|
2635
|
+
description: "Recipient email address, or an array of addresses.",
|
|
2636
|
+
},
|
|
2637
|
+
cc: {
|
|
2638
|
+
type: ["string", "array"],
|
|
2639
|
+
items: { type: "string" },
|
|
2640
|
+
description: "Optional Cc address or array of addresses.",
|
|
2641
|
+
},
|
|
2642
|
+
subject: {
|
|
2643
|
+
type: "string",
|
|
2644
|
+
description: "Subject line. Required in mechanical mode; an optional suggestion when delegate=true.",
|
|
2645
|
+
},
|
|
2646
|
+
text_body: {
|
|
2647
|
+
type: "string",
|
|
2648
|
+
description: "Plain-text body (mechanical mode). Provide this and/or html_body.",
|
|
2649
|
+
},
|
|
2650
|
+
html_body: {
|
|
2651
|
+
type: "string",
|
|
2652
|
+
description: "HTML body (mechanical mode). Provide this and/or text_body.",
|
|
2653
|
+
},
|
|
2654
|
+
delegate: {
|
|
2655
|
+
type: "boolean",
|
|
2656
|
+
description: "When true, the agent composes the email itself from `intent` instead of sending your supplied body. Default false.",
|
|
2657
|
+
},
|
|
2658
|
+
intent: {
|
|
2659
|
+
type: "string",
|
|
2660
|
+
description: "Required when delegate=true: what the email needs to accomplish, in plain language (e.g. \"reschedule Thursday's call to Friday 2pm\").",
|
|
2661
|
+
},
|
|
2662
|
+
context: {
|
|
2663
|
+
type: "string",
|
|
2664
|
+
description: "Optional extra context handed to the agent in delegate mode (facts, constraints, tone).",
|
|
2665
|
+
},
|
|
2666
|
+
},
|
|
2667
|
+
required: ["agent", "to"],
|
|
2668
|
+
},
|
|
2669
|
+
},
|
|
1615
2670
|
];
|
|
1616
2671
|
// Create MCP server
|
|
1617
2672
|
const server = new Server({
|
|
@@ -1637,6 +2692,7 @@ const TOOL_ROUTES = {
|
|
|
1637
2692
|
helm__get_task: { action: "get_task", method: "GET", resultKey: "task" },
|
|
1638
2693
|
helm__update_task: { action: "update_task", method: "POST", resultKey: "task", successMsg: "Task updated successfully!" },
|
|
1639
2694
|
helm__add_task_comment: { action: "add_task_comment", method: "POST", resultKey: "comment", successMsg: "Comment added successfully!" },
|
|
2695
|
+
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
2696
|
// Documents
|
|
1641
2697
|
helm__create_document: { action: "create_document", method: "POST", resultKey: "document", successMsg: "Document created successfully!" },
|
|
1642
2698
|
helm__update_document: { action: "update_document", method: "POST", resultKey: "document", successMsg: "Document updated successfully!" },
|
|
@@ -1656,16 +2712,45 @@ const TOOL_ROUTES = {
|
|
|
1656
2712
|
// Estimates
|
|
1657
2713
|
helm__create_estimate: { action: "create_estimate", method: "POST", resultKey: "estimate", successMsg: "Estimate created successfully!" },
|
|
1658
2714
|
helm__get_estimates: { action: "get_estimates", method: "GET", resultKey: "estimates" },
|
|
2715
|
+
// Products
|
|
2716
|
+
helm__list_products: { action: "list_products", method: "GET", resultKey: "products" },
|
|
2717
|
+
helm__get_product: { action: "get_product", method: "GET", resultKey: "product" },
|
|
2718
|
+
helm__create_product: { action: "create_product", method: "POST", resultKey: "product", successMsg: "Product created successfully!" },
|
|
2719
|
+
helm__update_product: { action: "update_product", method: "POST", resultKey: "product", successMsg: "Product updated." },
|
|
2720
|
+
helm__archive_product: { action: "archive_product", method: "POST", resultKey: "product", successMsg: "Product archived." },
|
|
2721
|
+
helm__attach_product_to_deal: { action: "attach_product_to_deal", method: "POST", successMsg: "Product attached to deal." },
|
|
2722
|
+
helm__add_line_item_from_product: { action: "add_line_item_from_product", method: "POST", successMsg: "Line item added." },
|
|
2723
|
+
// Product price tiers
|
|
2724
|
+
helm__list_product_prices: { action: "list_product_prices", method: "GET", resultKey: "prices" },
|
|
2725
|
+
helm__create_product_price: { action: "create_product_price", method: "POST", resultKey: "price", successMsg: "Price tier added." },
|
|
2726
|
+
helm__update_product_price: { action: "update_product_price", method: "POST", resultKey: "price", successMsg: "Price tier updated." },
|
|
2727
|
+
helm__delete_product_price: { action: "delete_product_price", method: "POST", successMsg: "Price tier deleted." },
|
|
2728
|
+
// Account-product attribution
|
|
2729
|
+
helm__list_account_products: { action: "list_account_products", method: "GET", resultKey: "rows" },
|
|
2730
|
+
helm__attach_product_to_account: { action: "attach_product_to_account", method: "POST", successMsg: "Product attached to account." },
|
|
2731
|
+
helm__update_account_product: { action: "update_account_product", method: "POST", resultKey: "account_product", successMsg: "Updated." },
|
|
2732
|
+
helm__detach_product_from_account: { action: "detach_product_from_account", method: "POST", successMsg: "Detached." },
|
|
2733
|
+
// Forms
|
|
2734
|
+
helm__list_forms: { action: "list_forms", method: "GET", resultKey: "forms" },
|
|
2735
|
+
helm__get_form: { action: "get_form", method: "GET", resultKey: "form" },
|
|
2736
|
+
helm__get_form_submissions: { action: "get_form_submissions", method: "GET", resultKey: "submissions" },
|
|
2737
|
+
helm__get_form_stats: { action: "get_form_stats", method: "GET", resultKey: "stats" },
|
|
2738
|
+
helm__create_form: { action: "create_form", method: "POST", resultKey: "form", successMsg: "Form created." },
|
|
2739
|
+
helm__add_form_step: { action: "add_form_step", method: "POST", resultKey: "step", successMsg: "Step added." },
|
|
2740
|
+
helm__add_form_field: { action: "add_form_field", method: "POST", resultKey: "field", successMsg: "Field added." },
|
|
2741
|
+
helm__set_form_status: { action: "set_form_status", method: "POST", resultKey: "form", successMsg: "Form status updated." },
|
|
1659
2742
|
// Accounts
|
|
1660
2743
|
helm__get_accounts: { action: "get_accounts", method: "GET", resultKey: "accounts" },
|
|
1661
2744
|
helm__get_account: { action: "get_account", method: "GET", resultKey: "account" },
|
|
1662
2745
|
helm__add_account: { action: "add_account", method: "POST", resultKey: "account", successMsg: "Account created successfully!" },
|
|
2746
|
+
helm__log_activity: { action: "log_activity", method: "POST", successMsg: "Activity logged." },
|
|
1663
2747
|
helm__update_account: { action: "update_account", method: "POST", resultKey: "account", successMsg: "Account updated successfully!" },
|
|
1664
2748
|
// Contacts
|
|
1665
2749
|
helm__get_contacts: { action: "get_contacts", method: "GET", resultKey: "contacts" },
|
|
1666
2750
|
helm__get_contact: { action: "get_contact", method: "GET", resultKey: "contact" },
|
|
1667
2751
|
helm__add_contact: { action: "add_contact", method: "POST", resultKey: "contact", successMsg: "Contact created successfully!" },
|
|
1668
2752
|
helm__update_contact: { action: "update_contact", method: "POST", resultKey: "contact", successMsg: "Contact updated successfully!" },
|
|
2753
|
+
helm__delete_contact: { action: "delete_contact", method: "POST", successMsg: "Contact deleted successfully!" },
|
|
1669
2754
|
// Deals
|
|
1670
2755
|
helm__get_deals: { action: "get_deals", method: "GET", resultKey: "deals" },
|
|
1671
2756
|
helm__get_deal: { action: "get_deal", method: "GET", resultKey: "deal" },
|
|
@@ -1688,6 +2773,44 @@ const TOOL_ROUTES = {
|
|
|
1688
2773
|
helm__create_agent_schedule: { action: "create_agent_schedule", method: "POST", resultKey: "schedule", successMsg: "Schedule created successfully!" },
|
|
1689
2774
|
helm__update_agent_schedule: { action: "update_agent_schedule", method: "POST", resultKey: "schedule", successMsg: "Schedule updated successfully!" },
|
|
1690
2775
|
helm__delete_agent_schedule: { action: "delete_agent_schedule", method: "POST", successMsg: "Schedule deleted successfully." },
|
|
2776
|
+
helm__get_agent_objectives: { action: "get_agent_objectives", method: "GET", resultKey: "objectives" },
|
|
2777
|
+
helm__create_agent_objective: { action: "create_agent_objective", method: "POST", resultKey: "objective", successMsg: "Objective created successfully!" },
|
|
2778
|
+
helm__update_agent_objective: { action: "update_agent_objective", method: "POST", resultKey: "objective", successMsg: "Objective updated successfully!" },
|
|
2779
|
+
helm__delete_agent_objective: { action: "delete_agent_objective", method: "POST", successMsg: "Objective deleted successfully." },
|
|
2780
|
+
helm__get_agent_watches: { action: "get_agent_watches", method: "GET", resultKey: "watches" },
|
|
2781
|
+
helm__create_agent_watch: { action: "create_agent_watch", method: "POST", resultKey: "watch", successMsg: "Watch created successfully!" },
|
|
2782
|
+
helm__update_agent_watch: { action: "update_agent_watch", method: "POST", resultKey: "watch", successMsg: "Watch updated successfully!" },
|
|
2783
|
+
helm__delete_agent_watch: { action: "delete_agent_watch", method: "POST", successMsg: "Watch deleted successfully." },
|
|
2784
|
+
// Workflows (read + authoring + lifecycle)
|
|
2785
|
+
helm__get_workflows: { action: "get_workflows", method: "GET", resultKey: "workflows" },
|
|
2786
|
+
helm__get_workflow: { action: "get_workflow", method: "GET", resultKey: "workflow" },
|
|
2787
|
+
helm__get_workflow_executions: { action: "get_workflow_executions", method: "GET", resultKey: "executions" },
|
|
2788
|
+
helm__get_workflow_schema: { action: "get_workflow_schema", method: "GET", resultKey: "schema" },
|
|
2789
|
+
// sentinel resultKey "__full__" (never present) → returns the whole payload, so
|
|
2790
|
+
// create/update surface { workflow, warnings, incomplete } and execute/delete
|
|
2791
|
+
// surface their full result, not just a success string.
|
|
2792
|
+
helm__create_workflow: { action: "create_workflow", method: "POST", resultKey: "__full__", successMsg: "Workflow created." },
|
|
2793
|
+
helm__update_workflow: { action: "update_workflow", method: "POST", resultKey: "__full__", successMsg: "Workflow updated." },
|
|
2794
|
+
helm__delete_workflow: { action: "delete_workflow", method: "POST", resultKey: "__full__", successMsg: "Workflow deleted." },
|
|
2795
|
+
helm__set_workflow_status: { action: "set_workflow_status", method: "POST", resultKey: "workflow", successMsg: "Workflow status updated." },
|
|
2796
|
+
helm__execute_workflow: { action: "execute_workflow", method: "POST", resultKey: "__full__", successMsg: "Workflow execution requested." },
|
|
2797
|
+
// Email sequences
|
|
2798
|
+
helm__list_email_sequences: { action: "list_email_sequences", method: "GET", resultKey: "sequences" },
|
|
2799
|
+
// resultKey "detail" is intentionally absent → the full { sequence, steps } payload
|
|
2800
|
+
// surfaces via the `result[resultKey] ?? result` fallback (a plain "sequence" key would drop steps).
|
|
2801
|
+
helm__get_sequence: { action: "get_sequence", method: "GET", resultKey: "detail" },
|
|
2802
|
+
helm__list_sequence_enrollments: { action: "list_sequence_enrollments", method: "GET", resultKey: "enrollments" },
|
|
2803
|
+
// resultKey "enrollment" is intentionally absent → handler's flat { ok, enrolled, skipped_reason } shape
|
|
2804
|
+
// surfaces in full via the `result[resultKey] ?? result` fallback, so the model sees skip reasons.
|
|
2805
|
+
helm__enroll_in_sequence: { action: "enroll_in_sequence", method: "POST", resultKey: "enrollment", successMsg: "Enrollment processed." },
|
|
2806
|
+
helm__create_email_sequence: { action: "create_email_sequence", method: "POST", resultKey: "sequence", successMsg: "Sequence created (draft)." },
|
|
2807
|
+
helm__create_sequence_email: { action: "create_sequence_email", method: "POST", resultKey: "step", successMsg: "Email added to sequence." },
|
|
2808
|
+
helm__update_email_sequence: { action: "update_email_sequence", method: "POST", resultKey: "sequence", successMsg: "Sequence updated." },
|
|
2809
|
+
helm__delete_email_sequence: { action: "delete_email_sequence", method: "POST", resultKey: "__full__", successMsg: "Sequence deleted." },
|
|
2810
|
+
helm__update_sequence_email: { action: "update_sequence_email", method: "POST", resultKey: "step", successMsg: "Email updated." },
|
|
2811
|
+
helm__delete_sequence_email: { action: "delete_sequence_email", method: "POST", resultKey: "__full__", successMsg: "Email removed from sequence." },
|
|
2812
|
+
helm__reorder_sequence_emails: { action: "reorder_sequence_emails", method: "POST", resultKey: "__full__", successMsg: "Sequence emails reordered." },
|
|
2813
|
+
helm__agent_send_email: { action: "agent_send_email", method: "POST", successMsg: "Email sent by the agent." },
|
|
1691
2814
|
};
|
|
1692
2815
|
// Handle tool execution
|
|
1693
2816
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|