@assetlab/mcp-server 1.10.0 → 1.12.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 +6 -0
- package/dist/tools-write.js +190 -1
- package/dist/tools-write.js.map +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +99 -0
- package/dist/tools.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -86,6 +86,7 @@ Works with **Claude**, **ChatGPT**, **Microsoft Copilot**, and any MCP-compatibl
|
|
|
86
86
|
| Invoices | `list_invoices` | `get_invoice` |
|
|
87
87
|
| Purchase Orders | `list_purchase_orders` | `get_purchase_order` |
|
|
88
88
|
| Expenses | `list_expenses` | `get_expense` |
|
|
89
|
+
| Change Orders | `list_change_orders` | `get_change_order` |
|
|
89
90
|
| Budgets | `list_budgets` | `get_budget` |
|
|
90
91
|
| Parts | `list_parts` | `get_part` |
|
|
91
92
|
| Part Categories | `list_part_categories` | `get_part_category` |
|
|
@@ -100,6 +101,7 @@ Works with **Claude**, **ChatGPT**, **Microsoft Copilot**, and any MCP-compatibl
|
|
|
100
101
|
| Project Budget Items | `list_project_budget_items` | `get_project_budget_item` |
|
|
101
102
|
| Project Time Entries | `list_project_time_entries` | `get_project_time_entry` |
|
|
102
103
|
| Project Comments | `list_project_comments` | `get_project_comment` |
|
|
104
|
+
| Project Document Folder Templates | `list_project_document_folder_templates` | `get_project_document_folder_template` |
|
|
103
105
|
| Site FCI History | `list_site_fci_history` | `get_site_fci_history_entry` |
|
|
104
106
|
| Vendor Site Assignments | `list_vendor_site_assignments` | `get_vendor_site_assignment` |
|
|
105
107
|
| Contract Sites | `list_contract_sites` | — |
|
|
@@ -110,6 +112,7 @@ Works with **Claude**, **ChatGPT**, **Microsoft Copilot**, and any MCP-compatibl
|
|
|
110
112
|
| Manufacturers | `list_manufacturers` | `get_manufacturer` |
|
|
111
113
|
| Building Types | `list_building_types` | — |
|
|
112
114
|
| Location Types | `list_location_types` | — |
|
|
115
|
+
| Project Phase Categories | `list_project_phase_categories` | — |
|
|
113
116
|
| Cost Categories | `list_cost_categories` | — |
|
|
114
117
|
|
|
115
118
|
### Write tools
|
|
@@ -130,6 +133,7 @@ Works with **Claude**, **ChatGPT**, **Microsoft Copilot**, and any MCP-compatibl
|
|
|
130
133
|
| Invoices | `create_invoice` | `update_invoice` | `delete_invoice` |
|
|
131
134
|
| Purchase Orders | `create_purchase_order` | `update_purchase_order` | `delete_purchase_order` |
|
|
132
135
|
| Expenses | `create_expense` | `update_expense` | `delete_expense` |
|
|
136
|
+
| Change Orders | `create_change_order` | `update_change_order` | `delete_change_order` |
|
|
133
137
|
| Budgets | `create_budget` | `update_budget` | `delete_budget` |
|
|
134
138
|
| Parts | `create_part` | `update_part` | `delete_part` |
|
|
135
139
|
| Part Categories | `create_part_category` | `update_part_category` | `delete_part_category` |
|
|
@@ -143,6 +147,7 @@ Works with **Claude**, **ChatGPT**, **Microsoft Copilot**, and any MCP-compatibl
|
|
|
143
147
|
| Project Budget Items | `create_project_budget_item` | `update_project_budget_item` | `delete_project_budget_item` |
|
|
144
148
|
| Project Time Entries | `create_project_time_entry` | `update_project_time_entry` | `delete_project_time_entry` |
|
|
145
149
|
| Project Comments | `create_project_comment` | `update_project_comment` | `delete_project_comment` |
|
|
150
|
+
| Project Document Folder Templates | `create_project_document_folder_template` | `update_project_document_folder_template` | `delete_project_document_folder_template` |
|
|
146
151
|
| Vendor Site Assignments | `create_vendor_site_assignment` | — | `delete_vendor_site_assignment` |
|
|
147
152
|
| Contract Sites | `create_contract_site` | — | `delete_contract_site` |
|
|
148
153
|
| Custom Field Definitions | `create_custom_field_definition` | `update_custom_field_definition` | `delete_custom_field_definition` |
|
|
@@ -152,6 +157,7 @@ Works with **Claude**, **ChatGPT**, **Microsoft Copilot**, and any MCP-compatibl
|
|
|
152
157
|
| Manufacturers | `create_manufacturer` | `update_manufacturer` | `delete_manufacturer` |
|
|
153
158
|
| Building Types | `create_building_type` | `update_building_type` | `delete_building_type` |
|
|
154
159
|
| Location Types | `create_location_type` | `update_location_type` | `delete_location_type` |
|
|
160
|
+
| Project Phase Categories | `create_project_phase_category` | `update_project_phase_category` | `delete_project_phase_category` |
|
|
155
161
|
| Cost Categories | `create_cost_category` | `update_cost_category` | `delete_cost_category` |
|
|
156
162
|
|
|
157
163
|
## Scopes
|
package/dist/tools-write.js
CHANGED
|
@@ -831,6 +831,100 @@ export function registerWriteTools(server, client) {
|
|
|
831
831
|
}
|
|
832
832
|
});
|
|
833
833
|
// ============================================================
|
|
834
|
+
// Change Orders (scope: change_orders)
|
|
835
|
+
// ============================================================
|
|
836
|
+
server.tool('create_change_order', 'Create a new change order. Requires change_orders:write scope.', {
|
|
837
|
+
co_number: z.string().min(1).max(200).describe('Change order number (required)'),
|
|
838
|
+
description: z.string().min(1).describe('Description (required)'),
|
|
839
|
+
amount: z.number().describe('Amount (required, negative for credits)'),
|
|
840
|
+
status: z.enum(['draft', 'submitted', 'approved', 'rejected']).optional().describe('Status'),
|
|
841
|
+
reason: z.string().optional().describe('Reason for the change order'),
|
|
842
|
+
notes: z.string().optional().describe('Additional notes'),
|
|
843
|
+
project_id: z.string().uuid().optional().describe('Project ID'),
|
|
844
|
+
vendor_id: z.string().uuid().optional().describe('Vendor ID'),
|
|
845
|
+
category_id: z.string().uuid().optional().describe('Cost category ID'),
|
|
846
|
+
}, async (params) => {
|
|
847
|
+
try {
|
|
848
|
+
const result = await client.create('change-orders', buildBody(params));
|
|
849
|
+
return formatResult(result);
|
|
850
|
+
}
|
|
851
|
+
catch (err) {
|
|
852
|
+
return formatError(err);
|
|
853
|
+
}
|
|
854
|
+
});
|
|
855
|
+
server.tool('update_change_order', 'Update an existing change order by ID. Requires change_orders:write scope.', {
|
|
856
|
+
id: z.string().uuid().describe('Change order ID'),
|
|
857
|
+
co_number: z.string().min(1).max(200).optional().describe('Change order number'),
|
|
858
|
+
description: z.string().optional().describe('Description'),
|
|
859
|
+
amount: z.number().optional().describe('Amount (negative for credits)'),
|
|
860
|
+
status: z.enum(['draft', 'submitted', 'approved', 'rejected']).optional().describe('Status'),
|
|
861
|
+
reason: z.string().optional().describe('Reason'),
|
|
862
|
+
notes: z.string().optional().describe('Notes'),
|
|
863
|
+
project_id: z.string().uuid().optional().describe('Project ID'),
|
|
864
|
+
vendor_id: z.string().uuid().optional().describe('Vendor ID'),
|
|
865
|
+
category_id: z.string().uuid().optional().describe('Cost category ID'),
|
|
866
|
+
approved_by: z.string().optional().describe('Approved by (user ID)'),
|
|
867
|
+
approved_at: z.string().optional().describe('Approval date (ISO 8601)'),
|
|
868
|
+
}, async ({ id, ...rest }) => {
|
|
869
|
+
try {
|
|
870
|
+
const result = await client.update('change-orders', id, buildBody(rest));
|
|
871
|
+
return formatResult(result);
|
|
872
|
+
}
|
|
873
|
+
catch (err) {
|
|
874
|
+
return formatError(err);
|
|
875
|
+
}
|
|
876
|
+
});
|
|
877
|
+
server.tool('delete_change_order', 'Delete a change order by ID. Requires change_orders:write scope.', { id: z.string().uuid().describe('Change order ID') }, async ({ id }) => {
|
|
878
|
+
try {
|
|
879
|
+
const result = await client.remove('change-orders', id);
|
|
880
|
+
return formatResult(result);
|
|
881
|
+
}
|
|
882
|
+
catch (err) {
|
|
883
|
+
return formatError(err);
|
|
884
|
+
}
|
|
885
|
+
});
|
|
886
|
+
// ============================================================
|
|
887
|
+
// Project Document Folder Templates (scope: project_document_folder_templates)
|
|
888
|
+
// ============================================================
|
|
889
|
+
server.tool('create_project_document_folder_template', 'Create a project document folder template. Requires project_document_folder_templates:write scope.', {
|
|
890
|
+
name: z.string().min(1).max(500).describe('Template name (required)'),
|
|
891
|
+
description: z.string().max(2000).optional().describe('Template description'),
|
|
892
|
+
structure: z.array(z.any()).optional().describe('Folder hierarchy as JSON array'),
|
|
893
|
+
is_default: z.boolean().optional().describe('Whether this is the default template'),
|
|
894
|
+
}, async (params) => {
|
|
895
|
+
try {
|
|
896
|
+
const result = await client.create('project-document-folder-templates', buildBody(params));
|
|
897
|
+
return formatResult(result);
|
|
898
|
+
}
|
|
899
|
+
catch (err) {
|
|
900
|
+
return formatError(err);
|
|
901
|
+
}
|
|
902
|
+
});
|
|
903
|
+
server.tool('update_project_document_folder_template', 'Update a project document folder template by ID. Requires project_document_folder_templates:write scope.', {
|
|
904
|
+
id: z.string().uuid().describe('Template ID'),
|
|
905
|
+
name: z.string().min(1).max(500).optional().describe('Template name'),
|
|
906
|
+
description: z.string().max(2000).optional().describe('Template description'),
|
|
907
|
+
structure: z.array(z.any()).optional().describe('Folder hierarchy as JSON array'),
|
|
908
|
+
is_default: z.boolean().optional().describe('Whether this is the default template'),
|
|
909
|
+
}, async ({ id, ...rest }) => {
|
|
910
|
+
try {
|
|
911
|
+
const result = await client.update('project-document-folder-templates', id, buildBody(rest));
|
|
912
|
+
return formatResult(result);
|
|
913
|
+
}
|
|
914
|
+
catch (err) {
|
|
915
|
+
return formatError(err);
|
|
916
|
+
}
|
|
917
|
+
});
|
|
918
|
+
server.tool('delete_project_document_folder_template', 'Delete a project document folder template by ID. Requires project_document_folder_templates:write scope.', { id: z.string().uuid().describe('Template ID') }, async ({ id }) => {
|
|
919
|
+
try {
|
|
920
|
+
const result = await client.remove('project-document-folder-templates', id);
|
|
921
|
+
return formatResult(result);
|
|
922
|
+
}
|
|
923
|
+
catch (err) {
|
|
924
|
+
return formatError(err);
|
|
925
|
+
}
|
|
926
|
+
});
|
|
927
|
+
// ============================================================
|
|
834
928
|
// 14. Budgets (scope: budgets)
|
|
835
929
|
// ============================================================
|
|
836
930
|
server.tool('create_budget', 'Create a new budget. Requires budgets:write scope.', {
|
|
@@ -1563,6 +1657,45 @@ export function registerWriteTools(server, client) {
|
|
|
1563
1657
|
}
|
|
1564
1658
|
});
|
|
1565
1659
|
// ============================================================
|
|
1660
|
+
// Project Phase Categories (scope: project_phase_categories)
|
|
1661
|
+
// ============================================================
|
|
1662
|
+
server.tool('create_project_phase_category', 'Create a new project phase category. Requires project_phase_categories:write scope.', {
|
|
1663
|
+
name: z.string().min(1).max(500).describe('Phase name (required), e.g. "Planning", "Design"'),
|
|
1664
|
+
description: z.string().max(2000).optional().describe('Description of the phase'),
|
|
1665
|
+
sort_order: z.number().int().min(0).max(10000).optional().describe('Display order (lower = first)'),
|
|
1666
|
+
}, async (params) => {
|
|
1667
|
+
try {
|
|
1668
|
+
const result = await client.create('project-phase-categories', buildBody(params));
|
|
1669
|
+
return formatResult(result);
|
|
1670
|
+
}
|
|
1671
|
+
catch (err) {
|
|
1672
|
+
return formatError(err);
|
|
1673
|
+
}
|
|
1674
|
+
});
|
|
1675
|
+
server.tool('update_project_phase_category', 'Update an existing project phase category by ID. Requires project_phase_categories:write scope.', {
|
|
1676
|
+
id: z.string().uuid().describe('Project phase category ID'),
|
|
1677
|
+
name: z.string().min(1).max(500).optional().describe('Phase name'),
|
|
1678
|
+
description: z.string().max(2000).optional().describe('Description'),
|
|
1679
|
+
sort_order: z.number().int().min(0).max(10000).optional().describe('Display order (lower = first)'),
|
|
1680
|
+
}, async ({ id, ...rest }) => {
|
|
1681
|
+
try {
|
|
1682
|
+
const result = await client.update('project-phase-categories', id, buildBody(rest));
|
|
1683
|
+
return formatResult(result);
|
|
1684
|
+
}
|
|
1685
|
+
catch (err) {
|
|
1686
|
+
return formatError(err);
|
|
1687
|
+
}
|
|
1688
|
+
});
|
|
1689
|
+
server.tool('delete_project_phase_category', 'Delete a project phase category by ID. Requires project_phase_categories:write scope.', { id: z.string().uuid().describe('Project phase category ID') }, async ({ id }) => {
|
|
1690
|
+
try {
|
|
1691
|
+
const result = await client.remove('project-phase-categories', id);
|
|
1692
|
+
return formatResult(result);
|
|
1693
|
+
}
|
|
1694
|
+
catch (err) {
|
|
1695
|
+
return formatError(err);
|
|
1696
|
+
}
|
|
1697
|
+
});
|
|
1698
|
+
// ============================================================
|
|
1566
1699
|
// 30. Cost Categories (scope: cost_categories)
|
|
1567
1700
|
// ============================================================
|
|
1568
1701
|
server.tool('create_cost_category', 'Create a new cost category. Requires cost_categories:write scope.', {
|
|
@@ -2451,6 +2584,62 @@ export function registerWriteTools(server, client) {
|
|
|
2451
2584
|
}
|
|
2452
2585
|
});
|
|
2453
2586
|
// ============================================================
|
|
2587
|
+
// Project Risks (scope: project_risks)
|
|
2588
|
+
// ============================================================
|
|
2589
|
+
server.tool('create_project_risk', 'Create a new project risk. Requires project_risks:write scope.', {
|
|
2590
|
+
project_id: z.string().uuid().describe('Project ID (required)'),
|
|
2591
|
+
title: z.string().min(1).max(500).describe('Risk title (required)'),
|
|
2592
|
+
description: z.string().optional().describe('Risk description'),
|
|
2593
|
+
category: z.enum(['technical', 'financial', 'schedule', 'resource', 'external']).optional().describe('Risk category'),
|
|
2594
|
+
probability: z.enum(['low', 'medium', 'high']).optional().describe('Probability level'),
|
|
2595
|
+
impact: z.enum(['low', 'medium', 'high', 'critical']).optional().describe('Impact level'),
|
|
2596
|
+
status: z.enum(['identified', 'analyzing', 'mitigating', 'resolved', 'accepted']).optional().describe('Risk status (default: identified)'),
|
|
2597
|
+
mitigation_plan: z.string().optional().describe('Mitigation plan'),
|
|
2598
|
+
contingency_plan: z.string().optional().describe('Contingency plan'),
|
|
2599
|
+
owner_id: z.string().max(200).optional().describe('Risk owner (Clerk user ID)'),
|
|
2600
|
+
due_date: z.string().optional().describe('Due date (ISO 8601)'),
|
|
2601
|
+
created_by: z.string().max(200).optional().describe('Creator (Clerk user ID)'),
|
|
2602
|
+
}, async (params) => {
|
|
2603
|
+
try {
|
|
2604
|
+
const result = await client.create('project-risks', buildBody(params));
|
|
2605
|
+
return formatResult(result);
|
|
2606
|
+
}
|
|
2607
|
+
catch (err) {
|
|
2608
|
+
return formatError(err);
|
|
2609
|
+
}
|
|
2610
|
+
});
|
|
2611
|
+
server.tool('update_project_risk', 'Update an existing project risk by ID. Requires project_risks:write scope.', {
|
|
2612
|
+
id: z.string().uuid().describe('Project risk ID'),
|
|
2613
|
+
project_id: z.string().uuid().optional().describe('Project ID'),
|
|
2614
|
+
title: z.string().min(1).max(500).optional().describe('Risk title'),
|
|
2615
|
+
description: z.string().optional().describe('Risk description'),
|
|
2616
|
+
category: z.enum(['technical', 'financial', 'schedule', 'resource', 'external']).optional().describe('Risk category'),
|
|
2617
|
+
probability: z.enum(['low', 'medium', 'high']).optional().describe('Probability level'),
|
|
2618
|
+
impact: z.enum(['low', 'medium', 'high', 'critical']).optional().describe('Impact level'),
|
|
2619
|
+
status: z.enum(['identified', 'analyzing', 'mitigating', 'resolved', 'accepted']).optional().describe('Risk status'),
|
|
2620
|
+
mitigation_plan: z.string().optional().describe('Mitigation plan'),
|
|
2621
|
+
contingency_plan: z.string().optional().describe('Contingency plan'),
|
|
2622
|
+
owner_id: z.string().max(200).optional().describe('Risk owner (Clerk user ID)'),
|
|
2623
|
+
due_date: z.string().optional().describe('Due date (ISO 8601)'),
|
|
2624
|
+
}, async ({ id, ...rest }) => {
|
|
2625
|
+
try {
|
|
2626
|
+
const result = await client.update('project-risks', id, buildBody(rest));
|
|
2627
|
+
return formatResult(result);
|
|
2628
|
+
}
|
|
2629
|
+
catch (err) {
|
|
2630
|
+
return formatError(err);
|
|
2631
|
+
}
|
|
2632
|
+
});
|
|
2633
|
+
server.tool('delete_project_risk', 'Delete a project risk by ID. Requires project_risks:write scope.', { id: z.string().uuid().describe('Project risk ID') }, async ({ id }) => {
|
|
2634
|
+
try {
|
|
2635
|
+
const result = await client.remove('project-risks', id);
|
|
2636
|
+
return formatResult(result);
|
|
2637
|
+
}
|
|
2638
|
+
catch (err) {
|
|
2639
|
+
return formatError(err);
|
|
2640
|
+
}
|
|
2641
|
+
});
|
|
2642
|
+
// ============================================================
|
|
2454
2643
|
// Project Assets
|
|
2455
2644
|
// ============================================================
|
|
2456
2645
|
server.tool('create_project_asset', 'Link an asset to a project. Requires project_assets:write scope.', {
|
|
@@ -2491,7 +2680,7 @@ export function registerWriteTools(server, client) {
|
|
|
2491
2680
|
'project-comments', 'project-team-members', 'project-task-dependencies',
|
|
2492
2681
|
'project-updates', 'project-cost-snapshots', 'project-locations',
|
|
2493
2682
|
'project-sites', 'project-buildings', 'project-systems',
|
|
2494
|
-
'project-system-classes', 'project-system-groups', 'project-assets',
|
|
2683
|
+
'project-system-classes', 'project-system-groups', 'project-assets', 'project-risks',
|
|
2495
2684
|
'parts', 'part-categories',
|
|
2496
2685
|
'custom-field-definitions', 'custom-field-values',
|
|
2497
2686
|
'vendor-site-assignments', 'contract-sites',
|