@burdenoff/mcp-libs 2026.1111.2 → 2026.1112.1

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.
@@ -178,9 +178,11 @@ const CREATE_SEASON = `
178
178
  }
179
179
  `;
180
180
  const LIST_EPISODES = `
181
- query HookmoviesListEpisodes($titleId: ID!) {
182
- hokListEpisodes(titleId: $titleId) {
183
- ${EPISODE_FIELDS}
181
+ query HookmoviesListEpisodes($titleId: ID!, $pagination: PaginationInput) {
182
+ hokListEpisodes(titleId: $titleId, pagination: $pagination) {
183
+ items { ${EPISODE_FIELDS} }
184
+ ${PAGE_INFO}
185
+ totalCount
184
186
  }
185
187
  }
186
188
  `;
@@ -252,9 +254,11 @@ const CLOSE_AUDITION = `
252
254
  }
253
255
  `;
254
256
  const LIST_APPLICATIONS = `
255
- query HookmoviesListApplications($auditionId: ID!) {
256
- hokListApplications(auditionId: $auditionId) {
257
- ${APPLICATION_FIELDS}
257
+ query HookmoviesListApplications($auditionId: ID!, $pagination: PaginationInput) {
258
+ hokListApplications(auditionId: $auditionId, pagination: $pagination) {
259
+ items { ${APPLICATION_FIELDS} }
260
+ ${PAGE_INFO}
261
+ totalCount
258
262
  }
259
263
  }
260
264
  `;
@@ -335,9 +339,11 @@ const REVOKE_ENTITLEMENT = `
335
339
  }
336
340
  `;
337
341
  const MY_ENTITLEMENTS = `
338
- query HookmoviesMyEntitlements($titleId: ID) {
339
- hokMyEntitlements(titleId: $titleId) {
340
- ${ENTITLEMENT_FIELDS}
342
+ query HookmoviesMyEntitlements($titleId: ID, $pagination: PaginationInput) {
343
+ hokMyEntitlements(titleId: $titleId, pagination: $pagination) {
344
+ items { ${ENTITLEMENT_FIELDS} }
345
+ ${PAGE_INFO}
346
+ totalCount
341
347
  }
342
348
  }
343
349
  `;
@@ -391,9 +397,11 @@ const RECORD_PROGRESS = `
391
397
  }
392
398
  `;
393
399
  const MY_WATCH_PROGRESS = `
394
- query HookmoviesMyWatchProgress($titleId: ID) {
395
- hokMyWatchProgress(titleId: $titleId) {
396
- ${WATCH_PROGRESS_FIELDS}
400
+ query HookmoviesMyWatchProgress($titleId: ID, $pagination: PaginationInput) {
401
+ hokMyWatchProgress(titleId: $titleId, pagination: $pagination) {
402
+ items { ${WATCH_PROGRESS_FIELDS} }
403
+ ${PAGE_INFO}
404
+ totalCount
397
405
  }
398
406
  }
399
407
  `;
@@ -882,6 +890,26 @@ function registerPeopleTools(server, ctx, track) {
882
890
  });
883
891
  }
884
892
 
893
+ // src/modules/hookmovies/tools/pagination.ts
894
+ /**
895
+ * Pagination inputs for HookMovies list tools whose queries return a
896
+ * connection (`items`, `pageInfo`, `totalCount`) — BOFF-11587.
897
+ */
898
+ const DEFAULT_PAGE_SIZE = 50;
899
+ const paginationInput = {
900
+ limit: z.number().int().min(1).optional().describe(`Page size (default ${50})`),
901
+ offset: z.number().int().min(0).optional().describe("Pagination offset (default 0)"),
902
+ cursor: z.string().optional().describe("Opaque pagination cursor from a previous page")
903
+ };
904
+ /** The `PaginationInput` a connection query takes, with the tool defaults applied. */
905
+ function toPagination({ limit, offset, cursor }) {
906
+ return {
907
+ limit: limit ?? 50,
908
+ offset: offset ?? 0,
909
+ cursor
910
+ };
911
+ }
912
+
885
913
  // src/modules/hookmovies/tools/episodes.ts
