@assetlab/mcp-server 1.9.0 → 1.10.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/dist/tools-write.js +150 -0
- package/dist/tools-write.js.map +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +169 -1
- package/dist/tools.js.map +1 -1
- package/package.json +1 -1
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 {
|
|
@@ -2327,6 +2331,150 @@ export function registerWriteTools(server, client) {
|
|
|
2327
2331
|
}
|
|
2328
2332
|
});
|
|
2329
2333
|
// ============================================================
|
|
2334
|
+
// Project Sites
|
|
2335
|
+
// ============================================================
|
|
2336
|
+
server.tool('create_project_site', 'Link a site to a project. Requires project_sites:write scope.', {
|
|
2337
|
+
project_id: z.string().uuid().describe('Project ID (required)'),
|
|
2338
|
+
site_id: z.string().uuid().describe('Site ID (required)'),
|
|
2339
|
+
}, async (params) => {
|
|
2340
|
+
try {
|
|
2341
|
+
const result = await client.create('project-sites', buildBody(params));
|
|
2342
|
+
return formatResult(result);
|
|
2343
|
+
}
|
|
2344
|
+
catch (err) {
|
|
2345
|
+
return formatError(err);
|
|
2346
|
+
}
|
|
2347
|
+
});
|
|
2348
|
+
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 }) => {
|
|
2349
|
+
try {
|
|
2350
|
+
const result = await client.remove('project-sites', id);
|
|
2351
|
+
return formatResult(result);
|
|
2352
|
+
}
|
|
2353
|
+
catch (err) {
|
|
2354
|
+
return formatError(err);
|
|
2355
|
+
}
|
|
2356
|
+
});
|
|
2357
|
+
// ============================================================
|
|
2358
|
+
// Project Buildings
|
|
2359
|
+
// ============================================================
|
|
2360
|
+
server.tool('create_project_building', 'Link a building to a project. Requires project_buildings:write scope.', {
|
|
2361
|
+
project_id: z.string().uuid().describe('Project ID (required)'),
|
|
2362
|
+
building_id: z.string().uuid().describe('Building ID (required)'),
|
|
2363
|
+
}, async (params) => {
|
|
2364
|
+
try {
|
|
2365
|
+
const result = await client.create('project-buildings', buildBody(params));
|
|
2366
|
+
return formatResult(result);
|
|
2367
|
+
}
|
|
2368
|
+
catch (err) {
|
|
2369
|
+
return formatError(err);
|
|
2370
|
+
}
|
|
2371
|
+
});
|
|
2372
|
+
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 }) => {
|
|
2373
|
+
try {
|
|
2374
|
+
const result = await client.remove('project-buildings', id);
|
|
2375
|
+
return formatResult(result);
|
|
2376
|
+
}
|
|
2377
|
+
catch (err) {
|
|
2378
|
+
return formatError(err);
|
|
2379
|
+
}
|
|
2380
|
+
});
|
|
2381
|
+
// ============================================================
|
|
2382
|
+
// Project Systems
|
|
2383
|
+
// ============================================================
|
|
2384
|
+
server.tool('create_project_system', 'Link a system to a project. Requires project_systems:write scope.', {
|
|
2385
|
+
project_id: z.string().uuid().describe('Project ID (required)'),
|
|
2386
|
+
system_id: z.string().uuid().describe('System ID (required)'),
|
|
2387
|
+
}, async (params) => {
|
|
2388
|
+
try {
|
|
2389
|
+
const result = await client.create('project-systems', buildBody(params));
|
|
2390
|
+
return formatResult(result);
|
|
2391
|
+
}
|
|
2392
|
+
catch (err) {
|
|
2393
|
+
return formatError(err);
|
|
2394
|
+
}
|
|
2395
|
+
});
|
|
2396
|
+
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 }) => {
|
|
2397
|
+
try {
|
|
2398
|
+
const result = await client.remove('project-systems', id);
|
|
2399
|
+
return formatResult(result);
|
|
2400
|
+
}
|
|
2401
|
+
catch (err) {
|
|
2402
|
+
return formatError(err);
|
|
2403
|
+
}
|
|
2404
|
+
});
|
|
2405
|
+
// ============================================================
|
|
2406
|
+
// Project System Classes
|
|
2407
|
+
// ============================================================
|
|
2408
|
+
server.tool('create_project_system_class', 'Link a system class to a project. Requires project_system_classes:write scope.', {
|
|
2409
|
+
project_id: z.string().uuid().describe('Project ID (required)'),
|
|
2410
|
+
system_class_id: z.string().uuid().describe('System class ID (required)'),
|
|
2411
|
+
}, async (params) => {
|
|
2412
|
+
try {
|
|
2413
|
+
const result = await client.create('project-system-classes', buildBody(params));
|
|
2414
|
+
return formatResult(result);
|
|
2415
|
+
}
|
|
2416
|
+
catch (err) {
|
|
2417
|
+
return formatError(err);
|
|
2418
|
+
}
|
|
2419
|
+
});
|
|
2420
|
+
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 }) => {
|
|
2421
|
+
try {
|
|
2422
|
+
const result = await client.remove('project-system-classes', id);
|
|
2423
|
+
return formatResult(result);
|
|
2424
|
+
}
|
|
2425
|
+
catch (err) {
|
|
2426
|
+
return formatError(err);
|
|
2427
|
+
}
|
|
2428
|
+
});
|
|
2429
|
+
// ============================================================
|
|
2430
|
+
// Project System Groups
|
|
2431
|
+
// ============================================================
|
|
2432
|
+
server.tool('create_project_system_group', 'Link a system group to a project. Requires project_system_groups:write scope.', {
|
|
2433
|
+
project_id: z.string().uuid().describe('Project ID (required)'),
|
|
2434
|
+
system_group_id: z.string().uuid().describe('System group ID (required)'),
|
|
2435
|
+
}, async (params) => {
|
|
2436
|
+
try {
|
|
2437
|
+
const result = await client.create('project-system-groups', buildBody(params));
|
|
2438
|
+
return formatResult(result);
|
|
2439
|
+
}
|
|
2440
|
+
catch (err) {
|
|
2441
|
+
return formatError(err);
|
|
2442
|
+
}
|
|
2443
|
+
});
|
|
2444
|
+
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 }) => {
|
|
2445
|
+
try {
|
|
2446
|
+
const result = await client.remove('project-system-groups', id);
|
|
2447
|
+
return formatResult(result);
|
|
2448
|
+
}
|
|
2449
|
+
catch (err) {
|
|
2450
|
+
return formatError(err);
|
|
2451
|
+
}
|
|
2452
|
+
});
|
|
2453
|
+
// ============================================================
|
|
2454
|
+
// Project Assets
|
|
2455
|
+
// ============================================================
|
|
2456
|
+
server.tool('create_project_asset', 'Link an asset to a project. Requires project_assets:write scope.', {
|
|
2457
|
+
project_id: z.string().uuid().describe('Project ID (required)'),
|
|
2458
|
+
asset_id: z.string().uuid().describe('Asset ID (required)'),
|
|
2459
|
+
}, async (params) => {
|
|
2460
|
+
try {
|
|
2461
|
+
const result = await client.create('project-assets', buildBody(params));
|
|
2462
|
+
return formatResult(result);
|
|
2463
|
+
}
|
|
2464
|
+
catch (err) {
|
|
2465
|
+
return formatError(err);
|
|
2466
|
+
}
|
|
2467
|
+
});
|
|
2468
|
+
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 }) => {
|
|
2469
|
+
try {
|
|
2470
|
+
const result = await client.remove('project-assets', id);
|
|
2471
|
+
return formatResult(result);
|
|
2472
|
+
}
|
|
2473
|
+
catch (err) {
|
|
2474
|
+
return formatError(err);
|
|
2475
|
+
}
|
|
2476
|
+
});
|
|
2477
|
+
// ============================================================
|
|
2330
2478
|
// Bulk operations
|
|
2331
2479
|
// ============================================================
|
|
2332
2480
|
const BULK_RESOURCES = [
|
|
@@ -2342,6 +2490,8 @@ export function registerWriteTools(server, client) {
|
|
|
2342
2490
|
'project-phases', 'project-budget-items', 'project-time-entries',
|
|
2343
2491
|
'project-comments', 'project-team-members', 'project-task-dependencies',
|
|
2344
2492
|
'project-updates', 'project-cost-snapshots', 'project-locations',
|
|
2493
|
+
'project-sites', 'project-buildings', 'project-systems',
|
|
2494
|
+
'project-system-classes', 'project-system-groups', 'project-assets',
|
|
2345
2495
|
'parts', 'part-categories',
|
|
2346
2496
|
'custom-field-definitions', 'custom-field-values',
|
|
2347
2497
|
'vendor-site-assignments', 'contract-sites',
|