mcp-perforce-server 3.1.0 → 3.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 +202 -217
- package/dist/p4/parse.js +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +588 -8
- package/dist/server.js.map +1 -1
- package/dist/tools/advanced.d.ts +28 -0
- package/dist/tools/advanced.d.ts.map +1 -1
- package/dist/tools/advanced.js +223 -6
- package/dist/tools/advanced.js.map +1 -1
- package/dist/tools/arg-utils.d.ts +13 -0
- package/dist/tools/arg-utils.d.ts.map +1 -0
- package/dist/tools/arg-utils.js +57 -0
- package/dist/tools/arg-utils.js.map +1 -0
- package/dist/tools/basic.d.ts +58 -7
- package/dist/tools/basic.d.ts.map +1 -1
- package/dist/tools/basic.js +460 -70
- package/dist/tools/basic.js.map +1 -1
- package/dist/tools/changelist.d.ts.map +1 -1
- package/dist/tools/changelist.js +141 -54
- package/dist/tools/changelist.js.map +1 -1
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +6 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/utils.d.ts +2 -1
- package/dist/tools/utils.d.ts.map +1 -1
- package/dist/tools/utils.js +19 -3
- package/dist/tools/utils.js.map +1 -1
- package/dist/tools/workflows.d.ts +58 -0
- package/dist/tools/workflows.d.ts.map +1 -1
- package/dist/tools/workflows.js +547 -0
- package/dist/tools/workflows.js.map +1 -1
- package/package.json +2 -2
package/dist/server.js
CHANGED
|
@@ -84,6 +84,10 @@ const TOOL_HANDLERS = {
|
|
|
84
84
|
'p4.review.bundle': tools.p4ReviewBundle,
|
|
85
85
|
'p4.change.inspect': tools.p4ChangeInspect,
|
|
86
86
|
'p4.path.synccheck': tools.p4PathSyncCheck,
|
|
87
|
+
'p4.file.inspect': tools.p4FileInspect,
|
|
88
|
+
'p4.workspace.snapshot': tools.p4WorkspaceSnapshot,
|
|
89
|
+
'p4.search.inspect': tools.p4SearchInspect,
|
|
90
|
+
'p4.review.prepare': tools.p4ReviewPrepare,
|
|
87
91
|
'p4.blame': tools.p4Blame,
|
|
88
92
|
'p4.annotate': tools.p4Annotate,
|
|
89
93
|
'p4.copy': tools.p4Copy,
|
|
@@ -111,6 +115,7 @@ const TOOL_HANDLERS = {
|
|
|
111
115
|
'p4.audit': tools.p4Audit,
|
|
112
116
|
'p4.compliance': tools.p4Compliance,
|
|
113
117
|
};
|
|
118
|
+
const toClientToolName = (toolName) => toolName.replace(/\./g, '_');
|
|
114
119
|
const WRITE_TOOLS = new Set([
|
|
115
120
|
'p4.add',
|
|
116
121
|
'p4.edit',
|
|
@@ -141,6 +146,10 @@ const LOW_LATENCY_CACHE_TTL_TOOLS = new Set([
|
|
|
141
146
|
'p4.review.bundle',
|
|
142
147
|
'p4.change.inspect',
|
|
143
148
|
'p4.path.synccheck',
|
|
149
|
+
'p4.file.inspect',
|
|
150
|
+
'p4.workspace.snapshot',
|
|
151
|
+
'p4.search.inspect',
|
|
152
|
+
'p4.review.prepare',
|
|
144
153
|
]);
|
|
145
154
|
const STABLE_CACHE_TTL_TOOLS = new Set([
|
|
146
155
|
'p4.info',
|
|
@@ -656,6 +665,11 @@ class MCPPerforceServer {
|
|
|
656
665
|
type: 'string',
|
|
657
666
|
description: 'Filespec to sync (optional, defaults to current directory)',
|
|
658
667
|
},
|
|
668
|
+
filespecs: {
|
|
669
|
+
type: 'array',
|
|
670
|
+
items: { type: 'string' },
|
|
671
|
+
description: 'Filespecs to sync in one command (optional)',
|
|
672
|
+
},
|
|
659
673
|
force: {
|
|
660
674
|
type: 'boolean',
|
|
661
675
|
description: 'Force sync (optional, defaults to false)',
|
|
@@ -664,6 +678,42 @@ class MCPPerforceServer {
|
|
|
664
678
|
type: 'boolean',
|
|
665
679
|
description: 'Preview sync without executing (optional, defaults to false)',
|
|
666
680
|
},
|
|
681
|
+
summaryPreview: {
|
|
682
|
+
type: 'boolean',
|
|
683
|
+
description: 'Preview only the sync summary using p4 sync -N (optional)',
|
|
684
|
+
},
|
|
685
|
+
quiet: {
|
|
686
|
+
type: 'boolean',
|
|
687
|
+
description: 'Suppress normal sync messages using -q (optional)',
|
|
688
|
+
},
|
|
689
|
+
metadataOnly: {
|
|
690
|
+
type: 'boolean',
|
|
691
|
+
description: 'Update have-list metadata only using -k (optional)',
|
|
692
|
+
},
|
|
693
|
+
safeSync: {
|
|
694
|
+
type: 'boolean',
|
|
695
|
+
description: 'Enable digest safety checks using -s (optional)',
|
|
696
|
+
},
|
|
697
|
+
populateOnly: {
|
|
698
|
+
type: 'boolean',
|
|
699
|
+
description: 'Populate without updating server state using -p (optional)',
|
|
700
|
+
},
|
|
701
|
+
reopenMoved: {
|
|
702
|
+
type: 'boolean',
|
|
703
|
+
description: 'Reopen moved files in new depot locations using -r (optional)',
|
|
704
|
+
},
|
|
705
|
+
useListOptimization: {
|
|
706
|
+
type: 'boolean',
|
|
707
|
+
description: 'Use the -L file list optimization for exact depot revisions (optional)',
|
|
708
|
+
},
|
|
709
|
+
max: {
|
|
710
|
+
type: 'number',
|
|
711
|
+
description: 'Limit sync to the first max files (optional)',
|
|
712
|
+
},
|
|
713
|
+
parallel: {
|
|
714
|
+
type: 'string',
|
|
715
|
+
description: 'Parallel sync specification, for example threads=4,batch=8 (optional)',
|
|
716
|
+
},
|
|
667
717
|
workspacePath: {
|
|
668
718
|
type: 'string',
|
|
669
719
|
description: 'Path to workspace directory (optional, defaults to current directory)',
|
|
@@ -682,6 +732,11 @@ class MCPPerforceServer {
|
|
|
682
732
|
type: 'string',
|
|
683
733
|
description: 'Changelist number (optional, shows all opened files if not specified)',
|
|
684
734
|
},
|
|
735
|
+
files: {
|
|
736
|
+
type: 'array',
|
|
737
|
+
items: { type: 'string' },
|
|
738
|
+
description: 'Optional files/filespecs to check for opened state',
|
|
739
|
+
},
|
|
685
740
|
workspacePath: {
|
|
686
741
|
type: 'string',
|
|
687
742
|
description: 'Path to workspace directory (optional, defaults to current directory)',
|
|
@@ -876,6 +931,11 @@ class MCPPerforceServer {
|
|
|
876
931
|
type: 'string',
|
|
877
932
|
description: 'Filespec to show history for (required)',
|
|
878
933
|
},
|
|
934
|
+
filespecs: {
|
|
935
|
+
type: 'array',
|
|
936
|
+
items: { type: 'string' },
|
|
937
|
+
description: 'Filespecs to show history for in one command (required if filespec is omitted)',
|
|
938
|
+
},
|
|
879
939
|
maxRevisions: {
|
|
880
940
|
type: 'number',
|
|
881
941
|
description: 'Maximum number of revisions to show (optional)',
|
|
@@ -885,7 +945,10 @@ class MCPPerforceServer {
|
|
|
885
945
|
description: 'Path to workspace directory (optional, defaults to current directory)',
|
|
886
946
|
},
|
|
887
947
|
},
|
|
888
|
-
|
|
948
|
+
anyOf: [
|
|
949
|
+
{ required: ['filespec'] },
|
|
950
|
+
{ required: ['filespecs'] },
|
|
951
|
+
],
|
|
889
952
|
additionalProperties: false,
|
|
890
953
|
},
|
|
891
954
|
},
|
|
@@ -899,6 +962,30 @@ class MCPPerforceServer {
|
|
|
899
962
|
type: 'string',
|
|
900
963
|
description: 'Filter by user (optional)',
|
|
901
964
|
},
|
|
965
|
+
stream: {
|
|
966
|
+
type: 'string',
|
|
967
|
+
description: 'Limit workspaces to a dedicated stream using -S (optional)',
|
|
968
|
+
},
|
|
969
|
+
nameFilter: {
|
|
970
|
+
type: 'string',
|
|
971
|
+
description: 'Workspace name filter using -e (optional)',
|
|
972
|
+
},
|
|
973
|
+
caseInsensitiveNameFilter: {
|
|
974
|
+
type: 'string',
|
|
975
|
+
description: 'Case-insensitive workspace name filter using -E (optional)',
|
|
976
|
+
},
|
|
977
|
+
unloaded: {
|
|
978
|
+
type: 'boolean',
|
|
979
|
+
description: 'List unloaded clients using -U (optional)',
|
|
980
|
+
},
|
|
981
|
+
allServers: {
|
|
982
|
+
type: 'boolean',
|
|
983
|
+
description: 'List clients across all servers using -a (optional)',
|
|
984
|
+
},
|
|
985
|
+
serverId: {
|
|
986
|
+
type: 'string',
|
|
987
|
+
description: 'Limit clients to a specific server using -s (optional)',
|
|
988
|
+
},
|
|
902
989
|
max: {
|
|
903
990
|
type: 'number',
|
|
904
991
|
description: 'Maximum number of results (optional)',
|
|
@@ -1037,6 +1124,11 @@ class MCPPerforceServer {
|
|
|
1037
1124
|
type: 'string',
|
|
1038
1125
|
description: 'Filter by filespec (optional)',
|
|
1039
1126
|
},
|
|
1127
|
+
filespecs: {
|
|
1128
|
+
type: 'array',
|
|
1129
|
+
items: { type: 'string' },
|
|
1130
|
+
description: 'Filter by multiple filespecs (optional)',
|
|
1131
|
+
},
|
|
1040
1132
|
workspacePath: {
|
|
1041
1133
|
type: 'string',
|
|
1042
1134
|
description: 'Path to workspace directory (optional, defaults to current directory)',
|
|
@@ -1104,6 +1196,27 @@ class MCPPerforceServer {
|
|
|
1104
1196
|
type: 'string',
|
|
1105
1197
|
description: 'Target depot filespec/path (required)',
|
|
1106
1198
|
},
|
|
1199
|
+
targetPaths: {
|
|
1200
|
+
type: 'array',
|
|
1201
|
+
items: { type: 'string' },
|
|
1202
|
+
description: 'Additional target depot filespecs for branch or path modes (optional)',
|
|
1203
|
+
},
|
|
1204
|
+
branch: {
|
|
1205
|
+
type: 'string',
|
|
1206
|
+
description: 'Branch spec name for p4 interchanges -b mode (optional)',
|
|
1207
|
+
},
|
|
1208
|
+
stream: {
|
|
1209
|
+
type: 'string',
|
|
1210
|
+
description: 'Stream path for p4 interchanges -S mode (optional)',
|
|
1211
|
+
},
|
|
1212
|
+
parentStream: {
|
|
1213
|
+
type: 'string',
|
|
1214
|
+
description: 'Parent stream override for stream mode using -P (optional)',
|
|
1215
|
+
},
|
|
1216
|
+
useBranchSource: {
|
|
1217
|
+
type: 'boolean',
|
|
1218
|
+
description: 'Use branch -s mode where sourcePath becomes fromFile (optional)',
|
|
1219
|
+
},
|
|
1107
1220
|
max: {
|
|
1108
1221
|
type: 'number',
|
|
1109
1222
|
description: 'Maximum number of changelists to return (optional)',
|
|
@@ -1112,12 +1225,33 @@ class MCPPerforceServer {
|
|
|
1112
1225
|
type: 'boolean',
|
|
1113
1226
|
description: 'Include long descriptions (optional, equivalent to -l)',
|
|
1114
1227
|
},
|
|
1228
|
+
reverse: {
|
|
1229
|
+
type: 'boolean',
|
|
1230
|
+
description: 'Reverse branch or stream mapping direction using -r (optional)',
|
|
1231
|
+
},
|
|
1232
|
+
time: {
|
|
1233
|
+
type: 'boolean',
|
|
1234
|
+
description: 'Display the time as well as the date using -t (optional)',
|
|
1235
|
+
},
|
|
1236
|
+
user: {
|
|
1237
|
+
type: 'string',
|
|
1238
|
+
description: 'Limit results to changes submitted by a specific user (optional)',
|
|
1239
|
+
},
|
|
1240
|
+
forceStreamFlow: {
|
|
1241
|
+
type: 'boolean',
|
|
1242
|
+
description: 'Force stream-mode interchanges to ignore expected flow using -F (optional)',
|
|
1243
|
+
},
|
|
1115
1244
|
workspacePath: {
|
|
1116
1245
|
type: 'string',
|
|
1117
1246
|
description: 'Path to workspace directory (optional, defaults to current directory)',
|
|
1118
1247
|
},
|
|
1119
1248
|
},
|
|
1120
|
-
|
|
1249
|
+
anyOf: [
|
|
1250
|
+
{ required: ['sourcePath', 'targetPath'] },
|
|
1251
|
+
{ required: ['sourcePath', 'targetPaths'] },
|
|
1252
|
+
{ required: ['branch'] },
|
|
1253
|
+
{ required: ['stream'] },
|
|
1254
|
+
],
|
|
1121
1255
|
additionalProperties: false,
|
|
1122
1256
|
},
|
|
1123
1257
|
},
|
|
@@ -1135,12 +1269,20 @@ class MCPPerforceServer {
|
|
|
1135
1269
|
type: 'string',
|
|
1136
1270
|
description: 'Optional target depot filespec/path',
|
|
1137
1271
|
},
|
|
1272
|
+
files: {
|
|
1273
|
+
type: 'array',
|
|
1274
|
+
items: { type: 'string' },
|
|
1275
|
+
description: 'Optional file/filespec list for native p4 integrated filtering',
|
|
1276
|
+
},
|
|
1138
1277
|
workspacePath: {
|
|
1139
1278
|
type: 'string',
|
|
1140
1279
|
description: 'Path to workspace directory (optional, defaults to current directory)',
|
|
1141
1280
|
},
|
|
1142
1281
|
},
|
|
1143
|
-
|
|
1282
|
+
anyOf: [
|
|
1283
|
+
{ required: ['sourcePath'] },
|
|
1284
|
+
{ required: ['files'] },
|
|
1285
|
+
],
|
|
1144
1286
|
additionalProperties: false,
|
|
1145
1287
|
},
|
|
1146
1288
|
},
|
|
@@ -1253,6 +1395,209 @@ class MCPPerforceServer {
|
|
|
1253
1395
|
additionalProperties: false,
|
|
1254
1396
|
},
|
|
1255
1397
|
},
|
|
1398
|
+
{
|
|
1399
|
+
name: 'p4.file.inspect',
|
|
1400
|
+
description: 'Composite file inspection: fstat + filelog + optional print/blame in one call',
|
|
1401
|
+
inputSchema: {
|
|
1402
|
+
type: 'object',
|
|
1403
|
+
properties: {
|
|
1404
|
+
filespec: {
|
|
1405
|
+
type: 'string',
|
|
1406
|
+
description: 'Single filespec to inspect',
|
|
1407
|
+
},
|
|
1408
|
+
filespecs: {
|
|
1409
|
+
type: 'array',
|
|
1410
|
+
items: { type: 'string' },
|
|
1411
|
+
description: 'Multiple filespecs to inspect in one call',
|
|
1412
|
+
},
|
|
1413
|
+
includeFstat: {
|
|
1414
|
+
type: 'boolean',
|
|
1415
|
+
description: 'Include p4 fstat metadata (optional, default true)',
|
|
1416
|
+
},
|
|
1417
|
+
includeHistory: {
|
|
1418
|
+
type: 'boolean',
|
|
1419
|
+
description: 'Include p4 filelog history (optional, default true)',
|
|
1420
|
+
},
|
|
1421
|
+
includeContent: {
|
|
1422
|
+
type: 'boolean',
|
|
1423
|
+
description: 'Include p4 print content (optional, default false)',
|
|
1424
|
+
},
|
|
1425
|
+
includeBlame: {
|
|
1426
|
+
type: 'boolean',
|
|
1427
|
+
description: 'Include p4 annotate/blame output (optional, default false)',
|
|
1428
|
+
},
|
|
1429
|
+
maxFiles: {
|
|
1430
|
+
type: 'number',
|
|
1431
|
+
description: 'Maximum files to inspect in one call (optional, default requested count capped at 25)',
|
|
1432
|
+
},
|
|
1433
|
+
maxRevisions: {
|
|
1434
|
+
type: 'number',
|
|
1435
|
+
description: 'Maximum revisions per filelog call (optional, default 5)',
|
|
1436
|
+
},
|
|
1437
|
+
workspacePath: {
|
|
1438
|
+
type: 'string',
|
|
1439
|
+
description: 'Path to workspace directory (optional, defaults to current directory)',
|
|
1440
|
+
},
|
|
1441
|
+
},
|
|
1442
|
+
anyOf: [
|
|
1443
|
+
{ required: ['filespec'] },
|
|
1444
|
+
{ required: ['filespecs'] },
|
|
1445
|
+
],
|
|
1446
|
+
additionalProperties: false,
|
|
1447
|
+
},
|
|
1448
|
+
},
|
|
1449
|
+
{
|
|
1450
|
+
name: 'p4.workspace.snapshot',
|
|
1451
|
+
description: 'Composite workspace snapshot: info + status + optional config/opened/recent changes',
|
|
1452
|
+
inputSchema: {
|
|
1453
|
+
type: 'object',
|
|
1454
|
+
properties: {
|
|
1455
|
+
includeConfig: {
|
|
1456
|
+
type: 'boolean',
|
|
1457
|
+
description: 'Include p4.config.detect output (optional, default true)',
|
|
1458
|
+
},
|
|
1459
|
+
includeOpened: {
|
|
1460
|
+
type: 'boolean',
|
|
1461
|
+
description: 'Include full p4.opened output (optional, default false)',
|
|
1462
|
+
},
|
|
1463
|
+
includeRecentChanges: {
|
|
1464
|
+
type: 'boolean',
|
|
1465
|
+
description: 'Include recent changelists via p4.changes (optional, default false)',
|
|
1466
|
+
},
|
|
1467
|
+
recentChangesMax: {
|
|
1468
|
+
type: 'number',
|
|
1469
|
+
description: 'Maximum recent changelists to include (optional, default 10)',
|
|
1470
|
+
},
|
|
1471
|
+
workspacePath: {
|
|
1472
|
+
type: 'string',
|
|
1473
|
+
description: 'Path to workspace directory (optional, defaults to current directory)',
|
|
1474
|
+
},
|
|
1475
|
+
},
|
|
1476
|
+
additionalProperties: false,
|
|
1477
|
+
},
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
name: 'p4.search.inspect',
|
|
1481
|
+
description: 'Composite search helper: grep + optional fstat + optional content previews',
|
|
1482
|
+
inputSchema: {
|
|
1483
|
+
type: 'object',
|
|
1484
|
+
properties: {
|
|
1485
|
+
pattern: {
|
|
1486
|
+
type: 'string',
|
|
1487
|
+
description: 'Search pattern for p4 grep (required)',
|
|
1488
|
+
},
|
|
1489
|
+
filespec: {
|
|
1490
|
+
type: 'string',
|
|
1491
|
+
description: 'Single filespec to search',
|
|
1492
|
+
},
|
|
1493
|
+
filespecs: {
|
|
1494
|
+
type: 'array',
|
|
1495
|
+
items: { type: 'string' },
|
|
1496
|
+
description: 'Multiple filespecs to search in one call',
|
|
1497
|
+
},
|
|
1498
|
+
caseInsensitive: {
|
|
1499
|
+
type: 'boolean',
|
|
1500
|
+
description: 'Case insensitive search (optional, default false)',
|
|
1501
|
+
},
|
|
1502
|
+
maxFiles: {
|
|
1503
|
+
type: 'number',
|
|
1504
|
+
description: 'Maximum matched files to include (optional, default 20)',
|
|
1505
|
+
},
|
|
1506
|
+
maxMatchesPerFile: {
|
|
1507
|
+
type: 'number',
|
|
1508
|
+
description: 'Maximum grep matches to retain per file (optional, default 20)',
|
|
1509
|
+
},
|
|
1510
|
+
includeFstat: {
|
|
1511
|
+
type: 'boolean',
|
|
1512
|
+
description: 'Include p4 fstat metadata for matched files (optional, default true)',
|
|
1513
|
+
},
|
|
1514
|
+
includeContentPreview: {
|
|
1515
|
+
type: 'boolean',
|
|
1516
|
+
description: 'Include p4 print context snippets for matched files (optional, default false)',
|
|
1517
|
+
},
|
|
1518
|
+
previewContextLines: {
|
|
1519
|
+
type: 'number',
|
|
1520
|
+
description: 'Context lines before and after each match when includeContentPreview=true (optional, default 2)',
|
|
1521
|
+
},
|
|
1522
|
+
workspacePath: {
|
|
1523
|
+
type: 'string',
|
|
1524
|
+
description: 'Path to workspace directory (optional, defaults to current directory)',
|
|
1525
|
+
},
|
|
1526
|
+
},
|
|
1527
|
+
required: ['pattern'],
|
|
1528
|
+
additionalProperties: false,
|
|
1529
|
+
},
|
|
1530
|
+
},
|
|
1531
|
+
{
|
|
1532
|
+
name: 'p4.review.prepare',
|
|
1533
|
+
description: 'Composite review preparation: discover or accept changelists, then build review-ready inspection bundles',
|
|
1534
|
+
inputSchema: {
|
|
1535
|
+
type: 'object',
|
|
1536
|
+
properties: {
|
|
1537
|
+
changelist: {
|
|
1538
|
+
type: 'string',
|
|
1539
|
+
description: 'Single changelist to inspect directly',
|
|
1540
|
+
},
|
|
1541
|
+
changelists: {
|
|
1542
|
+
type: 'array',
|
|
1543
|
+
items: { type: 'string' },
|
|
1544
|
+
description: 'Multiple changelists to inspect directly',
|
|
1545
|
+
},
|
|
1546
|
+
status: {
|
|
1547
|
+
type: 'string',
|
|
1548
|
+
enum: ['submitted', 'pending', 'shelved'],
|
|
1549
|
+
description: 'Status filter used when discovering changelists',
|
|
1550
|
+
},
|
|
1551
|
+
user: {
|
|
1552
|
+
type: 'string',
|
|
1553
|
+
description: 'User filter used when discovering changelists',
|
|
1554
|
+
},
|
|
1555
|
+
client: {
|
|
1556
|
+
type: 'string',
|
|
1557
|
+
description: 'Client/workspace filter used when discovering changelists',
|
|
1558
|
+
},
|
|
1559
|
+
filespec: {
|
|
1560
|
+
type: 'string',
|
|
1561
|
+
description: 'Single filespec filter used when discovering changelists',
|
|
1562
|
+
},
|
|
1563
|
+
filespecs: {
|
|
1564
|
+
type: 'array',
|
|
1565
|
+
items: { type: 'string' },
|
|
1566
|
+
description: 'Multiple filespec filters used when discovering changelists',
|
|
1567
|
+
},
|
|
1568
|
+
maxChanges: {
|
|
1569
|
+
type: 'number',
|
|
1570
|
+
description: 'Maximum changelists to inspect (optional, default 10)',
|
|
1571
|
+
},
|
|
1572
|
+
includeDiff: {
|
|
1573
|
+
type: 'boolean',
|
|
1574
|
+
description: 'Include changelist diff content in each inspection bundle (optional, default false)',
|
|
1575
|
+
},
|
|
1576
|
+
diffFormat: {
|
|
1577
|
+
type: 'string',
|
|
1578
|
+
enum: ['u', 'c', 'n', 's'],
|
|
1579
|
+
description: 'Diff format for inspection describe output when includeDiff=true',
|
|
1580
|
+
},
|
|
1581
|
+
includeFileHistory: {
|
|
1582
|
+
type: 'boolean',
|
|
1583
|
+
description: 'Include file history for files touched by each changelist (optional, default false)',
|
|
1584
|
+
},
|
|
1585
|
+
maxFilesWithHistory: {
|
|
1586
|
+
type: 'number',
|
|
1587
|
+
description: 'Maximum files per changelist to include history for (optional, default 5)',
|
|
1588
|
+
},
|
|
1589
|
+
maxRevisions: {
|
|
1590
|
+
type: 'number',
|
|
1591
|
+
description: 'Maximum revisions per file history call (optional, default 5)',
|
|
1592
|
+
},
|
|
1593
|
+
workspacePath: {
|
|
1594
|
+
type: 'string',
|
|
1595
|
+
description: 'Path to workspace directory (optional, defaults to current directory)',
|
|
1596
|
+
},
|
|
1597
|
+
},
|
|
1598
|
+
additionalProperties: false,
|
|
1599
|
+
},
|
|
1600
|
+
},
|
|
1256
1601
|
{
|
|
1257
1602
|
name: 'p4.blame',
|
|
1258
1603
|
description: 'Show file annotations with change history (like git blame)',
|
|
@@ -1263,12 +1608,20 @@ class MCPPerforceServer {
|
|
|
1263
1608
|
type: 'string',
|
|
1264
1609
|
description: 'File to show blame for (required)',
|
|
1265
1610
|
},
|
|
1611
|
+
files: {
|
|
1612
|
+
type: 'array',
|
|
1613
|
+
items: { type: 'string' },
|
|
1614
|
+
description: 'Files to show blame for in one command (required if file is omitted)',
|
|
1615
|
+
},
|
|
1266
1616
|
workspacePath: {
|
|
1267
1617
|
type: 'string',
|
|
1268
1618
|
description: 'Path to workspace directory (optional, defaults to current directory)',
|
|
1269
1619
|
},
|
|
1270
1620
|
},
|
|
1271
|
-
|
|
1621
|
+
anyOf: [
|
|
1622
|
+
{ required: ['file'] },
|
|
1623
|
+
{ required: ['files'] },
|
|
1624
|
+
],
|
|
1272
1625
|
additionalProperties: false,
|
|
1273
1626
|
},
|
|
1274
1627
|
},
|
|
@@ -1282,12 +1635,20 @@ class MCPPerforceServer {
|
|
|
1282
1635
|
type: 'string',
|
|
1283
1636
|
description: 'File to annotate (required)',
|
|
1284
1637
|
},
|
|
1638
|
+
files: {
|
|
1639
|
+
type: 'array',
|
|
1640
|
+
items: { type: 'string' },
|
|
1641
|
+
description: 'Files to annotate in one command (required if file is omitted)',
|
|
1642
|
+
},
|
|
1285
1643
|
workspacePath: {
|
|
1286
1644
|
type: 'string',
|
|
1287
1645
|
description: 'Path to workspace directory (optional, defaults to current directory)',
|
|
1288
1646
|
},
|
|
1289
1647
|
},
|
|
1290
|
-
|
|
1648
|
+
anyOf: [
|
|
1649
|
+
{ required: ['file'] },
|
|
1650
|
+
{ required: ['files'] },
|
|
1651
|
+
],
|
|
1291
1652
|
additionalProperties: false,
|
|
1292
1653
|
},
|
|
1293
1654
|
},
|
|
@@ -1410,6 +1771,11 @@ class MCPPerforceServer {
|
|
|
1410
1771
|
type: 'string',
|
|
1411
1772
|
description: 'Depot filespec to print (required)',
|
|
1412
1773
|
},
|
|
1774
|
+
filespecs: {
|
|
1775
|
+
type: 'array',
|
|
1776
|
+
items: { type: 'string' },
|
|
1777
|
+
description: 'Depot filespecs to print in one command (required if filespec is omitted)',
|
|
1778
|
+
},
|
|
1413
1779
|
quiet: {
|
|
1414
1780
|
type: 'boolean',
|
|
1415
1781
|
description: 'Suppress file headers (optional, defaults to true)',
|
|
@@ -1419,7 +1785,10 @@ class MCPPerforceServer {
|
|
|
1419
1785
|
description: 'Path to workspace directory (optional, defaults to current directory)',
|
|
1420
1786
|
},
|
|
1421
1787
|
},
|
|
1422
|
-
|
|
1788
|
+
anyOf: [
|
|
1789
|
+
{ required: ['filespec'] },
|
|
1790
|
+
{ required: ['filespecs'] },
|
|
1791
|
+
],
|
|
1423
1792
|
additionalProperties: false,
|
|
1424
1793
|
},
|
|
1425
1794
|
},
|
|
@@ -1433,16 +1802,64 @@ class MCPPerforceServer {
|
|
|
1433
1802
|
type: 'string',
|
|
1434
1803
|
description: 'Filespec to inspect (required)',
|
|
1435
1804
|
},
|
|
1805
|
+
filespecs: {
|
|
1806
|
+
type: 'array',
|
|
1807
|
+
items: { type: 'string' },
|
|
1808
|
+
description: 'Filespecs to inspect in one command (required if filespec is omitted)',
|
|
1809
|
+
},
|
|
1436
1810
|
max: {
|
|
1437
1811
|
type: 'number',
|
|
1438
1812
|
description: 'Maximum number of results (optional)',
|
|
1439
1813
|
},
|
|
1814
|
+
filter: {
|
|
1815
|
+
type: 'string',
|
|
1816
|
+
description: 'fstat filter expression for -F (optional)',
|
|
1817
|
+
},
|
|
1818
|
+
fields: {
|
|
1819
|
+
type: 'array',
|
|
1820
|
+
items: { type: 'string' },
|
|
1821
|
+
description: 'Specific tagged fields to return using -T (optional)',
|
|
1822
|
+
},
|
|
1823
|
+
reverseOrder: {
|
|
1824
|
+
type: 'boolean',
|
|
1825
|
+
description: 'Reverse the output sort order using -r (optional)',
|
|
1826
|
+
},
|
|
1827
|
+
attributePattern: {
|
|
1828
|
+
type: 'string',
|
|
1829
|
+
description: 'Restrict attributes using -A pattern (optional)',
|
|
1830
|
+
},
|
|
1831
|
+
changeAfter: {
|
|
1832
|
+
type: 'string',
|
|
1833
|
+
description: 'Show files modified by or after a submitted changelist using -c (optional)',
|
|
1834
|
+
},
|
|
1835
|
+
changelist: {
|
|
1836
|
+
type: 'string',
|
|
1837
|
+
description: 'Show files modified by a specific changelist using -e (optional)',
|
|
1838
|
+
},
|
|
1839
|
+
outputOptions: {
|
|
1840
|
+
type: 'array',
|
|
1841
|
+
items: { type: 'string' },
|
|
1842
|
+
description: 'Raw -O option suffixes such as l, p, r, s (optional)',
|
|
1843
|
+
},
|
|
1844
|
+
limitOptions: {
|
|
1845
|
+
type: 'array',
|
|
1846
|
+
items: { type: 'string' },
|
|
1847
|
+
description: 'Raw -R option suffixes such as c, h, o, u (optional)',
|
|
1848
|
+
},
|
|
1849
|
+
sortOptions: {
|
|
1850
|
+
type: 'array',
|
|
1851
|
+
items: { type: 'string' },
|
|
1852
|
+
description: 'Raw -S option suffixes such as d, h, r, s, t (optional)',
|
|
1853
|
+
},
|
|
1440
1854
|
workspacePath: {
|
|
1441
1855
|
type: 'string',
|
|
1442
1856
|
description: 'Path to workspace directory (optional, defaults to current directory)',
|
|
1443
1857
|
},
|
|
1444
1858
|
},
|
|
1445
|
-
|
|
1859
|
+
anyOf: [
|
|
1860
|
+
{ required: ['filespec'] },
|
|
1861
|
+
{ required: ['filespecs'] },
|
|
1862
|
+
],
|
|
1446
1863
|
additionalProperties: false,
|
|
1447
1864
|
},
|
|
1448
1865
|
},
|
|
@@ -1456,6 +1873,24 @@ class MCPPerforceServer {
|
|
|
1456
1873
|
type: 'string',
|
|
1457
1874
|
description: 'Optional stream path filter',
|
|
1458
1875
|
},
|
|
1876
|
+
streams: {
|
|
1877
|
+
type: 'array',
|
|
1878
|
+
items: { type: 'string' },
|
|
1879
|
+
description: 'Optional stream path filters to query in one command',
|
|
1880
|
+
},
|
|
1881
|
+
unloaded: {
|
|
1882
|
+
type: 'boolean',
|
|
1883
|
+
description: 'Include unloaded task streams using -U (optional)',
|
|
1884
|
+
},
|
|
1885
|
+
filter: {
|
|
1886
|
+
type: 'string',
|
|
1887
|
+
description: 'Stream filter expression for -F (optional)',
|
|
1888
|
+
},
|
|
1889
|
+
viewMatch: {
|
|
1890
|
+
type: 'array',
|
|
1891
|
+
items: { type: 'string' },
|
|
1892
|
+
description: 'One or more depot paths to pass with --viewmatch (optional)',
|
|
1893
|
+
},
|
|
1459
1894
|
max: {
|
|
1460
1895
|
type: 'number',
|
|
1461
1896
|
description: 'Maximum number of results (optional)',
|
|
@@ -1501,6 +1936,11 @@ class MCPPerforceServer {
|
|
|
1501
1936
|
type: 'string',
|
|
1502
1937
|
description: 'Filespec to search in (optional)',
|
|
1503
1938
|
},
|
|
1939
|
+
filespecs: {
|
|
1940
|
+
type: 'array',
|
|
1941
|
+
items: { type: 'string' },
|
|
1942
|
+
description: 'Filespecs to search in (optional)',
|
|
1943
|
+
},
|
|
1504
1944
|
caseInsensitive: {
|
|
1505
1945
|
type: 'boolean',
|
|
1506
1946
|
description: 'Case insensitive search (optional, defaults to false)',
|
|
@@ -1524,10 +1964,31 @@ class MCPPerforceServer {
|
|
|
1524
1964
|
type: 'string',
|
|
1525
1965
|
description: 'Filespec to list (optional, defaults to all files)',
|
|
1526
1966
|
},
|
|
1967
|
+
filespecs: {
|
|
1968
|
+
type: 'array',
|
|
1969
|
+
items: { type: 'string' },
|
|
1970
|
+
description: 'Filespecs to list in one command (optional)',
|
|
1971
|
+
},
|
|
1527
1972
|
max: {
|
|
1528
1973
|
type: 'number',
|
|
1529
1974
|
description: 'Maximum number of results (optional)',
|
|
1530
1975
|
},
|
|
1976
|
+
allRevisions: {
|
|
1977
|
+
type: 'boolean',
|
|
1978
|
+
description: 'Display all revisions in range using -a (optional)',
|
|
1979
|
+
},
|
|
1980
|
+
archiveDepot: {
|
|
1981
|
+
type: 'boolean',
|
|
1982
|
+
description: 'Include files in archive depots using -A (optional)',
|
|
1983
|
+
},
|
|
1984
|
+
existingOnly: {
|
|
1985
|
+
type: 'boolean',
|
|
1986
|
+
description: 'Show only revisions available for sync/integrate using -e (optional)',
|
|
1987
|
+
},
|
|
1988
|
+
ignoreCase: {
|
|
1989
|
+
type: 'boolean',
|
|
1990
|
+
description: 'Ignore case of the file argument using -i (optional)',
|
|
1991
|
+
},
|
|
1531
1992
|
workspacePath: {
|
|
1532
1993
|
type: 'string',
|
|
1533
1994
|
description: 'Path to workspace directory (optional, defaults to current directory)',
|
|
@@ -1546,6 +2007,31 @@ class MCPPerforceServer {
|
|
|
1546
2007
|
type: 'string',
|
|
1547
2008
|
description: 'Filespec to list directories for (optional, defaults to all directories)',
|
|
1548
2009
|
},
|
|
2010
|
+
filespecs: {
|
|
2011
|
+
type: 'array',
|
|
2012
|
+
items: { type: 'string' },
|
|
2013
|
+
description: 'Filespecs to list directories for in one command (optional)',
|
|
2014
|
+
},
|
|
2015
|
+
ignoreCase: {
|
|
2016
|
+
type: 'boolean',
|
|
2017
|
+
description: 'Ignore case using -i (optional; incompatible with onlyClientMapped)',
|
|
2018
|
+
},
|
|
2019
|
+
onlyClientMapped: {
|
|
2020
|
+
type: 'boolean',
|
|
2021
|
+
description: 'List only directories in the current client view using -C (optional)',
|
|
2022
|
+
},
|
|
2023
|
+
includeDeleted: {
|
|
2024
|
+
type: 'boolean',
|
|
2025
|
+
description: 'Include directories containing only deleted files using -D (optional)',
|
|
2026
|
+
},
|
|
2027
|
+
onlyHave: {
|
|
2028
|
+
type: 'boolean',
|
|
2029
|
+
description: 'List directories containing files synced to the current workspace using -H (optional)',
|
|
2030
|
+
},
|
|
2031
|
+
stream: {
|
|
2032
|
+
type: 'string',
|
|
2033
|
+
description: 'Limit to directories mapped in a stream view using -S (optional)',
|
|
2034
|
+
},
|
|
1549
2035
|
workspacePath: {
|
|
1550
2036
|
type: 'string',
|
|
1551
2037
|
description: 'Path to workspace directory (optional, defaults to current directory)',
|
|
@@ -1565,10 +2051,19 @@ class MCPPerforceServer {
|
|
|
1565
2051
|
type: 'string',
|
|
1566
2052
|
description: 'Specific user to show (optional)',
|
|
1567
2053
|
},
|
|
2054
|
+
users: {
|
|
2055
|
+
type: 'array',
|
|
2056
|
+
items: { type: 'string' },
|
|
2057
|
+
description: 'Specific users to show in one command (optional)',
|
|
2058
|
+
},
|
|
1568
2059
|
max: {
|
|
1569
2060
|
type: 'number',
|
|
1570
2061
|
description: 'Maximum number of results (optional)',
|
|
1571
2062
|
},
|
|
2063
|
+
includeServiceUsers: {
|
|
2064
|
+
type: 'boolean',
|
|
2065
|
+
description: 'Include service and operator users using -a (optional)',
|
|
2066
|
+
},
|
|
1572
2067
|
workspacePath: {
|
|
1573
2068
|
type: 'string',
|
|
1574
2069
|
description: 'Path to workspace directory (optional, defaults to current directory)',
|
|
@@ -1623,6 +2118,23 @@ class MCPPerforceServer {
|
|
|
1623
2118
|
type: 'string',
|
|
1624
2119
|
description: 'Specific job to show (optional)',
|
|
1625
2120
|
},
|
|
2121
|
+
files: {
|
|
2122
|
+
type: 'array',
|
|
2123
|
+
items: { type: 'string' },
|
|
2124
|
+
description: 'Optional file/filespec filters for jobs',
|
|
2125
|
+
},
|
|
2126
|
+
jobView: {
|
|
2127
|
+
type: 'string',
|
|
2128
|
+
description: 'Jobview expression for -e (optional)',
|
|
2129
|
+
},
|
|
2130
|
+
includeIntegrated: {
|
|
2131
|
+
type: 'boolean',
|
|
2132
|
+
description: 'Include fixes from integrated changelists using -i (optional)',
|
|
2133
|
+
},
|
|
2134
|
+
reverseOrder: {
|
|
2135
|
+
type: 'boolean',
|
|
2136
|
+
description: 'Reverse job sort order using -r (optional)',
|
|
2137
|
+
},
|
|
1626
2138
|
max: {
|
|
1627
2139
|
type: 'number',
|
|
1628
2140
|
description: 'Maximum number of results (optional)',
|
|
@@ -1668,6 +2180,11 @@ class MCPPerforceServer {
|
|
|
1668
2180
|
type: 'string',
|
|
1669
2181
|
description: 'Filter by changelist (optional)',
|
|
1670
2182
|
},
|
|
2183
|
+
files: {
|
|
2184
|
+
type: 'array',
|
|
2185
|
+
items: { type: 'string' },
|
|
2186
|
+
description: 'Optional file/filespec filters for fixes',
|
|
2187
|
+
},
|
|
1671
2188
|
workspacePath: {
|
|
1672
2189
|
type: 'string',
|
|
1673
2190
|
description: 'Path to workspace directory (optional, defaults to current directory)',
|
|
@@ -1690,6 +2207,39 @@ class MCPPerforceServer {
|
|
|
1690
2207
|
type: 'string',
|
|
1691
2208
|
description: 'Filter by user (optional)',
|
|
1692
2209
|
},
|
|
2210
|
+
filespec: {
|
|
2211
|
+
type: 'string',
|
|
2212
|
+
description: 'Single filespec filter for labels containing matching files (optional)',
|
|
2213
|
+
},
|
|
2214
|
+
filespecs: {
|
|
2215
|
+
type: 'array',
|
|
2216
|
+
items: { type: 'string' },
|
|
2217
|
+
description: 'Multiple filespec filters for labels in one command (optional)',
|
|
2218
|
+
},
|
|
2219
|
+
nameFilter: {
|
|
2220
|
+
type: 'string',
|
|
2221
|
+
description: 'Label name filter using -e (optional)',
|
|
2222
|
+
},
|
|
2223
|
+
caseInsensitiveNameFilter: {
|
|
2224
|
+
type: 'string',
|
|
2225
|
+
description: 'Case-insensitive label name filter using -E (optional)',
|
|
2226
|
+
},
|
|
2227
|
+
unloaded: {
|
|
2228
|
+
type: 'boolean',
|
|
2229
|
+
description: 'List unloaded labels using -U (optional)',
|
|
2230
|
+
},
|
|
2231
|
+
autoreloadOnly: {
|
|
2232
|
+
type: 'boolean',
|
|
2233
|
+
description: 'List only autoreload labels using -R (optional)',
|
|
2234
|
+
},
|
|
2235
|
+
allServers: {
|
|
2236
|
+
type: 'boolean',
|
|
2237
|
+
description: 'List labels across all servers using -a (optional)',
|
|
2238
|
+
},
|
|
2239
|
+
serverId: {
|
|
2240
|
+
type: 'string',
|
|
2241
|
+
description: 'Limit labels to a specific server using -s (optional)',
|
|
2242
|
+
},
|
|
1693
2243
|
max: {
|
|
1694
2244
|
type: 'number',
|
|
1695
2245
|
description: 'Maximum number of results (optional)',
|
|
@@ -1731,6 +2281,31 @@ class MCPPerforceServer {
|
|
|
1731
2281
|
type: 'string',
|
|
1732
2282
|
description: 'Filespec to get sizes for (optional, defaults to current directory)',
|
|
1733
2283
|
},
|
|
2284
|
+
filespecs: {
|
|
2285
|
+
type: 'array',
|
|
2286
|
+
items: { type: 'string' },
|
|
2287
|
+
description: 'Filespecs to get sizes for in one command (optional)',
|
|
2288
|
+
},
|
|
2289
|
+
allRevisions: {
|
|
2290
|
+
type: 'boolean',
|
|
2291
|
+
description: 'List all revisions in the range using -a (optional)',
|
|
2292
|
+
},
|
|
2293
|
+
shelvedOnly: {
|
|
2294
|
+
type: 'boolean',
|
|
2295
|
+
description: 'Display size info for shelved files only using -S (optional)',
|
|
2296
|
+
},
|
|
2297
|
+
omitLazyCopies: {
|
|
2298
|
+
type: 'boolean',
|
|
2299
|
+
description: 'Omit lazy copies from totals using -z (optional)',
|
|
2300
|
+
},
|
|
2301
|
+
max: {
|
|
2302
|
+
type: 'number',
|
|
2303
|
+
description: 'Limit output to the first max files using -m (optional)',
|
|
2304
|
+
},
|
|
2305
|
+
blockSize: {
|
|
2306
|
+
type: 'number',
|
|
2307
|
+
description: 'Round sizes up to a block size in bytes using -b (optional)',
|
|
2308
|
+
},
|
|
1734
2309
|
workspacePath: {
|
|
1735
2310
|
type: 'string',
|
|
1736
2311
|
description: 'Path to workspace directory (optional, defaults to current directory)',
|
|
@@ -1749,6 +2324,11 @@ class MCPPerforceServer {
|
|
|
1749
2324
|
type: 'string',
|
|
1750
2325
|
description: 'Filespec to check (optional)',
|
|
1751
2326
|
},
|
|
2327
|
+
filespecs: {
|
|
2328
|
+
type: 'array',
|
|
2329
|
+
items: { type: 'string' },
|
|
2330
|
+
description: 'Filespecs to check in one command (optional)',
|
|
2331
|
+
},
|
|
1752
2332
|
workspacePath: {
|
|
1753
2333
|
type: 'string',
|
|
1754
2334
|
description: 'Path to workspace directory (optional, defaults to current directory)',
|
|
@@ -1828,7 +2408,7 @@ class MCPPerforceServer {
|
|
|
1828
2408
|
additionalProperties: false,
|
|
1829
2409
|
},
|
|
1830
2410
|
},
|
|
1831
|
-
],
|
|
2411
|
+
].map((tool) => ({ ...tool, name: toClientToolName(tool.name) })),
|
|
1832
2412
|
};
|
|
1833
2413
|
});
|
|
1834
2414
|
this.server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|