886
914
  /**
887
915
  * HookMovies season + episode tools — episodic catalog structure.
@@ -920,11 +948,21 @@ function registerEpisodeTools(server, ctx, track) {
920
948
  });
921
949
  server.registerTool(track(mcpToolName(ctx.productName, "episodes_list")), {
922
950
  title: "List Episodes",
923
- description: "List all episodes for a title (across seasons).",
924
- inputSchema: { titleId: z.string().describe("Title ID") }
925
- }, async ({ titleId }) => {
951
+ description: "List the episodes of a title (across seasons), one page at a time. Returns items, pageInfo (cursor, hasMore) and totalCount.",
952
+ inputSchema: {
953
+ titleId: z.string().describe("Title ID"),
954
+ ...paginationInput
955
+ }
956
+ }, async ({ titleId, limit, offset, cursor }) => {
926
957
  try {
927
- const data = await ctx.gql.workspace.request(LIST_EPISODES, { titleId });
958
+ const data = await ctx.gql.workspace.request(LIST_EPISODES, {
959
+ titleId,
960
+ pagination: toPagination({
961
+ limit,
962
+ offset,
963
+ cursor
964
+ })
965
+ });
928
966
  return jsonResult(data.hokListEpisodes);
929
967
  } catch (error) {
930
968
  ctx.logger.error("hookmovies episodes_list failed", { error: String(error) });
@@ -1163,11 +1201,21 @@ function registerAuditionTools(server, ctx, track) {
1163
1201
  });
1164
1202
  server.registerTool(track(mcpToolName(ctx.productName, "applications_list")), {
1165
1203
  title: "List Applications",
1166
- description: "List the applications submitted to a given audition (casting-team view).",
1167
- inputSchema: { auditionId: z.string().describe("Audition ID") }
1168
- }, async ({ auditionId }) => {
1204
+ description: "List the applications submitted to a given audition (casting-team view), one page at a time. Returns items, pageInfo (cursor, hasMore) and totalCount.",
1205
+ inputSchema: {
1206
+ auditionId: z.string().describe("Audition ID"),
1207
+ ...paginationInput
1208
+ }
1209
+ }, async ({ auditionId, limit, offset, cursor }) => {
1169
1210
  try {
1170
- const data = await ctx.gql.workspace.request(LIST_APPLICATIONS, { auditionId });
1211
+ const data = await ctx.gql.workspace.request(LIST_APPLICATIONS, {
1212
+ auditionId,
1213
+ pagination: toPagination({
1214
+ limit,
1215
+ offset,
1216
+ cursor
1217
+ })
1218
+ });
1171
1219
  return jsonResult(data.hokListApplications);
1172
1220
  } catch (error) {
1173
1221
  ctx.logger.error("hookmovies applications_list failed", { error: String(error) });
@@ -1441,10 +1489,20 @@ function registerEntitlementTools(server, ctx, track) {
1441
1489
  server.registerTool(track(mcpToolName(ctx.productName, "entitlements_my")), {
1442
1490
  title: "My Entitlements",
1443
1491
  description: "List the calling user’s own entitlements (self-scoped), optionally filtered to a single title.",
1444
- inputSchema: { titleId: z.string().optional().describe("Filter to entitlements for a single title") }
1445
- }, async ({ titleId }) => {
1492
+ inputSchema: {
1493
+ titleId: z.string().optional().describe("Filter to entitlements for a single title"),
1494
+ ...paginationInput
1495
+ }
1496
+ }, async ({ titleId, limit, offset, cursor }) => {
1446
1497
  try {
1447
- const data = await ctx.gql.workspace.request(MY_ENTITLEMENTS, { titleId });
1498
+ const data = await ctx.gql.workspace.request(MY_ENTITLEMENTS, {
1499
+ titleId,
1500
+ pagination: toPagination({
1501
+ limit,
1502
+ offset,
1503
+ cursor
1504
+ })
1505
+ });
1448
1506
  return jsonResult(data.hokMyEntitlements);
1449
1507
  } catch (error) {
1450
1508
  ctx.logger.error("hookmovies entitlements_my failed", { error: String(error) });
@@ -1620,10 +1678,20 @@ function registerProgressTools(server, ctx, track) {
1620
1678
  server.registerTool(track(mcpToolName(ctx.productName, "progress_my")), {
1621
1679
  title: "My Watch Progress",
1622
1680
  description: "List the calling user’s continue-watching / progress entries (self-scoped), optionally filtered to a single title.",
1623
- inputSchema: { titleId: z.string().optional().describe("Filter to progress for a single title") }
1624
- }, async ({ titleId }) => {
1681
+ inputSchema: {
1682
+ titleId: z.string().optional().describe("Filter to progress for a single title"),
1683
+ ...paginationInput
1684
+ }
1685
+ }, async ({ titleId, limit, offset, cursor }) => {
1625
1686
  try {
1626
- const data = await ctx.gql.workspace.request(MY_WATCH_PROGRESS, { titleId });
1687
+ const data = await ctx.gql.workspace.request(MY_WATCH_PROGRESS, {
1688
+ titleId,
1689
+ pagination: toPagination({
1690
+ limit,
1691
+ offset,
1692
+ cursor
1693
+ })
1694
+ });
1627
1695
  return jsonResult(data.hokMyWatchProgress);
1628
1696
  } catch (error) {
1629
1697
  ctx.logger.error("hookmovies progress_my failed", { error: String(error) });