@helm-ai/mcp-server 0.30.1 → 1.0.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 +13 -13
- package/dist/index.js +161 -120
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -51,14 +51,14 @@ const TOOL_MODULES = {
|
|
|
51
51
|
helm__update_sequence_email: 'sequences', helm__delete_sequence_email: 'sequences', helm__reorder_sequence_emails: 'sequences',
|
|
52
52
|
helm__set_sequence_status: 'sequences', helm__pause_sequence_enrollment: 'sequences',
|
|
53
53
|
helm__resume_sequence_enrollment: 'sequences', helm__exit_sequence_enrollment: 'sequences',
|
|
54
|
-
|
|
54
|
+
helm__get_companies: 'contacts', helm__get_company: 'contacts', helm__add_company: 'contacts', helm__update_company: 'contacts',
|
|
55
55
|
helm__get_contacts: 'contacts', helm__get_contact: 'contacts', helm__add_contact: 'contacts', helm__update_contact: 'contacts', helm__delete_contact: 'contacts',
|
|
56
56
|
helm__get_deals: 'deals', helm__get_deal: 'deals', helm__add_deal: 'deals', helm__update_deal: 'deals', helm__delete_deal: 'deals',
|
|
57
57
|
helm__get_pipelines: 'deals', helm__add_pipeline: 'deals', helm__update_pipeline: 'deals', helm__delete_pipeline: 'deals',
|
|
58
58
|
helm__add_pipeline_stage: 'deals', helm__update_pipeline_stage: 'deals', helm__delete_pipeline_stage: 'deals', helm__reorder_pipeline_stages: 'deals',
|
|
59
59
|
helm__attach_product_to_deal: 'deals',
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
helm__list_company_products: 'contacts', helm__attach_product_to_company: 'contacts',
|
|
61
|
+
helm__update_company_product: 'contacts', helm__detach_product_from_company: 'contacts',
|
|
62
62
|
helm__get_invoices: 'invoices', helm__get_invoice: 'invoices', helm__create_invoice: 'invoices', helm__update_invoice: 'invoices',
|
|
63
63
|
helm__get_payments: 'invoices', helm__record_payment: 'invoices',
|
|
64
64
|
helm__list_subscriptions: 'invoices', helm__get_subscription: 'invoices',
|
|
@@ -127,7 +127,7 @@ const tools = [
|
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
name: "helm__create_project",
|
|
130
|
-
description: "Create a new project in Helm. Optionally link to
|
|
130
|
+
description: "Create a new project in Helm. Optionally link to a company by ID or name.",
|
|
131
131
|
inputSchema: {
|
|
132
132
|
type: "object",
|
|
133
133
|
properties: {
|
|
@@ -139,9 +139,9 @@ const tools = [
|
|
|
139
139
|
type: "string",
|
|
140
140
|
description: "Project description",
|
|
141
141
|
},
|
|
142
|
-
|
|
142
|
+
company_id: {
|
|
143
143
|
type: "string",
|
|
144
|
-
description: "
|
|
144
|
+
description: "Company ID (UUID) or name to link this project to",
|
|
145
145
|
},
|
|
146
146
|
stage: {
|
|
147
147
|
type: "string",
|
|
@@ -193,9 +193,9 @@ const tools = [
|
|
|
193
193
|
type: "string",
|
|
194
194
|
description: "User ID to assign as the primary assignee",
|
|
195
195
|
},
|
|
196
|
-
|
|
196
|
+
company_id: {
|
|
197
197
|
type: "string",
|
|
198
|
-
description: "
|
|
198
|
+
description: "Company ID to link the task to",
|
|
199
199
|
},
|
|
200
200
|
time_estimate_minutes: {
|
|
201
201
|
type: "number",
|
|
@@ -1119,7 +1119,7 @@ const tools = [
|
|
|
1119
1119
|
},
|
|
1120
1120
|
{
|
|
1121
1121
|
name: "helm__get_hour_balance",
|
|
1122
|
-
description: "How many prepaid or monthly hours a client has left on their hour plan: available, used, left and over this period, what expires or rolls over at reset, and each block of hours. Use this instead of adding up time entries. Pass project_id,
|
|
1122
|
+
description: "How many prepaid or monthly hours a client has left on their hour plan: available, used, left and over this period, what expires or rolls over at reset, and each block of hours. Use this instead of adding up time entries. Pass project_id, company_id, or nothing for every live plan. Hours only, no amounts.",
|
|
1123
1123
|
inputSchema: {
|
|
1124
1124
|
type: "object",
|
|
1125
1125
|
properties: {
|
|
@@ -1127,7 +1127,7 @@ const tools = [
|
|
|
1127
1127
|
type: "string",
|
|
1128
1128
|
description: "The plan this project draws from",
|
|
1129
1129
|
},
|
|
1130
|
-
|
|
1130
|
+
company_id: {
|
|
1131
1131
|
type: "string",
|
|
1132
1132
|
description: "The client's plans (a client can have more than one)",
|
|
1133
1133
|
},
|
|
@@ -1258,7 +1258,7 @@ const tools = [
|
|
|
1258
1258
|
"inputSchema": {
|
|
1259
1259
|
"type": "object",
|
|
1260
1260
|
"properties": {
|
|
1261
|
-
"
|
|
1261
|
+
"company_id": {
|
|
1262
1262
|
"type": "string",
|
|
1263
1263
|
"description": "The client"
|
|
1264
1264
|
},
|
|
@@ -1370,7 +1370,7 @@ const tools = [
|
|
|
1370
1370
|
}
|
|
1371
1371
|
},
|
|
1372
1372
|
"required": [
|
|
1373
|
-
"
|
|
1373
|
+
"company_id",
|
|
1374
1374
|
"name",
|
|
1375
1375
|
"type",
|
|
1376
1376
|
"project_ids"
|
|
@@ -1489,9 +1489,9 @@ const tools = [
|
|
|
1489
1489
|
inputSchema: {
|
|
1490
1490
|
type: "object",
|
|
1491
1491
|
properties: {
|
|
1492
|
-
|
|
1492
|
+
company_id: {
|
|
1493
1493
|
type: "string",
|
|
1494
|
-
description: "Optional ID of the
|
|
1494
|
+
description: "Optional ID of the company this estimate is for",
|
|
1495
1495
|
},
|
|
1496
1496
|
contact_id: {
|
|
1497
1497
|
type: "string",
|
|
@@ -1554,9 +1554,9 @@ const tools = [
|
|
|
1554
1554
|
type: "string",
|
|
1555
1555
|
description: "Filter by estimate status",
|
|
1556
1556
|
},
|
|
1557
|
-
|
|
1557
|
+
company_id: {
|
|
1558
1558
|
type: "string",
|
|
1559
|
-
description: "Filter by
|
|
1559
|
+
description: "Filter by company ID",
|
|
1560
1560
|
},
|
|
1561
1561
|
limit: {
|
|
1562
1562
|
type: "number",
|
|
@@ -1587,8 +1587,8 @@ const tools = [
|
|
|
1587
1587
|
title: { type: "string", description: "Updated title" },
|
|
1588
1588
|
description: { type: "string", description: "Updated description" },
|
|
1589
1589
|
status: { type: "string", enum: ["draft", "sent", "accepted", "declined", "archived", "cancelled"], description: "Updated status" },
|
|
1590
|
-
|
|
1591
|
-
contact_id: { type: "string", description: "Updated contact at the
|
|
1590
|
+
company_id: { type: "string", description: "Updated company" },
|
|
1591
|
+
contact_id: { type: "string", description: "Updated contact at the company" },
|
|
1592
1592
|
tax_rate: { type: "number", description: "Updated tax rate percentage" },
|
|
1593
1593
|
issue_date: { type: "string", description: "Updated issue date" },
|
|
1594
1594
|
expiry_date: { type: "string", description: "Updated expiry date" },
|
|
@@ -1816,25 +1816,25 @@ const tools = [
|
|
|
1816
1816
|
required: ["price_id"],
|
|
1817
1817
|
},
|
|
1818
1818
|
},
|
|
1819
|
-
//
|
|
1819
|
+
// Company-product attribution tools
|
|
1820
1820
|
{
|
|
1821
|
-
name: "
|
|
1822
|
-
description: "Customer-360 view: what products
|
|
1821
|
+
name: "helm__list_company_products",
|
|
1822
|
+
description: "Customer-360 view: what products a company uses / has bought / has in pipeline. Unifies four sources (direct attribution, paid invoices, won deals, open deals) with source badges per row.",
|
|
1823
1823
|
inputSchema: {
|
|
1824
1824
|
type: "object",
|
|
1825
1825
|
properties: {
|
|
1826
|
-
|
|
1826
|
+
company_id: { type: "string", description: "UUID of the company." },
|
|
1827
1827
|
},
|
|
1828
|
-
required: ["
|
|
1828
|
+
required: ["company_id"],
|
|
1829
1829
|
},
|
|
1830
1830
|
},
|
|
1831
1831
|
{
|
|
1832
|
-
name: "
|
|
1833
|
-
description: "Record that
|
|
1832
|
+
name: "helm__attach_product_to_company",
|
|
1833
|
+
description: "Record that a company 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.",
|
|
1834
1834
|
inputSchema: {
|
|
1835
1835
|
type: "object",
|
|
1836
1836
|
properties: {
|
|
1837
|
-
|
|
1837
|
+
company_id: { type: "string", description: "UUID of the company." },
|
|
1838
1838
|
product_id: { type: "string", description: "UUID of the product." },
|
|
1839
1839
|
product_price_id: { type: "string", description: "UUID of a specific price tier (from the product's `prices`). Omit for the default tier." },
|
|
1840
1840
|
quantity: { type: "number", description: "Defaults to 1." },
|
|
@@ -1843,16 +1843,16 @@ const tools = [
|
|
|
1843
1843
|
ended_at: { type: "string", description: "ISO date the relationship ended. Omit for active customers." },
|
|
1844
1844
|
notes: { type: "string", description: "Optional context." },
|
|
1845
1845
|
},
|
|
1846
|
-
required: ["
|
|
1846
|
+
required: ["company_id", "product_id"],
|
|
1847
1847
|
},
|
|
1848
1848
|
},
|
|
1849
1849
|
{
|
|
1850
|
-
name: "
|
|
1851
|
-
description: "Update
|
|
1850
|
+
name: "helm__update_company_product",
|
|
1851
|
+
description: "Update a company-product attribution row. Common: mark a relationship ended (set ended_at), change the price tier (upgrade/downgrade), adjust rate or quantity.",
|
|
1852
1852
|
inputSchema: {
|
|
1853
1853
|
type: "object",
|
|
1854
1854
|
properties: {
|
|
1855
|
-
|
|
1855
|
+
company_product_id: { type: "string", description: "UUID of the company-product row." },
|
|
1856
1856
|
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." },
|
|
1857
1857
|
quantity: { type: "number" },
|
|
1858
1858
|
rate: { type: "number" },
|
|
@@ -1860,18 +1860,18 @@ const tools = [
|
|
|
1860
1860
|
ended_at: { type: "string", description: "ISO date the relationship ended." },
|
|
1861
1861
|
notes: { type: "string" },
|
|
1862
1862
|
},
|
|
1863
|
-
required: ["
|
|
1863
|
+
required: ["company_product_id"],
|
|
1864
1864
|
},
|
|
1865
1865
|
},
|
|
1866
1866
|
{
|
|
1867
|
-
name: "
|
|
1868
|
-
description: "Delete
|
|
1867
|
+
name: "helm__detach_product_from_company",
|
|
1868
|
+
description: "Delete a company-product attribution row. Use only when it was a mistake — for relationships that ended naturally, prefer helm__update_company_product with ended_at.",
|
|
1869
1869
|
inputSchema: {
|
|
1870
1870
|
type: "object",
|
|
1871
1871
|
properties: {
|
|
1872
|
-
|
|
1872
|
+
company_product_id: { type: "string", description: "UUID of the company-product row." },
|
|
1873
1873
|
},
|
|
1874
|
-
required: ["
|
|
1874
|
+
required: ["company_product_id"],
|
|
1875
1875
|
},
|
|
1876
1876
|
},
|
|
1877
1877
|
// Forms tools
|
|
@@ -2026,34 +2026,34 @@ const tools = [
|
|
|
2026
2026
|
required: ["step_id"],
|
|
2027
2027
|
},
|
|
2028
2028
|
},
|
|
2029
|
-
//
|
|
2029
|
+
// Company tools
|
|
2030
2030
|
{
|
|
2031
|
-
name: "
|
|
2032
|
-
description: "Get
|
|
2031
|
+
name: "helm__get_companies",
|
|
2032
|
+
description: "Get companies from Helm with optional filters. To find a specific company by name or email, ALWAYS pass `query` — without it you only get the most-recently-created companies and may miss the one you want.",
|
|
2033
2033
|
inputSchema: {
|
|
2034
2034
|
type: "object",
|
|
2035
2035
|
properties: {
|
|
2036
2036
|
query: {
|
|
2037
2037
|
type: "string",
|
|
2038
|
-
description: "Search by
|
|
2038
|
+
description: "Search by company name or email. Case-insensitive partial match. Use this whenever looking for a specific company.",
|
|
2039
2039
|
},
|
|
2040
2040
|
status: {
|
|
2041
2041
|
type: "string",
|
|
2042
2042
|
enum: ["active", "inactive", "paused"],
|
|
2043
|
-
description: "Filter by
|
|
2043
|
+
description: "Filter by company status",
|
|
2044
2044
|
},
|
|
2045
2045
|
health: {
|
|
2046
2046
|
type: "string",
|
|
2047
2047
|
enum: ["not_set", "critical", "at_risk", "good"],
|
|
2048
|
-
description: "Filter by
|
|
2048
|
+
description: "Filter by company health",
|
|
2049
2049
|
},
|
|
2050
2050
|
owner_id: {
|
|
2051
2051
|
type: "string",
|
|
2052
|
-
description: "Filter by
|
|
2052
|
+
description: "Filter by company owner ID",
|
|
2053
2053
|
},
|
|
2054
2054
|
limit: {
|
|
2055
2055
|
type: "number",
|
|
2056
|
-
description: "Maximum number of
|
|
2056
|
+
description: "Maximum number of companies to return (default: 50, max 1000 per page)",
|
|
2057
2057
|
},
|
|
2058
2058
|
offset: {
|
|
2059
2059
|
type: "number",
|
|
@@ -2064,29 +2064,29 @@ const tools = [
|
|
|
2064
2064
|
},
|
|
2065
2065
|
},
|
|
2066
2066
|
{
|
|
2067
|
-
name: "
|
|
2068
|
-
description: "Get a specific
|
|
2067
|
+
name: "helm__get_company",
|
|
2068
|
+
description: "Get a specific company by ID",
|
|
2069
2069
|
inputSchema: {
|
|
2070
2070
|
type: "object",
|
|
2071
2071
|
properties: {
|
|
2072
|
-
|
|
2072
|
+
company_id: {
|
|
2073
2073
|
type: "string",
|
|
2074
|
-
description: "The ID of the
|
|
2074
|
+
description: "The ID of the company to retrieve",
|
|
2075
2075
|
},
|
|
2076
2076
|
include_contacts: {
|
|
2077
2077
|
type: "boolean",
|
|
2078
|
-
description: "Also return the
|
|
2078
|
+
description: "Also return the company's contacts",
|
|
2079
2079
|
},
|
|
2080
2080
|
include_projects: {
|
|
2081
2081
|
type: "boolean",
|
|
2082
|
-
description: "Also return the
|
|
2082
|
+
description: "Also return the company's projects",
|
|
2083
2083
|
},
|
|
2084
2084
|
include_invoices: {
|
|
2085
2085
|
type: "boolean",
|
|
2086
|
-
description: "Also return the
|
|
2086
|
+
description: "Also return the company's invoices",
|
|
2087
2087
|
},
|
|
2088
2088
|
},
|
|
2089
|
-
required: ["
|
|
2089
|
+
required: ["company_id"],
|
|
2090
2090
|
},
|
|
2091
2091
|
},
|
|
2092
2092
|
{
|
|
@@ -2097,7 +2097,7 @@ const tools = [
|
|
|
2097
2097
|
properties: {
|
|
2098
2098
|
entity_type: {
|
|
2099
2099
|
type: "string",
|
|
2100
|
-
enum: ["
|
|
2100
|
+
enum: ["company", "contact", "deal", "project", "task", "invoice", "estimate", "document", "time_entry"],
|
|
2101
2101
|
description: "Type of record to attach the activity to",
|
|
2102
2102
|
},
|
|
2103
2103
|
entity_id: { type: "string", description: "UUID of the record" },
|
|
@@ -2112,14 +2112,14 @@ const tools = [
|
|
|
2112
2112
|
},
|
|
2113
2113
|
},
|
|
2114
2114
|
{
|
|
2115
|
-
name: "
|
|
2116
|
-
description: "Create a new
|
|
2115
|
+
name: "helm__add_company",
|
|
2116
|
+
description: "Create a new company in Helm",
|
|
2117
2117
|
inputSchema: {
|
|
2118
2118
|
type: "object",
|
|
2119
2119
|
properties: {
|
|
2120
2120
|
name: {
|
|
2121
2121
|
type: "string",
|
|
2122
|
-
description: "The name of the
|
|
2122
|
+
description: "The name of the company (required)",
|
|
2123
2123
|
},
|
|
2124
2124
|
email: {
|
|
2125
2125
|
type: "string",
|
|
@@ -2136,16 +2136,16 @@ const tools = [
|
|
|
2136
2136
|
status: {
|
|
2137
2137
|
type: "string",
|
|
2138
2138
|
enum: ["active", "inactive", "paused"],
|
|
2139
|
-
description: "
|
|
2139
|
+
description: "Company status (default: active)",
|
|
2140
2140
|
},
|
|
2141
2141
|
health: {
|
|
2142
2142
|
type: "string",
|
|
2143
2143
|
enum: ["not_set", "critical", "at_risk", "good"],
|
|
2144
|
-
description: "
|
|
2144
|
+
description: "Company health indicator (default: not_set)",
|
|
2145
2145
|
},
|
|
2146
2146
|
description: {
|
|
2147
2147
|
type: "string",
|
|
2148
|
-
description: "Description of the
|
|
2148
|
+
description: "Description of the company",
|
|
2149
2149
|
},
|
|
2150
2150
|
address: {
|
|
2151
2151
|
type: "string",
|
|
@@ -2169,7 +2169,7 @@ const tools = [
|
|
|
2169
2169
|
},
|
|
2170
2170
|
notes: {
|
|
2171
2171
|
type: "string",
|
|
2172
|
-
description: "Internal notes about the
|
|
2172
|
+
description: "Internal notes about the company",
|
|
2173
2173
|
},
|
|
2174
2174
|
industry: {
|
|
2175
2175
|
type: "string",
|
|
@@ -2182,7 +2182,7 @@ const tools = [
|
|
|
2182
2182
|
priority: {
|
|
2183
2183
|
type: "string",
|
|
2184
2184
|
enum: ["low", "medium", "high", "urgent"],
|
|
2185
|
-
description: "
|
|
2185
|
+
description: "Company priority",
|
|
2186
2186
|
},
|
|
2187
2187
|
linkedin_url: {
|
|
2188
2188
|
type: "string",
|
|
@@ -2216,25 +2216,25 @@ const tools = [
|
|
|
2216
2216
|
},
|
|
2217
2217
|
owner_id: {
|
|
2218
2218
|
type: "string",
|
|
2219
|
-
description: "ID of the
|
|
2219
|
+
description: "ID of the company owner (user)",
|
|
2220
2220
|
},
|
|
2221
2221
|
},
|
|
2222
2222
|
required: ["name"],
|
|
2223
2223
|
},
|
|
2224
2224
|
},
|
|
2225
2225
|
{
|
|
2226
|
-
name: "
|
|
2227
|
-
description: "Update an existing
|
|
2226
|
+
name: "helm__update_company",
|
|
2227
|
+
description: "Update an existing company",
|
|
2228
2228
|
inputSchema: {
|
|
2229
2229
|
type: "object",
|
|
2230
2230
|
properties: {
|
|
2231
|
-
|
|
2231
|
+
company_id: {
|
|
2232
2232
|
type: "string",
|
|
2233
|
-
description: "The ID of the
|
|
2233
|
+
description: "The ID of the company to update",
|
|
2234
2234
|
},
|
|
2235
2235
|
name: {
|
|
2236
2236
|
type: "string",
|
|
2237
|
-
description: "Updated
|
|
2237
|
+
description: "Updated company name",
|
|
2238
2238
|
},
|
|
2239
2239
|
email: {
|
|
2240
2240
|
type: "string",
|
|
@@ -2251,12 +2251,12 @@ const tools = [
|
|
|
2251
2251
|
status: {
|
|
2252
2252
|
type: "string",
|
|
2253
2253
|
enum: ["active", "inactive", "paused"],
|
|
2254
|
-
description: "Updated
|
|
2254
|
+
description: "Updated company status",
|
|
2255
2255
|
},
|
|
2256
2256
|
health: {
|
|
2257
2257
|
type: "string",
|
|
2258
2258
|
enum: ["not_set", "critical", "at_risk", "good"],
|
|
2259
|
-
description: "Updated
|
|
2259
|
+
description: "Updated company health",
|
|
2260
2260
|
},
|
|
2261
2261
|
description: {
|
|
2262
2262
|
type: "string",
|
|
@@ -2284,7 +2284,7 @@ const tools = [
|
|
|
2284
2284
|
},
|
|
2285
2285
|
notes: {
|
|
2286
2286
|
type: "string",
|
|
2287
|
-
description: "Updated notes about the
|
|
2287
|
+
description: "Updated notes about the company",
|
|
2288
2288
|
},
|
|
2289
2289
|
industry: {
|
|
2290
2290
|
type: "string",
|
|
@@ -2297,7 +2297,7 @@ const tools = [
|
|
|
2297
2297
|
priority: {
|
|
2298
2298
|
type: "string",
|
|
2299
2299
|
enum: ["low", "medium", "high", "urgent"],
|
|
2300
|
-
description: "Updated
|
|
2300
|
+
description: "Updated company priority",
|
|
2301
2301
|
},
|
|
2302
2302
|
linkedin_url: {
|
|
2303
2303
|
type: "string",
|
|
@@ -2331,10 +2331,10 @@ const tools = [
|
|
|
2331
2331
|
},
|
|
2332
2332
|
owner_id: {
|
|
2333
2333
|
type: "string",
|
|
2334
|
-
description: "Updated
|
|
2334
|
+
description: "Updated company owner ID",
|
|
2335
2335
|
},
|
|
2336
2336
|
},
|
|
2337
|
-
required: ["
|
|
2337
|
+
required: ["company_id"],
|
|
2338
2338
|
},
|
|
2339
2339
|
},
|
|
2340
2340
|
// Contact tools
|
|
@@ -2348,13 +2348,13 @@ const tools = [
|
|
|
2348
2348
|
type: "string",
|
|
2349
2349
|
description: "Search by name (first or last) or email. Case-insensitive partial match — e.g. \"@example.com\" finds every contact at that domain. Use this whenever looking for a specific person or email.",
|
|
2350
2350
|
},
|
|
2351
|
-
|
|
2351
|
+
company_id: {
|
|
2352
2352
|
type: "string",
|
|
2353
|
-
description: "Filter by associated
|
|
2353
|
+
description: "Filter by associated company ID",
|
|
2354
2354
|
},
|
|
2355
2355
|
contact_type: {
|
|
2356
2356
|
type: "string",
|
|
2357
|
-
enum: ["lead", "
|
|
2357
|
+
enum: ["lead", "customer", "partner", "vendor"],
|
|
2358
2358
|
description: "Filter by contact type",
|
|
2359
2359
|
},
|
|
2360
2360
|
priority: {
|
|
@@ -2410,9 +2410,9 @@ const tools = [
|
|
|
2410
2410
|
type: "string",
|
|
2411
2411
|
description: "Phone number",
|
|
2412
2412
|
},
|
|
2413
|
-
|
|
2413
|
+
company_id: {
|
|
2414
2414
|
type: "string",
|
|
2415
|
-
description: "ID of the associated
|
|
2415
|
+
description: "ID of the associated company",
|
|
2416
2416
|
},
|
|
2417
2417
|
title: {
|
|
2418
2418
|
type: "string",
|
|
@@ -2420,7 +2420,7 @@ const tools = [
|
|
|
2420
2420
|
},
|
|
2421
2421
|
contact_type: {
|
|
2422
2422
|
type: "string",
|
|
2423
|
-
enum: ["lead", "
|
|
2423
|
+
enum: ["lead", "customer", "partner", "vendor"],
|
|
2424
2424
|
description: "Type of contact",
|
|
2425
2425
|
},
|
|
2426
2426
|
priority: {
|
|
@@ -2489,9 +2489,9 @@ const tools = [
|
|
|
2489
2489
|
type: "string",
|
|
2490
2490
|
description: "Updated phone number",
|
|
2491
2491
|
},
|
|
2492
|
-
|
|
2492
|
+
company_id: {
|
|
2493
2493
|
type: "string",
|
|
2494
|
-
description: "Updated associated
|
|
2494
|
+
description: "Updated associated company ID",
|
|
2495
2495
|
},
|
|
2496
2496
|
title: {
|
|
2497
2497
|
type: "string",
|
|
@@ -2499,7 +2499,7 @@ const tools = [
|
|
|
2499
2499
|
},
|
|
2500
2500
|
contact_type: {
|
|
2501
2501
|
type: "string",
|
|
2502
|
-
enum: ["lead", "
|
|
2502
|
+
enum: ["lead", "customer", "partner", "vendor"],
|
|
2503
2503
|
description: "Updated contact type",
|
|
2504
2504
|
},
|
|
2505
2505
|
priority: {
|
|
@@ -2572,9 +2572,9 @@ const tools = [
|
|
|
2572
2572
|
enum: ["low", "medium", "high", "urgent"],
|
|
2573
2573
|
description: "Filter by priority level",
|
|
2574
2574
|
},
|
|
2575
|
-
|
|
2575
|
+
company_id: {
|
|
2576
2576
|
type: "string",
|
|
2577
|
-
description: "Filter by
|
|
2577
|
+
description: "Filter by company ID",
|
|
2578
2578
|
},
|
|
2579
2579
|
pipeline_id: {
|
|
2580
2580
|
type: "string",
|
|
@@ -2640,9 +2640,9 @@ const tools = [
|
|
|
2640
2640
|
type: "number",
|
|
2641
2641
|
description: "Win probability (0-100)",
|
|
2642
2642
|
},
|
|
2643
|
-
|
|
2643
|
+
company_id: {
|
|
2644
2644
|
type: "string",
|
|
2645
|
-
description: "Associated
|
|
2645
|
+
description: "Associated company ID",
|
|
2646
2646
|
},
|
|
2647
2647
|
contact_id: {
|
|
2648
2648
|
type: "string",
|
|
@@ -2695,9 +2695,9 @@ const tools = [
|
|
|
2695
2695
|
type: "number",
|
|
2696
2696
|
description: "Updated win probability (0-100)",
|
|
2697
2697
|
},
|
|
2698
|
-
|
|
2698
|
+
company_id: {
|
|
2699
2699
|
type: "string",
|
|
2700
|
-
description: "Updated associated
|
|
2700
|
+
description: "Updated associated company ID",
|
|
2701
2701
|
},
|
|
2702
2702
|
contact_id: {
|
|
2703
2703
|
type: "string",
|
|
@@ -2894,9 +2894,9 @@ const tools = [
|
|
|
2894
2894
|
type: "string",
|
|
2895
2895
|
description: "Filter by project ID",
|
|
2896
2896
|
},
|
|
2897
|
-
|
|
2897
|
+
company_id: {
|
|
2898
2898
|
type: "string",
|
|
2899
|
-
description: "Filter by
|
|
2899
|
+
description: "Filter by company ID",
|
|
2900
2900
|
},
|
|
2901
2901
|
limit: {
|
|
2902
2902
|
type: "number",
|
|
@@ -2970,9 +2970,9 @@ const tools = [
|
|
|
2970
2970
|
type: "string",
|
|
2971
2971
|
description: "Link event to a project",
|
|
2972
2972
|
},
|
|
2973
|
-
|
|
2973
|
+
company_id: {
|
|
2974
2974
|
type: "string",
|
|
2975
|
-
description: "Link event to
|
|
2975
|
+
description: "Link event to a company",
|
|
2976
2976
|
},
|
|
2977
2977
|
attendees: {
|
|
2978
2978
|
type: "array",
|
|
@@ -3046,9 +3046,9 @@ const tools = [
|
|
|
3046
3046
|
type: "string",
|
|
3047
3047
|
description: "Updated project link",
|
|
3048
3048
|
},
|
|
3049
|
-
|
|
3049
|
+
company_id: {
|
|
3050
3050
|
type: "string",
|
|
3051
|
-
description: "Updated
|
|
3051
|
+
description: "Updated company link",
|
|
3052
3052
|
},
|
|
3053
3053
|
attendees: {
|
|
3054
3054
|
type: "array",
|
|
@@ -3094,9 +3094,9 @@ const tools = [
|
|
|
3094
3094
|
enum: ["draft", "open", "partially_paid", "paid", "archived", "cancelled"],
|
|
3095
3095
|
description: "Filter by invoice status",
|
|
3096
3096
|
},
|
|
3097
|
-
|
|
3097
|
+
company_id: {
|
|
3098
3098
|
type: "string",
|
|
3099
|
-
description: "Filter by
|
|
3099
|
+
description: "Filter by company ID",
|
|
3100
3100
|
},
|
|
3101
3101
|
deal_id: {
|
|
3102
3102
|
type: "string",
|
|
@@ -3142,9 +3142,9 @@ const tools = [
|
|
|
3142
3142
|
type: "string",
|
|
3143
3143
|
description: "Deal this invoice bills against. Links the invoice, and any payment recorded against it, to the deal's collected revenue.",
|
|
3144
3144
|
},
|
|
3145
|
-
|
|
3145
|
+
company_id: {
|
|
3146
3146
|
type: "string",
|
|
3147
|
-
description: "
|
|
3147
|
+
description: "Company ID",
|
|
3148
3148
|
},
|
|
3149
3149
|
line_items: {
|
|
3150
3150
|
type: "array",
|
|
@@ -3211,9 +3211,9 @@ const tools = [
|
|
|
3211
3211
|
enum: ["draft", "open", "partially_paid", "paid", "archived", "cancelled"],
|
|
3212
3212
|
description: "Updated status",
|
|
3213
3213
|
},
|
|
3214
|
-
|
|
3214
|
+
company_id: {
|
|
3215
3215
|
type: "string",
|
|
3216
|
-
description: "Updated
|
|
3216
|
+
description: "Updated company",
|
|
3217
3217
|
},
|
|
3218
3218
|
deal_id: {
|
|
3219
3219
|
type: "string",
|
|
@@ -3256,7 +3256,7 @@ const tools = [
|
|
|
3256
3256
|
status: { type: "string", enum: ["active", "trialing", "past_due", "unpaid", "canceled", "incomplete", "incomplete_expired", "paused"], description: "Stripe status, verbatim." },
|
|
3257
3257
|
active_only: { type: "boolean", description: "Only subscriptions that are live revenue (active, trialing, past_due)." },
|
|
3258
3258
|
origin: { type: "string", enum: ["helm", "external"], description: "Filter by revenue source." },
|
|
3259
|
-
|
|
3259
|
+
company_id: { type: "string", description: "Only subscriptions for this client company." },
|
|
3260
3260
|
contact_id: { type: "string", description: "Only subscriptions for this contact." },
|
|
3261
3261
|
product_id: { type: "string", description: "Only subscriptions for this product." },
|
|
3262
3262
|
limit: { type: "number", description: "Max rows to return (default 50)." },
|
|
@@ -3284,14 +3284,14 @@ const tools = [
|
|
|
3284
3284
|
},
|
|
3285
3285
|
{
|
|
3286
3286
|
name: "helm__create_subscription",
|
|
3287
|
-
description: "Start billing a customer on a recurring schedule. Charges a card the customer already has on file when there is one; otherwise returns a
|
|
3287
|
+
description: "Start billing a customer on a recurring schedule. Charges a card the customer already has on file when there is one; otherwise returns a payment link to send them (link_url), which is listed by helm__list_subscription_links until they pay. The link does not expire: it stays payable until the customer pays or it is canceled. ALWAYS confirm the customer, product and price with the user before calling -- this moves real money on a real card. Requires a recurring product (one with a billing interval).",
|
|
3288
3288
|
inputSchema: {
|
|
3289
3289
|
type: "object",
|
|
3290
3290
|
properties: {
|
|
3291
3291
|
contact_id: { type: "string", description: "The person to bill. Required -- Stripe bills a person, not an account." },
|
|
3292
3292
|
product_id: { type: "string", description: "A recurring product from the catalogue." },
|
|
3293
3293
|
product_price_id: { type: "string", description: "Optional price tier on that product; omit to use its default price." },
|
|
3294
|
-
|
|
3294
|
+
company_id: { type: "string", description: "Optional company attribution; defaults to the contact's company." },
|
|
3295
3295
|
quantity: { type: "number", description: "Seats or units (default 1)." },
|
|
3296
3296
|
method: { type: "string", enum: ["auto", "saved_card", "checkout"], description: "'auto' (default) uses a saved card if there is one and falls back to a link. 'checkout' always returns a link. 'saved_card' fails rather than falling back." },
|
|
3297
3297
|
trial_days: { type: "number", description: "Free trial length in days before the first charge." },
|
|
@@ -3343,13 +3343,13 @@ const tools = [
|
|
|
3343
3343
|
},
|
|
3344
3344
|
{
|
|
3345
3345
|
name: "helm__list_subscription_links",
|
|
3346
|
-
description: "List subscription payment links that were sent and not paid. These are NOT subscriptions and are not revenue: the subscription only exists once the customer pays. Default returns open (waiting on the customer) and expired (ran out unpaid, needs a new link) links.",
|
|
3346
|
+
description: "List subscription payment links that were sent and not paid. These are NOT subscriptions and are not revenue: the subscription only exists once the customer pays. Default returns open (waiting on the customer) and expired (ran out unpaid, needs a new link) links. Send a link's link_url; only links sent before links stopped expiring can show as expired.",
|
|
3347
3347
|
inputSchema: {
|
|
3348
3348
|
type: "object",
|
|
3349
3349
|
properties: {
|
|
3350
3350
|
status: { type: "string", enum: ["open", "expired", "completed", "canceled", "all"], description: "Default: open and expired." },
|
|
3351
3351
|
contact_id: { type: "string", description: "Only links for this contact." },
|
|
3352
|
-
|
|
3352
|
+
company_id: { type: "string", description: "Only links for this client company." },
|
|
3353
3353
|
limit: { type: "number", description: "Max rows to return (default 50)." },
|
|
3354
3354
|
},
|
|
3355
3355
|
required: [],
|
|
@@ -3376,7 +3376,7 @@ const tools = [
|
|
|
3376
3376
|
// Payment tools
|
|
3377
3377
|
{
|
|
3378
3378
|
name: "helm__get_payments",
|
|
3379
|
-
description: "List recorded payments. Filter by deal_id to see what a deal actually collected, by invoice_id to see what has been paid against an invoice, by
|
|
3379
|
+
description: "List recorded payments. Filter by deal_id to see what a deal actually collected, by invoice_id to see what has been paid against an invoice, by company_id for one client, or by date range for a period.",
|
|
3380
3380
|
inputSchema: {
|
|
3381
3381
|
type: "object",
|
|
3382
3382
|
properties: {
|
|
@@ -3388,7 +3388,7 @@ const tools = [
|
|
|
3388
3388
|
type: "string",
|
|
3389
3389
|
description: "Only payments against this invoice",
|
|
3390
3390
|
},
|
|
3391
|
-
|
|
3391
|
+
company_id: {
|
|
3392
3392
|
type: "string",
|
|
3393
3393
|
description: "Only payments from this client",
|
|
3394
3394
|
},
|
|
@@ -3438,7 +3438,7 @@ const tools = [
|
|
|
3438
3438
|
type: "string",
|
|
3439
3439
|
description: "Deal to attribute this payment to. Inherited from the invoice when invoice_id is given.",
|
|
3440
3440
|
},
|
|
3441
|
-
|
|
3441
|
+
company_id: {
|
|
3442
3442
|
type: "string",
|
|
3443
3443
|
description: "Client who paid. Inherited from the invoice or deal when either is given.",
|
|
3444
3444
|
},
|
|
@@ -4322,7 +4322,7 @@ const server = new Server({
|
|
|
4322
4322
|
name: "helm-mcp-server",
|
|
4323
4323
|
// Keep in step with package.json — this is what clients see in the MCP
|
|
4324
4324
|
// handshake, and it had drifted four minor versions behind.
|
|
4325
|
-
version: "0.
|
|
4325
|
+
version: "1.0.0",
|
|
4326
4326
|
}, {
|
|
4327
4327
|
capabilities: {
|
|
4328
4328
|
tools: {},
|
|
@@ -4408,11 +4408,11 @@ const TOOL_ROUTES = {
|
|
|
4408
4408
|
helm__create_product_price: { action: "create_product_price", method: "POST", resultKey: "price", successMsg: "Price tier added." },
|
|
4409
4409
|
helm__update_product_price: { action: "update_product_price", method: "POST", resultKey: "price", successMsg: "Price tier updated." },
|
|
4410
4410
|
helm__delete_product_price: { action: "delete_product_price", method: "POST", successMsg: "Price tier deleted." },
|
|
4411
|
-
//
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4411
|
+
// Company-product attribution
|
|
4412
|
+
helm__list_company_products: { action: "list_account_products", method: "GET", resultKey: "rows" },
|
|
4413
|
+
helm__attach_product_to_company: { action: "attach_product_to_account", method: "POST", successMsg: "Product attached to company." },
|
|
4414
|
+
helm__update_company_product: { action: "update_account_product", method: "POST", resultKey: "account_product", successMsg: "Updated." },
|
|
4415
|
+
helm__detach_product_from_company: { action: "detach_product_from_account", method: "POST", successMsg: "Detached." },
|
|
4416
4416
|
// Forms
|
|
4417
4417
|
helm__list_forms: { action: "list_forms", method: "GET", resultKey: "forms" },
|
|
4418
4418
|
helm__get_form: { action: "get_form", method: "GET", resultKey: "form" },
|
|
@@ -4426,12 +4426,12 @@ const TOOL_ROUTES = {
|
|
|
4426
4426
|
helm__delete_form_field: { action: "delete_form_field", method: "POST", successMsg: "Field removed." },
|
|
4427
4427
|
helm__update_form_step: { action: "update_form_step", method: "POST", resultKey: "step", successMsg: "Step updated." },
|
|
4428
4428
|
helm__delete_form_step: { action: "delete_form_step", method: "POST", successMsg: "Step removed." },
|
|
4429
|
-
//
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4429
|
+
// Companies
|
|
4430
|
+
helm__get_companies: { action: "get_accounts", method: "GET", resultKey: "accounts" },
|
|
4431
|
+
helm__get_company: { action: "get_account", method: "GET", resultKey: "account" },
|
|
4432
|
+
helm__add_company: { action: "add_account", method: "POST", resultKey: "account", successMsg: "Company created successfully!" },
|
|
4433
4433
|
helm__log_activity: { action: "log_activity", method: "POST", successMsg: "Activity logged." },
|
|
4434
|
-
|
|
4434
|
+
helm__update_company: { action: "update_account", method: "POST", resultKey: "account", successMsg: "Company updated successfully!" },
|
|
4435
4435
|
// Contacts
|
|
4436
4436
|
helm__get_contacts: { action: "get_contacts", method: "GET", resultKey: "contacts" },
|
|
4437
4437
|
helm__get_contact: { action: "get_contact", method: "GET", resultKey: "contact" },
|
|
@@ -4535,6 +4535,47 @@ const TOOL_ROUTES = {
|
|
|
4535
4535
|
helm__update_draft: { action: "update_draft", method: "POST", resultKey: "draft", successMsg: "Draft updated." },
|
|
4536
4536
|
helm__delete_draft: { action: "delete_draft", method: "POST", successMsg: "Draft deleted." },
|
|
4537
4537
|
};
|
|
4538
|
+
/**
|
|
4539
|
+
* The record users call a company is still an account in the API: the table,
|
|
4540
|
+
* the `account_id` columns and the edge actions (`get_accounts`) keep their
|
|
4541
|
+
* names. This server speaks company end to end, so arguments are translated
|
|
4542
|
+
* on the way in and results on the way out, and nothing a client sees says
|
|
4543
|
+
* account. Values are never touched except `entity_type`, whose value names
|
|
4544
|
+
* the record kind.
|
|
4545
|
+
*/
|
|
4546
|
+
const TO_API_KEYS = {
|
|
4547
|
+
company_id: "account_id",
|
|
4548
|
+
company_ids: "account_ids",
|
|
4549
|
+
company_name: "account_name",
|
|
4550
|
+
company_product_id: "account_product_id",
|
|
4551
|
+
};
|
|
4552
|
+
const FROM_API_KEYS = {
|
|
4553
|
+
account_id: "company_id",
|
|
4554
|
+
account_ids: "company_ids",
|
|
4555
|
+
account_name: "company_name",
|
|
4556
|
+
account_product_id: "company_product_id",
|
|
4557
|
+
account_product: "company_product",
|
|
4558
|
+
account_products: "company_products",
|
|
4559
|
+
account: "company",
|
|
4560
|
+
accounts: "companies",
|
|
4561
|
+
};
|
|
4562
|
+
function renameKeys(value, keys, kind) {
|
|
4563
|
+
if (Array.isArray(value))
|
|
4564
|
+
return value.map((v) => renameKeys(v, keys, kind));
|
|
4565
|
+
if (!value || typeof value !== "object")
|
|
4566
|
+
return value;
|
|
4567
|
+
const src = value;
|
|
4568
|
+
const out = {};
|
|
4569
|
+
for (const [k, v] of Object.entries(src)) {
|
|
4570
|
+
// A key whose new name is already taken (a row with both `account` and a
|
|
4571
|
+
// `company` text field) keeps its own name rather than overwrite the other.
|
|
4572
|
+
const key = keys[k] && !(keys[k] in src) ? keys[k] : k;
|
|
4573
|
+
out[key] = k === "entity_type" && v === kind.from ? kind.to : renameKeys(v, keys, kind);
|
|
4574
|
+
}
|
|
4575
|
+
return out;
|
|
4576
|
+
}
|
|
4577
|
+
const toApiArgs = (args) => renameKeys(args, TO_API_KEYS, { from: "company", to: "account" });
|
|
4578
|
+
const fromApi = (data) => renameKeys(data, FROM_API_KEYS, { from: "account", to: "company" });
|
|
4538
4579
|
// Handle tool execution
|
|
4539
4580
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
4540
4581
|
const { name, arguments: args } = request.params;
|
|
@@ -4558,7 +4599,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
4558
4599
|
throw new Error("project_id is required. Either provide it or set HELM_DEFAULT_PROJECT_ID.");
|
|
4559
4600
|
}
|
|
4560
4601
|
}
|
|
4561
|
-
const result = await helmApiRequest(route.action, route.method, finalArgs);
|
|
4602
|
+
const result = await helmApiRequest(route.action, route.method, toApiArgs(finalArgs));
|
|
4562
4603
|
// Handler-level failures come back as HTTP 200 with `{ success: true }` from
|
|
4563
4604
|
// the router wrapper and an `error`/`message` pair from the handler itself.
|
|
4564
4605
|
// helmApiRequest only checks `success`, so without this a failed call falls
|
|
@@ -4579,7 +4620,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
4579
4620
|
// Fall back to the whole result when the named key is absent — handlers
|
|
4580
4621
|
// that return curated flat shapes (e.g. createTask → { task_id, task_display_id, ... })
|
|
4581
4622
|
// would otherwise stringify as `undefined`.
|
|
4582
|
-
const data = result[route.resultKey] ?? result;
|
|
4623
|
+
const data = fromApi(result[route.resultKey] ?? result);
|
|
4583
4624
|
text = route.successMsg
|
|
4584
4625
|
? `${route.successMsg}\n\n${JSON.stringify(data, null, 2)}`
|
|
4585
4626
|
: JSON.stringify(data, null, 2);
|