vantage-peers-mcp 2.4.8 → 2.4.10

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.
@@ -99,6 +99,11 @@ export declare const fieldsSchema: z.ZodEnum<{
99
99
  full: "full";
100
100
  }>;
101
101
  export declare const updatedSinceSchema: z.ZodNumber;
102
+ /**
103
+ * Derive the current VantagePeers day number from the server clock.
104
+ * Returns 1 on or before 2026-03-06 UTC; increments by 1 per UTC day.
105
+ */
106
+ export declare function deriveSessionDay(nowMs?: number): number;
102
107
  export interface ParsedConvexError {
103
108
  code: string;
104
109
  message: string;
package/dist/src/tools.js CHANGED
@@ -274,6 +274,30 @@ const coreTeamSchema = z
274
274
  })
275
275
  .describe("Core team composition — agents, skills, hooks, plugins");
276
276
  // ─────────────────────────────────────────────────────────────────────────────
277
+ // A.7 — project day number derivation
278
+ //
279
+ // VantagePeers uses a sequential "Day N" numbering convention where Day 1 =
280
+ // 2026-03-06 UTC. This is the confirmed epoch: Day 88 = 2026-06-01 (87 days
281
+ // after Day 1), verified from Pi VP task k178tqgzhbhzg1h4vbgn4kwdm987vntn
282
+ // Day 88 brief (2026-06-01).
283
+ //
284
+ // No Convex-side day-counter table exists. The value is purely clock-based:
285
+ // dayNumber = floor((nowUTC_midnight - epoch_midnight) / MS_PER_DAY) + 1
286
+ //
287
+ // Callers who pass explicit sessionDay always override this derivation.
288
+ // ─────────────────────────────────────────────────────────────────────────────
289
+ /** UTC midnight of Day 1 (2026-03-06). All arithmetic is in whole UTC days. */
290
+ const VP_DAY1_EPOCH_UTC_MS = Date.UTC(2026, 2, 6); // month is 0-indexed: 2 = March
291
+ /**
292
+ * Derive the current VantagePeers day number from the server clock.
293
+ * Returns 1 on or before 2026-03-06 UTC; increments by 1 per UTC day.
294
+ */
295
+ export function deriveSessionDay(nowMs = Date.now()) {
296
+ const MS_PER_DAY = 86_400_000;
297
+ const deltaDays = Math.floor((nowMs - VP_DAY1_EPOCH_UTC_MS) / MS_PER_DAY);
298
+ return Math.max(1, deltaDays + 1);
299
+ }
300
+ // ─────────────────────────────────────────────────────────────────────────────
277
301
  // Helper: normalize string|array inputs to array
278
302
  // ─────────────────────────────────────────────────────────────────────────────
