@assetlab/mcp-server 1.9.0 → 1.11.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 +2 -0
- package/dist/tools-write.js +189 -0
- package/dist/tools-write.js.map +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +184 -1
- package/dist/tools.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -110,6 +110,7 @@ Works with **Claude**, **ChatGPT**, **Microsoft Copilot**, and any MCP-compatibl
|
|
|
110
110
|
| Manufacturers | `list_manufacturers` | `get_manufacturer` |
|
|
111
111
|
| Building Types | `list_building_types` | — |
|
|
112
112
|
| Location Types | `list_location_types` | — |
|
|
113
|
+
| Project Phase Categories | `list_project_phase_categories` | — |
|
|
113
114
|
| Cost Categories | `list_cost_categories` | — |
|
|
114
115
|
|
|
115
116
|
### Write tools
|
|
@@ -152,6 +153,7 @@ Works with **Claude**, **ChatGPT**, **Microsoft Copilot**, and any MCP-compatibl
|
|
|
152
153
|
| Manufacturers | `create_manufacturer` | `update_manufacturer` | `delete_manufacturer` |
|
|
153
154
|
| Building Types | `create_building_type` | `update_building_type` | `delete_building_type` |
|
|
154
155
|
| Location Types | `create_location_type` | `update_location_type` | `delete_location_type` |
|
|
156
|
+
| Project Phase Categories | `create_project_phase_category` | `update_project_phase_category` | `delete_project_phase_category` |
|
|
155
157
|
| Cost Categories | `create_cost_category` | `update_cost_category` | `delete_cost_category` |
|
|
156
158
|
|
|
157
159
|
## Scopes
|
package/dist/tools-write.js
CHANGED
|
@@ -565,6 +565,8 @@ export function registerWriteTools(server, client) {
|
|
|
565
565
|
project_manager: z.string().max(200).optional().describe('Project manager name'),
|
|
566
566
|
progress_percentage: z.number().min(0).max(100).optional().describe('Progress percentage (0-100)'),
|
|
567
567
|
health_status: z.enum(['on_track', 'at_risk', 'delayed', 'critical']).optional().describe('Health status'),
|
|
568
|
+
budget_status: z.enum(['off_track', 'on_track', 'not_set', 'monitor']).optional().describe('Budget status'),
|
|
569
|
+
progress_status: z.enum(['off_track', 'on_track', 'monitor']).optional().describe('Progress status'),
|
|
568
570
|
image_url: z.string().max(2000).optional().describe('Image URL'),
|
|
569
571
|
}, async (params) => {
|
|
570
572
|
try {
|
|
@@ -589,6 +591,8 @@ export function registerWriteTools(server, client) {
|
|
|
589
591
|
project_manager: z.string().max(200).optional().describe('Project manager name'),
|
|
590
592
|
progress_percentage: z.number().min(0).max(100).optional().describe('Progress percentage (0-100)'),
|
|
591
593
|
health_status: z.enum(['on_track', 'at_risk', 'delayed', 'critical']).optional().describe('Health status'),
|
|
594
|
+
budget_status: z.enum(['off_track', 'on_track', 'not_set', 'monitor']).optional().describe('Budget status'),
|
|
595
|
+
progress_status: z.enum(['off_track', 'on_track', 'monitor']).optional().describe('Progress status'),
|
|
592
596
|
image_url: z.string().max(2000).optional().describe('Image URL'),
|
|
593
597
|
}, async ({ id, ...rest }) => {
|
|
594
598
|
try {
|
|
@@ -1559,6 +1563,45 @@ export function registerWriteTools(server, client) {
|
|
|
1559
1563
|
}
|
|
1560
1564
|
});
|
|
1561
1565
|
// ============================================================
|
|
1566
|
+
// Project Phase Categories (scope: project_phase_categories)
|
|
1567
|
+
// ============================================================
|
|
1568
|
+
server.tool('create_project_phase_category', 'Create a new project phase category. Requires project_phase_categories:write scope.', {
|
|
1569
|
+
name: z.string().min(1).max(500).describe('Phase name (required), e.g. "Planning", "Design"'),
|
|
1570
|
+
description: z.string().max(2000).optional().describe('Description of the phase'),
|
|
1571
|
+
sort_order: z.number().int().min(0).max(10000).optional().describe('Display order (lower = first)'),
|
|
1572
|
+
}, async (params) => {
|
|
1573
|
+
try {
|
|
1574
|
+
const result = await client.create('project-phase-categories', buildBody(params));
|
|
1575
|
+
return formatResult(result);
|
|
1576
|
+
}
|
|
1577
|
+
catch (err) {
|
|
1578
|
+
return formatError(err);
|
|
1579
|
+
}
|
|
1580
|
+
});
|
|
1581
|
+
server.tool('update_project_phase_category', 'Update an existing project phase category by ID. Requires project_phase_categories:write scope.', {
|
|
1582
|
+
id: z.string().uuid().describe('Project phase category ID'),
|
|
1583
|
+
name: z.string().min(1).max(500).optional().describe('Phase name'),
|
|
1584
|
+
description: z.string().max(2000).optional().describe('Description'),
|
|
1585
|
+
sort_order: z.number().int().min(0).max(10000).optional().describe('Display order (lower = first)'),
|
|
1586
|
+
}, async ({ id, ...rest }) => {
|
|
1587
|
+
try {
|
|
1588
|
+
const result = await client.update('project-phase-categories', id, buildBody(rest));
|
|
1589
|
+
return formatResult(result);
|
|
1590
|
+
}
|
|
1591
|
+
catch (err) {
|
|
1592
|
+
return formatError(err);
|
|
1593
|
+
}
|
|
1594
|
+
});
|
|
1595
|
+
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 }) => {
|
|
1596
|
+
try {
|
|
1597
|
+
const result = await client.remove('project-phase-categories', id);
|
|
1598
|
+
return formatResult(result);
|
|
1599
|
+
}
|
|
1600
|
+
catch (err) {
|
|
1601
|
+
return formatError(err);
|
|
1602
|
+
}
|
|
1603
|
+
});
|
|
1604
|
+
// ============================================================
|
|
1562
1605
|
// 30. Cost Categories (scope: cost_categories)
|
|
1563
1606
|
// ============================================================
|
|
1564
1607
|
server.tool('create_cost_category', 'Create a new cost category. Requires cost_categories:write scope.', {
|
|
@@ -2327,6 +2370,150 @@ export function registerWriteTools(server, client) {
|
|
|
2327
2370
|
}
|
|
2328
2371
|
});
|
|
2329
2372
|
// ============================================================
|
|
2373
|
+
// Project Sites
|
|
2374
|
+
// ============================================================
|
|
2375
|
+
server.tool('create_project_site', 'Link a site to a project. Requires project_sites:write scope.', {
|
|
2376
|
+
project_id: z.string().uuid().describe('Project ID (required)'),
|
|
2377
|
+
site_id: z.string().uuid().describe('Site ID (required)'),
|
|
2378
|
+
}, async (params) => {
|
|
2379
|
+
try {
|
|
2380
|
+
const result = await client.create('project-sites', buildBody(params));
|
|
2381
|
+
return formatResult(result);
|
|
2382
|
+
}
|
|
2383
|
+
catch (err) {
|
|
2384
|
+
return formatError(err);
|
|
2385
|
+
}
|
|
2386
|
+
});
|
|
2387
|
+
server.tool('delete_project_site', 'Remove a site from a project by ID. Requires project_sites:write scope.', { id: z.string().uuid().describe('Project site ID') }, async ({ id }) => {
|
|
2388
|
+
try {
|
|
2389
|
+
const result = await client.remove('project-sites', id);
|
|
2390
|
+
return formatResult(result);
|
|
2391
|
+
}
|
|
2392
|
+
catch (err) {
|
|
2393
|
+
return formatError(err);
|
|
2394
|
+
}
|
|
2395
|
+
});
|
|
2396
|
+
// ============================================================
|
|
2397
|
+
// Project Buildings
|
|
2398
|
+
// ============================================================
|
|
2399
|
+
server.tool('create_project_building', 'Link a building to a project. Requires project_buildings:write scope.', {
|
|
2400
|
+
project_id: z.string().uuid().describe('Project ID (required)'),
|
|
2401
|
+
building_id: z.string().uuid().describe('Building ID (required)'),
|
|
2402
|
+
}, async (params) => {
|
|
2403
|
+
try {
|
|
2404
|
+
const result = await client.create('project-buildings', buildBody(params));
|
|
2405
|
+
return formatResult(result);
|
|
2406
|
+
}
|
|
2407
|
+
catch (err) {
|
|
2408
|
+
return formatError(err);
|
|
2409
|
+
}
|
|
2410
|
+
});
|
|
2411
|
+
server.tool('delete_project_building', 'Remove a building from a project by ID. Requires project_buildings:write scope.', { id: z.string().uuid().describe('Project building ID') }, async ({ id }) => {
|
|
2412
|
+
try {
|
|
2413
|
+
const result = await client.remove('project-buildings', id);
|
|
2414
|
+
return formatResult(result);
|
|
2415
|
+
}
|
|
2416
|
+
catch (err) {
|
|
2417
|
+
return formatError(err);
|
|
2418
|
+
}
|
|
2419
|
+
});
|
|
2420
|
+
// ============================================================
|
|
2421
|
+
// Project Systems
|
|
2422
|
+
// ============================================================
|
|
2423
|
+
server.tool('create_project_system', 'Link a system to a project. Requires project_systems:write scope.', {
|
|
2424
|
+
project_id: z.string().uuid().describe('Project ID (required)'),
|
|
2425
|
+
system_id: z.string().uuid().describe('System ID (required)'),
|
|
2426
|
+
}, async (params) => {
|
|
2427
|
+
try {
|
|
2428
|
+
const result = await client.create('project-systems', buildBody(params));
|
|
2429
|
+
return formatResult(result);
|
|
2430
|
+
}
|
|
2431
|
+
catch (err) {
|
|
2432
|
+
return formatError(err);
|
|
2433
|
+
}
|
|
2434
|
+
});
|
|
2435
|
+
server.tool('delete_project_system', 'Remove a system from a project by ID. Requires project_systems:write scope.', { id: z.string().uuid().describe('Project system ID') }, async ({ id }) => {
|
|
2436
|
+
try {
|
|
2437
|
+
const result = await client.remove('project-systems', id);
|
|
2438
|
+
return formatResult(result);
|
|
2439
|
+
}
|
|
2440
|
+
catch (err) {
|
|
2441
|
+
return formatError(err);
|
|
2442
|
+
}
|
|
2443
|
+
});
|
|
2444
|
+
// ============================================================
|
|
2445
|
+
// Project System Classes
|
|
2446
|
+
// ============================================================
|
|
2447
|
+
server.tool('create_project_system_class', 'Link a system class to a project. Requires project_system_classes:write scope.', {
|
|
2448
|
+
project_id: z.string().uuid().describe('Project ID (required)'),
|
|
2449
|
+
system_class_id: z.string().uuid().describe('System class ID (required)'),
|
|
2450
|
+
}, async (params) => {
|
|
2451
|
+
try {
|
|
2452
|
+
const result = await client.create('project-system-classes', buildBody(params));
|
|
2453
|
+
return formatResult(result);
|
|
2454
|
+
}
|
|
2455
|
+
catch (err) {
|
|
2456
|
+
return formatError(err);
|
|
2457
|
+
}
|
|
2458
|
+
});
|
|
2459
|
+
server.tool('delete_project_system_class', 'Remove a system class from a project by ID. Requires project_system_classes:write scope.', { id: z.string().uuid().describe('Project system class ID') }, async ({ id }) => {
|
|
2460
|
+
try {
|
|
2461
|
+
const result = await client.remove('project-system-classes', id);
|
|
2462
|
+
return formatResult(result);
|
|
2463
|
+
}
|
|
2464
|
+
catch (err) {
|
|
2465
|
+
return formatError(err);
|
|
2466
|
+
}
|
|
2467
|
+
});
|
|
2468
|
+
// ============================================================
|
|
2469
|
+
// Project System Groups
|
|
2470
|
+
// ============================================================
|
|
2471
|
+
server.tool('create_project_system_group', 'Link a system group to a project. Requires project_system_groups:write scope.', {
|
|
2472
|
+
project_id: z.string().uuid().describe('Project ID (required)'),
|
|
2473
|
+
system_group_id: z.string().uuid().describe('System group ID (required)'),
|
|
2474
|
+
}, async (params) => {
|
|
2475
|
+
try {
|
|
2476
|
+
const result = await client.create('project-system-groups', buildBody(params));
|
|
2477
|
+
return formatResult(result);
|
|
2478
|
+
}
|
|
2479
|
+
catch (err) {
|
|
2480
|
+
return formatError(err);
|
|
2481
|
+
}
|
|
2482
|
+
});
|
|
2483
|
+
server.tool('delete_project_system_group', 'Remove a system group from a project by ID. Requires project_system_groups:write scope.', { id: z.string().uuid().describe('Project system group ID') }, async ({ id }) => {
|
|
2484
|
+
try {
|
|
2485
|
+
const result = await client.remove('project-system-groups', id);
|
|
2486
|
+
return formatResult(result);
|
|
2487
|
+
}
|
|
2488
|
+
catch (err) {
|
|
2489
|
+
return formatError(err);
|
|
2490
|
+
}
|
|
2491
|
+
});
|
|
2492
|
+
// ============================================================
|
|
2493
|
+
// Project Assets
|
|
2494
|
+
// ============================================================
|
|
2495
|
+
server.tool('create_project_asset', 'Link an asset to a project. Requires project_assets:write scope.', {
|
|
2496
|
+
project_id: z.string().uuid().describe('Project ID (required)'),
|
|
2497
|
+
asset_id: z.string().uuid().describe('Asset ID (required)'),
|
|
2498
|
+
}, async (params) => {
|
|
2499
|
+
try {
|
|
2500
|
+
const result = await client.create('project-assets', buildBody(params));
|
|
2501
|
+
return formatResult(result);
|
|
2502
|
+
}
|
|
2503
|
+
catch (err) {
|
|
2504
|
+
return formatError(err);
|
|
2505
|
+
}
|
|
2506
|
+
});
|
|
2507
|
+
server.tool('delete_project_asset', 'Remove an asset from a project by ID. Requires project_assets:write scope.', { id: z.string().uuid().describe('Project asset ID') }, async ({ id }) => {
|
|
2508
|
+
try {
|
|
2509
|
+
const result = await client.remove('project-assets', id);
|
|
2510
|
+
return formatResult(result);
|
|
2511
|
+
}
|
|
2512
|
+
catch (err) {
|
|
2513
|
+
return formatError(err);
|
|
2514
|
+
}
|
|
2515
|
+
});
|
|
2516
|
+
// ============================================================
|
|
2330
2517
|
// Bulk operations
|
|
2331
2518
|
// ============================================================
|
|
2332
2519
|
const BULK_RESOURCES = [
|
|
@@ -2342,6 +2529,8 @@ export function registerWriteTools(server, client) {
|
|
|
2342
2529
|
'project-phases', 'project-budget-items', 'project-time-entries',
|
|
2343
2530
|
'project-comments', 'project-team-members', 'project-task-dependencies',
|
|
2344
2531
|
'project-updates', 'project-cost-snapshots', 'project-locations',
|
|
2532
|
+
'project-sites', 'project-buildings', 'project-systems',
|
|
2533
|
+
'project-system-classes', 'project-system-groups', 'project-assets',
|
|
2345
2534
|
'parts', 'part-categories',
|
|
2346
2535
|
'custom-field-definitions', 'custom-field-values',
|
|
2347
2536
|
'vendor-site-assignments', 'contract-sites',
|