279
303
  function toArray(val) {
@@ -589,16 +613,19 @@ export function registerTools(server, convex, oauthCtx) {
589
613
  .number()
590
614
  .int()
591
615
  .min(1)
592
- .max(50)
616
+ .max(200)
593
617
  .optional()
594
- .default(5)
595
- .describe("Maximum number of results to return (default 5)"),
618
+ .describe("Max items to return. Default 20 (envelope-safe). Cap 200."),
619
+ fields: z
620
+ .enum(["lite", "full"])
621
+ .optional()
622
+ .describe("'lite' returns compact payload (less tokens), 'full' is default. v2.4.9+."),
596
623
  }, {
597
624
  readOnlyHint: true,
598
625
  openWorldHint: false,
599
626
  destructiveHint: false,
600
627
  title: "Recall memories",
601
- }, async ({ query, namespace, type, limit }) => {
628
+ }, async ({ query, namespace, type, limit, fields }) => {
602
629
  try {
603
630
  const nsDenied = guardRead(namespace);
604
631
  if (nsDenied)
@@ -607,7 +634,8 @@ export function registerTools(server, convex, oauthCtx) {
607
634
  query,
608
635
  namespace,
609
636
  type,
610
- limit: limit ?? 5,
637
+ limit: limit ?? 20,
638
+ fields: fields ?? "lite",
611
639
  });
612
640
  return {
613
641
  content: [
@@ -634,16 +662,19 @@ export function registerTools(server, convex, oauthCtx) {
634
662
  .number()
635
663
  .int()
636
664
  .min(1)
637
- .max(50)
665
+ .max(200)
638
666
  .optional()
639
- .default(10)
640
- .describe("Max results"),
667
+ .describe("Max items to return. Default 20 (envelope-safe). Cap 200."),
668
+ fields: z
669
+ .enum(["lite", "full"])
670
+ .optional()
671
+ .describe("'lite' returns compact payload (less tokens), 'full' is default. v2.4.9+."),
641
672
  }, {
642
673
  readOnlyHint: true,
643
674
  openWorldHint: false,
644
675
  destructiveHint: false,
645
676
  title: "Search memories (text)",
646
- }, async ({ query, namespace, type, limit }) => {
677
+ }, async ({ query, namespace, type, limit, fields }) => {
647
678
  try {
648
679
  const nsDenied = guardRead(namespace);
649
680
  if (nsDenied)
@@ -652,7 +683,8 @@ export function registerTools(server, convex, oauthCtx) {
652
683
  query,
653
684
  namespace,
654
685
  type,
655
- limit: limit ?? 10,
686
+ limit: limit ?? 20,
687
+ fields: fields ?? "lite",
656
688
  });
657
689
  return {
658
690
  content: [{ type: "text", text: JSON.stringify(results, null, 2) }],
@@ -671,10 +703,13 @@ export function registerTools(server, convex, oauthCtx) {
671
703
  .number()
672
704
  .int()
673
705
  .min(1)
674
- .max(50)
706
+ .max(200)
675
707
  .optional()
676
- .default(10)
677
- .describe("Max results"),
708
+ .describe("Max items to return. Default 20 (envelope-safe). Cap 200."),
709
+ fields: z
710
+ .enum(["lite", "full"])
711
+ .optional()
712
+ .describe("'lite' returns compact payload (less tokens), 'full' is default. v2.4.9+."),
678
713
  vectorWeight: z
679
714
  .number()
680
715
  .min(0)
@@ -692,7 +727,7 @@ export function registerTools(server, convex, oauthCtx) {
692
727
  openWorldHint: false,
693
728
  destructiveHint: false,
694
729
  title: "Search memories (hybrid)",
695
- }, async ({ query, namespace, type, limit, vectorWeight, textWeight }) => {
730
+ }, async ({ query, namespace, type, limit, fields, vectorWeight, textWeight }) => {
696
731
  try {
697
732
  const nsDenied = guardRead(namespace);
698
733
  if (nsDenied)
@@ -701,7 +736,8 @@ export function registerTools(server, convex, oauthCtx) {
701
736
  query,
702
737
  namespace,
703
738
  type,
704
- limit: limit ?? 10,
739
+ limit: limit ?? 20,
740
+ fields: fields ?? "lite",
705
741
  vectorWeight,
706
742
  textWeight,
707
743
  });
@@ -874,14 +910,17 @@ export function registerTools(server, convex, oauthCtx) {
874
910
  .min(1)
875
911
  .max(200)
876
912
  .optional()
877
- .default(20)
878
- .describe("Maximum number of memories to return (default 20)"),
913
+ .describe("Max items to return. Default 20 (envelope-safe). Cap 200."),
914
+ fields: z
915
+ .enum(["lite", "full"])
916
+ .optional()
917
+ .describe("'lite' returns compact payload (less tokens), 'full' is default. v2.4.9+."),
879
918
  }, {
880
919
  readOnlyHint: true,
881
920
  openWorldHint: false,
882
921
  destructiveHint: false,
883
922
  title: "List memories",
884
- }, async ({ namespace, type, createdBy, limit }) => {
923
+ }, async ({ namespace, type, createdBy, limit, fields }) => {
885
924
  try {
886
925
  const nsDenied = guardRead(namespace);
887
926
  if (nsDenied)
@@ -891,6 +930,7 @@ export function registerTools(server, convex, oauthCtx) {
891
930
  type,
892
931
  createdBy,
893
932
  limit: limit ?? 20,
933
+ fields: fields ?? "lite",
894
934
  });
895
935
  const rawList = Array.isArray(memories)
896
936
  ? memories
@@ -933,7 +973,8 @@ export function registerTools(server, convex, oauthCtx) {
933
973
  .number()
934
974
  .int()
935
975
  .optional()
936
- .describe("Day number (e.g. 19 for Day 19)"),
976
+ .describe("Day number (e.g. 88 for Day 88). If omitted, auto-derived from project epoch " +
977
+ "(Day 1 = 2026-03-06 UTC). Pass explicitly to override."),
937
978
  tenantId: z
938
979
  .string()
939
980
  .optional()
@@ -950,12 +991,18 @@ export function registerTools(server, convex, oauthCtx) {
950
991
  const fromDenied = guardFrom(from);
951
992
  if (fromDenied)
952
993
  return fromDenied;
994
+ // A.7: auto-derive sessionDay from project epoch when caller omits it.
995
+ // Day 1 = 2026-03-06 UTC (Day 88 confirmed as 2026-06-01).
996
+ // Explicit args.sessionDay always wins (backward-compat).
997
+ const derivedSessionDay = sessionDay !== undefined
998
+ ? sessionDay
999
+ : deriveSessionDay();
953
1000
  const messageId = await convex.mutation("messages:sendMessage", {
954
1001
  from,
955
1002
  fromInstanceId,
956
1003
  channel,
957
1004
  content,
958
- sessionDay,
1005
+ sessionDay: derivedSessionDay,
959
1006
  tenantId,
960
1007
  });
961
1008
  return {
@@ -1165,17 +1212,32 @@ export function registerTools(server, convex, oauthCtx) {
1165
1212
  });
1166
1213
  // ── list_peers ──────────────────────────────────────────────────────────────
1167
1214
  server.tool("list_peers", "List all orchestrator profiles with their current status and summary. " +
1168
- "Replaces claude-peers list_peers.", {}, {
1215
+ "Replaces claude-peers list_peers.", {
1216
+ limit: z
1217
+ .number()
1218
+ .int()
1219
+ .min(1)
1220
+ .max(200)
1221
+ .optional()
1222
+ .describe("Max items to return. Default 20 (envelope-safe). Cap 200."),
1223
+ fields: z
1224
+ .enum(["lite", "full"])
1225
+ .optional()
1226
+ .describe("'lite' returns compact payload (less tokens), 'full' is default. v2.4.9+."),
1227
+ }, {
1169
1228
  readOnlyHint: true,
1170
1229
  openWorldHint: false,
1171
1230
  destructiveHint: false,
1172
1231
  title: "List peers",
1173
- }, async () => {
1232
+ }, async ({ limit, fields }) => {
1174
1233
  try {
1175
1234
  const _scopeDenied = guardMasterOnly("list_peers");
1176
1235
  if (_scopeDenied)
1177
1236
  return _scopeDenied;
1178
- const profiles = await convex.query("profiles:listProfiles", {});
1237
+ const profiles = await convex.query("profiles:listProfiles", {
1238
+ limit: limit ?? 20,
1239
+ fields: fields ?? "lite",
1240
+ });
1179
1241
  const peers = profiles.map((p) => ({
1180
1242
  id: p.orchestratorId,
1181
1243
  instanceId: p.instanceId ?? p.orchestratorId,
@@ -1211,16 +1273,19 @@ export function registerTools(server, convex, oauthCtx) {
1211
1273
  .number()
1212
1274
  .int()
1213
1275
  .min(1)
1214
- .max(500)
1276
+ .max(200)
1277
+ .optional()
1278
+ .describe("Max items to return. Default 20 (envelope-safe). Cap 200."),
1279
+ fields: z
1280
+ .enum(["lite", "full"])
1215
1281
  .optional()
1216
- .default(100)
1217
- .describe("Max messages to return (default 100)"),
1282
+ .describe("'lite' returns compact payload (less tokens), 'full' is default. v2.4.9+."),
1218
1283
  }, {
1219
1284
  readOnlyHint: true,
1220
1285
  openWorldHint: false,
1221
1286
  destructiveHint: false,
1222
1287
  title: "List messages",
1223
- }, async ({ sessionDay, from, limit }) => {
1288
+ }, async ({ sessionDay, from, limit, fields }) => {
1224
1289
  try {
1225
1290
  const _scopeDenied = guardMasterOnly("list_messages");
1226
1291
  if (_scopeDenied)
@@ -1228,7 +1293,8 @@ export function registerTools(server, convex, oauthCtx) {
1228
1293
  const messages = await convex.query("messages:listMessages", {
1229
1294
  sessionDay,
1230
1295
  from,
1231
- limit: limit ?? 100,
1296
+ limit: limit ?? 20,
1297
+ fields: fields ?? "lite",
1232
1298
  });
1233
1299
  const baseText = capListResponseBytes(messages, JSON.stringify(messages, null, 2), "list_messages");
1234
1300
  const text = appendMarkerIfEnabled(baseText, () => ({
@@ -1256,18 +1322,31 @@ export function registerTools(server, convex, oauthCtx) {
1256
1322
  messageId: z
1257
1323
  .string()
1258
1324
  .describe("Convex document ID of the broadcast message"),
1325
+ limit: z
1326
+ .number()
1327
+ .int()
1328
+ .min(1)
1329
+ .max(200)
1330
+ .optional()
1331
+ .describe("Max items to return. Default 20 (envelope-safe). Cap 200."),
1332
+ fields: z
1333
+ .enum(["lite", "full"])
1334
+ .optional()
1335
+ .describe("'lite' returns compact payload (less tokens), 'full' is default. v2.4.9+."),
1259
1336
  }, {
1260
1337
  readOnlyHint: true,
1261
1338
  openWorldHint: false,
1262
1339
  destructiveHint: false,
1263
1340
  title: "List broadcast status",
1264
- }, async ({ messageId }) => {
1341
+ }, async ({ messageId, limit, fields }) => {
1265
1342
  try {
1266
1343
  const _scopeDenied = guardMasterOnly("list_broadcast_status");
1267
1344
  if (_scopeDenied)
1268
1345
  return _scopeDenied;
1269
1346
  const status = await convex.query("messages:listBroadcastStatus", {
1270
1347
  messageId,
1348
+ limit: limit ?? 20,
1349
+ fields: fields ?? "lite",
1271
1350
  });
1272
1351
  return {
1273
1352
  content: [
@@ -1375,10 +1454,10 @@ export function registerTools(server, convex, oauthCtx) {
1375
1454
  .min(1)
1376
1455
  .max(200)
1377
1456
  .optional()
1378
- .describe("Maximum number of tasks to return. Default 50 with fields=lite, auto-clamped to 30 when fields=full and no explicit limit (overflow protection)."),
1457
+ .describe("Max items to return. Default 20 (envelope-safe). Cap 200."),
1379
1458
  fields: fieldsSchema
1380
1459
  .optional()
1381
- .describe('Field projection ("lite"|"full")'),
1460
+ .describe('Field projection ("lite"|"full"). Default "lite" (v2.4.9+).'),
1382
1461
  createdBy: assigneeSchema
1383
1462
  .optional()
1384
1463
  .describe("Filter by task creator (e.g. 'pi' to find Pi-dispatched tasks)"),
@@ -1405,8 +1484,8 @@ export function registerTools(server, convex, oauthCtx) {
1405
1484
  assignedToInstance,
1406
1485
  status,
1407
1486
  project,
1408
- limit,
1409
- fields,
1487
+ limit: limit ?? 20,
1488
+ fields: fields ?? "lite",
1410
1489
  createdBy,
1411
1490
  updatedSince,
1412
1491
  });
@@ -1768,7 +1847,7 @@ export function registerTools(server, convex, oauthCtx) {
1768
1847
  .min(1)
1769
1848
  .max(200)
1770
1849
  .optional()
1771
- .describe("Maximum number of tasks to return. Default 50 with fields=lite, auto-clamped to 30 when fields=full and no explicit limit."),
1850
+ .describe("Max items to return. Default 20 (envelope-safe). Cap 200."),
1772
1851
  fields: fieldsSchema
1773
1852
  .optional()
1774
1853
  .describe('Field projection ("lite"|"full")'),
@@ -1787,8 +1866,8 @@ export function registerTools(server, convex, oauthCtx) {
1787
1866
  const tasks = await convex.query("tasks:listByMission", {
1788
1867
  missionId: missionId,
1789
1868
  status,
1790
- limit,
1791
- fields,
1869
+ limit: limit ?? 20,
1870
+ fields: fields ?? "lite",
1792
1871
  createdBy,
1793
1872
  updatedSince,
1794
1873
  });
@@ -1879,10 +1958,10 @@ export function registerTools(server, convex, oauthCtx) {
1879
1958
  .min(1)
1880
1959
  .max(200)
1881
1960
  .optional()
1882
- .describe("Maximum number of missions to return. Default 50 with fields=lite, auto-clamped to 30 when fields=full and no explicit limit."),
1961
+ .describe("Max items to return. Default 20 (envelope-safe). Cap 200."),
1883
1962
  fields: fieldsSchema
1884
1963
  .optional()
1885
- .describe('Field projection ("lite"|"full")'),
1964
+ .describe('Field projection ("lite"|"full"). Default "lite" (v2.4.9+).'),
1886
1965
  updatedSince: updatedSinceSchema.optional(),
1887
1966
  }, {
1888
1967
  readOnlyHint: true,
@@ -1902,8 +1981,8 @@ export function registerTools(server, convex, oauthCtx) {
1902
1981
  project,
1903
1982
  pilot,
1904
1983
  status,
1905
- limit,
1906
- fields,
1984
+ limit: limit ?? 20,
1985
+ fields: fields ?? "lite",
1907
1986
  updatedSince,
1908
1987
  });
1909
1988
  const baseText = capListResponseBytes(missions, JSON.stringify(missions, null, 2), "list_missions");
@@ -2151,16 +2230,19 @@ export function registerTools(server, convex, oauthCtx) {
2151
2230
  .number()
2152
2231
  .int()
2153
2232
  .min(1)
2154
- .max(100)
2233
+ .max(200)
2234
+ .optional()
2235
+ .describe("Max items to return. Default 20 (envelope-safe). Cap 200."),
2236
+ fields: z
2237
+ .enum(["lite", "full"])
2155
2238
  .optional()
2156
- .default(20)
2157
- .describe("Maximum entries to return (default 20)"),
2239
+ .describe("'lite' returns compact payload (less tokens), 'full' is default. v2.4.9+."),
2158
2240
  }, {
2159
2241
  readOnlyHint: true,
2160
2242
  openWorldHint: false,
2161
2243
  destructiveHint: false,
2162
2244
  title: "List diary entries",
2163
- }, async ({ orchestrator, createdBy, limit }) => {
2245
+ }, async ({ orchestrator, createdBy, limit, fields }) => {
2164
2246
  try {
2165
2247
  // v2.4.8: orchestrator (writer-intent) and createdBy (auth-derived
2166
2248
  // author) are separate filters — NOT aliases. Forward both independently.
@@ -2179,6 +2261,7 @@ export function registerTools(server, convex, oauthCtx) {
2179
2261
  orchestrator,
2180
2262
  createdBy,
2181
2263
  limit: limit ?? 20,
2264
+ fields: fields ?? "lite",
2182
2265
  });
2183
2266
  return {
2184
2267
  content: [
@@ -2315,12 +2398,12 @@ export function registerTools(server, convex, oauthCtx) {
2315
2398
  .number()
2316
2399
  .int()
2317
2400
  .min(1)
2318
- .max(100)
2401
+ .max(200)
2319
2402
  .optional()
2320
- .describe("Maximum notes to return. Default 20 with fields=lite, auto-clamped to 15 when fields=full and no explicit limit."),
2403
+ .describe("Max items to return. Default 20 (envelope-safe). Cap 200."),
2321
2404
  fields: fieldsSchema
2322
2405
  .optional()
2323
- .describe('Field projection ("lite"|"full")'),
2406
+ .describe('Field projection ("lite"|"full"). Default "lite" (v2.4.9+).'),
2324
2407
  updatedSince: updatedSinceSchema.optional(),
2325
2408
  }, {
2326
2409
  readOnlyHint: true,
@@ -2334,8 +2417,8 @@ export function registerTools(server, convex, oauthCtx) {
2334
2417
  return _scopeDenied;
2335
2418
  const notes = await convex.query("briefingNotes:list", {
2336
2419
  topic,
2337
- limit,
2338
- fields,
2420
+ limit: limit ?? 20,
2421
+ fields: fields ?? "lite",
2339
2422
  updatedSince,
2340
2423
  });
2341
2424
  const baseText = capListResponseBytes(notes, JSON.stringify(notes, null, 2), "list_briefing_notes");
@@ -2434,16 +2517,19 @@ export function registerTools(server, convex, oauthCtx) {
2434
2517
  .number()
2435
2518
  .int()
2436
2519
  .min(1)
2437
- .max(500)
2520
+ .max(200)
2438
2521
  .optional()
2439
- .default(100)
2440
- .describe("Maximum components to return (default 100)"),
2522
+ .describe("Max items to return. Default 20 (envelope-safe). Cap 200."),
2523
+ fields: z
2524
+ .enum(["lite", "full"])
2525
+ .optional()
2526
+ .describe("'lite' returns compact payload (less tokens), 'full' is default. v2.4.9+."),
2441
2527
  }, {
2442
2528
  readOnlyHint: true,
2443
2529
  openWorldHint: false,
2444
2530
  destructiveHint: false,
2445
2531
  title: "List components",
2446
- }, async ({ type, team, limit }) => {
2532
+ }, async ({ type, team, limit, fields }) => {
2447
2533
  try {
2448
2534
  const _scopeDenied = guardMasterOnly("list_components");
2449
2535
  if (_scopeDenied)
@@ -2451,7 +2537,8 @@ export function registerTools(server, convex, oauthCtx) {
2451
2537
  const components = await convex.query("components:list", {
2452
2538
  type,
2453
2539
  team,
2454
- limit: limit ?? 100,
2540
+ limit: limit ?? 20,
2541
+ fields: fields ?? "lite",
2455
2542
  });
2456
2543
  return {
2457
2544
  content: [
@@ -2569,13 +2656,23 @@ export function registerTools(server, convex, oauthCtx) {
2569
2656
  .string()
2570
2657
  .describe("Search term to match against component name or team"),
2571
2658
  type: componentTypeSchema.optional().describe("Filter by component type"),
2572
- limit: z.number().int().optional().describe("Max results (default 50)"),
2659
+ limit: z
2660
+ .number()
2661
+ .int()
2662
+ .min(1)
2663
+ .max(200)
2664
+ .optional()
2665
+ .describe("Max items to return. Default 20 (envelope-safe). Cap 200."),
2666
+ fields: z
2667
+ .enum(["lite", "full"])
2668
+ .optional()
2669
+ .describe("'lite' returns compact payload (less tokens), 'full' is default. v2.4.9+."),
2573
2670
  }, {
2574
2671
  readOnlyHint: true,
2575
2672
  openWorldHint: false,
2576
2673
  destructiveHint: false,
2577
2674
  title: "Search components",
2578
- }, async ({ query, type, limit }) => {
2675
+ }, async ({ query, type, limit, fields }) => {
2579
2676
  try {
2580
2677
  const _scopeDenied = guardMasterOnly("search_components");
2581
2678
  if (_scopeDenied)
@@ -2583,7 +2680,8 @@ export function registerTools(server, convex, oauthCtx) {
2583
2680
  const results = await convex.query("components:search", {
2584
2681
  query,
2585
2682
  type,
2586
- limit,
2683
+ limit: limit ?? 20,
2684
+ fields: fields ?? "lite",
2587
2685
  });
2588
2686
  return {
2589
2687
  content: [{ type: "text", text: JSON.stringify(results, null, 2) }],
@@ -2661,14 +2759,17 @@ export function registerTools(server, convex, oauthCtx) {
2661
2759
  .min(1)
2662
2760
  .max(200)
2663
2761
  .optional()
2664
- .default(50)
2665
- .describe("Max results"),
2762
+ .describe("Max items to return. Default 20 (envelope-safe). Cap 200."),
2763
+ fields: z
2764
+ .enum(["lite", "full"])
2765
+ .optional()
2766
+ .describe("'lite' returns compact payload (less tokens), 'full' is default. v2.4.9+."),
2666
2767
  }, {
2667
2768
  readOnlyHint: true,
2668
2769
  openWorldHint: false,
2669
2770
  destructiveHint: false,
2670
2771
  title: "List recurring tasks",
2671
- }, async ({ assignedTo, active, limit }) => {
2772
+ }, async ({ assignedTo, active, limit, fields }) => {
2672
2773
  try {
2673
2774
  const _scopeDenied = guardMasterOnly("list_recurring_tasks");
2674
2775
  if (_scopeDenied)
@@ -2676,7 +2777,8 @@ export function registerTools(server, convex, oauthCtx) {
2676
2777
  const tasks = await convex.query("recurringTasks:list", {
2677
2778
  assignedTo,
2678
2779
  active,
2679
- limit: limit ?? 50,
2780
+ limit: limit ?? 20,
2781
+ fields: fields ?? "lite",
2680
2782
  });
2681
2783
  return {
2682
2784
  content: [{ type: "text", text: capListResponseBytes(tasks, JSON.stringify(tasks, null, 2), "list_recurring_tasks") }],
@@ -3007,14 +3109,17 @@ export function registerTools(server, convex, oauthCtx) {
3007
3109
  .min(1)
3008
3110
  .max(200)
3009
3111
  .optional()
3010
- .default(50)
3011
- .describe("Maximum mandates to return (default 50)"),
3112
+ .describe("Max items to return. Default 20 (envelope-safe). Cap 200."),
3113
+ fields: z
3114
+ .enum(["lite", "full"])
3115
+ .optional()
3116
+ .describe("'lite' returns compact payload (less tokens), 'full' is default. v2.4.9+."),
3012
3117
  }, {
3013
3118
  readOnlyHint: true,
3014
3119
  openWorldHint: false,
3015
3120
  destructiveHint: false,
3016
3121
  title: "List mandates",
3017
- }, async ({ requestedBy, fulfilledBy, status, limit }) => {
3122
+ }, async ({ requestedBy, fulfilledBy, status, limit, fields }) => {
3018
3123
  try {
3019
3124
  const _scopeDenied = guardMasterOnly("list_mandates");
3020
3125
  if (_scopeDenied)
@@ -3023,7 +3128,8 @@ export function registerTools(server, convex, oauthCtx) {
3023
3128
  requestedBy,
3024
3129
  fulfilledBy,
3025
3130
  status,
3026
- limit: limit ?? 50,
3131
+ limit: limit ?? 20,
3132
+ fields: fields ?? "lite",
3027
3133
  });
3028
3134
  return {
3029
3135
  content: [
@@ -3218,14 +3324,17 @@ export function registerTools(server, convex, oauthCtx) {
3218
3324
  .min(1)
3219
3325
  .max(200)
3220
3326
  .optional()
3221
- .default(50)
3222
- .describe("Maximum BUs to return (default 50)"),
3327
+ .describe("Max items to return. Default 20 (envelope-safe). Cap 200."),
3328
+ fields: z
3329
+ .enum(["lite", "full"])
3330
+ .optional()
3331
+ .describe("'lite' returns compact payload (less tokens), 'full' is default. v2.4.9+."),
3223
3332
  }, {
3224
3333
  readOnlyHint: true,
3225
3334
  openWorldHint: false,
3226
3335
  destructiveHint: false,
3227
3336
  title: "List BUs",
3228
- }, async ({ orchestratorId, status, limit }) => {
3337
+ }, async ({ orchestratorId, status, limit, fields }) => {
3229
3338
  try {
3230
3339
  const _scopeDenied = guardMasterOnly("list_bus");
3231
3340
  if (_scopeDenied)
@@ -3233,7 +3342,8 @@ export function registerTools(server, convex, oauthCtx) {
3233
3342
  const bus = await convex.query("businessUnits:list", {
3234
3343
  orchestratorId,
3235
3344
  status,
3236
- limit: limit ?? 50,
3345
+ limit: limit ?? 20,
3346
+ fields: fields ?? "lite",
3237
3347
  });
3238
3348
  return {
3239
3349
  content: [
@@ -3319,17 +3429,32 @@ export function registerTools(server, convex, oauthCtx) {
3319
3429
  }
3320
3430
  });
3321
3431
  // ── list_repo_mappings ──────────────────────────────────────────────────────
3322
- server.tool("list_repo_mappings", "List all GitHub repo → orchestrator mappings. Shows which repos are monitored and which orchestrator handles each.", {}, {
3432
+ server.tool("list_repo_mappings", "List all GitHub repo → orchestrator mappings. Shows which repos are monitored and which orchestrator handles each.", {
3433
+ limit: z
3434
+ .number()
3435
+ .int()
3436
+ .min(1)
3437
+ .max(200)
3438
+ .optional()
3439
+ .describe("Max items to return. Default 20 (envelope-safe). Cap 200."),
3440
+ fields: z
3441
+ .enum(["lite", "full"])
3442
+ .optional()
3443
+ .describe("'lite' returns compact payload (less tokens), 'full' is default. v2.4.9+."),
3444
+ }, {
3323
3445
  readOnlyHint: true,
3324
3446
  openWorldHint: false,
3325
3447
  destructiveHint: false,
3326
3448
  title: "List repo mappings",
3327
- }, async () => {
3449
+ }, async ({ limit, fields }) => {
3328
3450
  try {
3329
3451
  const _scopeDenied = guardMasterOnly("list_repo_mappings");
3330
3452
  if (_scopeDenied)
3331
3453
  return _scopeDenied;
3332
- const mappings = await convex.query("githubRepoMapping:list", {});
3454
+ const mappings = await convex.query("githubRepoMapping:list", {
3455
+ limit: limit ?? 20,
3456
+ fields: fields ?? "lite",
3457
+ });
3333
3458
  return {
3334
3459
  content: [
3335
3460
  {
@@ -3391,14 +3516,17 @@ export function registerTools(server, convex, oauthCtx) {
3391
3516
  .min(1)
3392
3517
  .max(200)
3393
3518
  .optional()
3394
- .default(50)
3395
- .describe("Maximum number of issues to return (default 50)"),
3519
+ .describe("Max items to return. Default 20 (envelope-safe). Cap 200."),
3520
+ fields: z
3521
+ .enum(["lite", "full"])
3522
+ .optional()
3523
+ .describe("'lite' returns compact payload (less tokens), 'full' is default. v2.4.9+."),
3396
3524
  }, {
3397
3525
  readOnlyHint: true,
3398
3526
  openWorldHint: false,
3399
3527
  destructiveHint: false,
3400
3528
  title: "List issues",
3401
- }, async ({ project, status, assignedTo, limit }) => {
3529
+ }, async ({ project, status, assignedTo, limit, fields }) => {
3402
3530
  try {
3403
3531
  const _scopeDenied = guardMasterOnly("list_issues");
3404
3532
  if (_scopeDenied)
@@ -3408,26 +3536,30 @@ export function registerTools(server, convex, oauthCtx) {
3408
3536
  results = await convex.query("issues:listByOrchestrator", {
3409
3537
  assignedOrchestrator: assignedTo,
3410
3538
  status: status,
3411
- limit: limit ?? 50,
3539
+ limit: limit ?? 20,
3540
+ fields: fields ?? "lite",
3412
3541
  });
3413
3542
  }
3414
3543
  else if (project) {
3415
3544
  results = await convex.query("issues:listByProject", {
3416
3545
  project,
3417
3546
  status: status,
3418
- limit: limit ?? 50,
3547
+ limit: limit ?? 20,
3548
+ fields: fields ?? "lite",
3419
3549
  });
3420
3550
  }
3421
3551
  else if (status) {
3422
3552
  results = await convex.query("issues:listByStatus", {
3423
3553
  status: status,
3424
- limit: limit ?? 50,
3554
+ limit: limit ?? 20,
3555
+ fields: fields ?? "lite",
3425
3556
  });
3426
3557
  }
3427
3558
  else {
3428
3559
  results = await convex.query("issues:listByProject", {
3429
3560
  project: "",
3430
- limit: limit ?? 50,
3561
+ limit: limit ?? 20,
3562
+ fields: fields ?? "lite",
3431
3563
  });
3432
3564
  }
3433
3565
  return {
@@ -3743,21 +3875,28 @@ export function registerTools(server, convex, oauthCtx) {
3743
3875
  limit: z
3744
3876
  .number()
3745
3877
  .int()
3878
+ .min(1)
3879
+ .max(200)
3880
+ .optional()
3881
+ .describe("Max items to return. Default 20 (envelope-safe). Cap 200."),
3882
+ fields: z
3883
+ .enum(["lite", "full"])
3746
3884
  .optional()
3747
- .describe("Max results to return (default 10)"),
3885
+ .describe("'lite' returns compact payload (less tokens), 'full' is default. v2.4.9+."),
3748
3886
  }, {
3749
3887
  readOnlyHint: true,
3750
3888
  openWorldHint: false,
3751
3889
  destructiveHint: false,
3752
3890
  title: "Search fix patterns",
3753
- }, async ({ query, limit }) => {
3891
+ }, async ({ query, limit, fields }) => {
3754
3892
  try {
3755
3893
  const _scopeDenied = guardMasterOnly("search_fix_patterns");
3756
3894
  if (_scopeDenied)
3757
3895
  return _scopeDenied;
3758
3896
  const results = await convex.action("search:searchFixPatterns", {
3759
3897
  query,
3760
- limit,
3898
+ limit: limit ?? 20,
3899
+ fields: fields ?? "lite",
3761
3900
  });
3762
3901
  return {
3763
3902
  content: [
@@ -3778,13 +3917,23 @@ export function registerTools(server, convex, oauthCtx) {
3778
3917
  .string()
3779
3918
  .optional()
3780
3919
  .describe("Filter by source project — omit for all"),
3781
- limit: z.number().int().optional().describe("Max results (default 50)"),
3920
+ limit: z
3921
+ .number()
3922
+ .int()
3923
+ .min(1)
3924
+ .max(200)
3925
+ .optional()
3926
+ .describe("Max items to return. Default 20 (envelope-safe). Cap 200."),
3927
+ fields: z
3928
+ .enum(["lite", "full"])
3929
+ .optional()
3930
+ .describe("'lite' returns compact payload (less tokens), 'full' is default. v2.4.9+."),
3782
3931
  }, {
3783
3932
  readOnlyHint: true,
3784
3933
  openWorldHint: false,
3785
3934
  destructiveHint: false,
3786
3935
  title: "List fix patterns",
3787
- }, async ({ project, limit }) => {
3936
+ }, async ({ project, limit, fields }) => {
3788
3937
  try {
3789
3938
  const _scopeDenied = guardMasterOnly("list_fix_patterns");
3790
3939
  if (_scopeDenied)
@@ -3792,14 +3941,16 @@ export function registerTools(server, convex, oauthCtx) {
3792
3941
  if (project) {
3793
3942
  const results = await convex.query("fixPatterns:listByProject", {
3794
3943
  sourceProject: project,
3795
- limit,
3944
+ limit: limit ?? 20,
3945
+ fields: fields ?? "lite",
3796
3946
  });
3797
3947
  return {
3798
3948
  content: [{ type: "text", text: capListResponseBytes(results, JSON.stringify(results, null, 2), "list_fix_patterns") }],
3799
3949
  };
3800
3950
  }
3801
3951
  const allResults = await convex.query("fixPatterns:listAll", {
3802
- limit,
3952
+ limit: limit ?? 20,
3953
+ fields: fields ?? "lite",
3803
3954
  });
3804
3955
  return {
3805
3956
  content: [
@@ -4070,21 +4221,25 @@ export function registerTools(server, convex, oauthCtx) {
4070
4221
  .min(1)
4071
4222
  .max(200)
4072
4223
  .optional()
4073
- .default(50)
4074
- .describe("Maximum number of errors to return (default 50)"),
4224
+ .describe("Max items to return. Default 20 (envelope-safe). Cap 200."),
4225
+ fields: z
4226
+ .enum(["lite", "full"])
4227
+ .optional()
4228
+ .describe("'lite' returns compact payload (less tokens), 'full' is default. v2.4.9+."),
4075
4229
  }, {
4076
4230
  readOnlyHint: true,
4077
4231
  openWorldHint: false,
4078
4232
  destructiveHint: false,
4079
4233
  title: "List errors",
4080
- }, async ({ deployment, limit }) => {
4234
+ }, async ({ deployment, limit, fields }) => {
4081
4235
  try {
4082
4236
  const _scopeDenied = guardMasterOnly("list_errors");
4083
4237
  if (_scopeDenied)
4084
4238
  return _scopeDenied;
4085
4239
  const errors = await convex.query("errorMonitor:listErrors", {
4086
4240
  deployment,
4087
- limit: limit ?? 50,
4241
+ limit: limit ?? 20,
4242
+ fields: fields ?? "lite",
4088
4243
  });
4089
4244
  return {
4090
4245
  content: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vantage-peers-mcp",
3
- "version": "2.4.8",
3
+ "version": "2.4.10",
4
4
  "description": "MCP server for VantagePeers — shared memory, messaging, and task coordination for AI agent teams",
5
5
  "type": "module",
6
6
  "main": "./dist/server.js",