@bettercms-ai/mcp 0.66.1 → 0.66.2

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/index.js CHANGED
@@ -2737,6 +2737,7 @@ function entryListSearch(args) {
2737
2737
  for (const key of ["modelId", "pageId", "status"]) if (args[key]) q.set(key, String(args[key]));
2738
2738
  for (const [k, v] of whereToQuery(args.where)) q.append(k, v);
2739
2739
  for (const key of ["sort", "page", "limit"]) if (args[key] !== void 0 && args[key] !== null) q.set(key, String(args[key]));
2740
+ if (args.detail !== true) q.set("select", "summary");
2740
2741
  const s = q.toString();
2741
2742
  return s ? `?${s}` : "";
2742
2743
  }
@@ -3128,6 +3129,7 @@ var ENTRY_MERGE_NOTE = "true = keep the fields you leave out: the entry is read,
3128
3129
  var ENTRY_IF_MATCH_NOTE = "optimisticVersion from get_content_entry: the write applies only at that version, and a 409 means it changed since: read it again and re-apply. With merge it defaults to the version merge read.";
3129
3130
  var ENTRY_SCHEDULED_AT_NOTE = "ISO datetime to publish this draft at (needs publish permission); null cancels. An edit that omits scheduledAt CANCELS a pending publish schedule, so send it again with every edit made before it fires.";
3130
3131
  var ENTRY_UNPUBLISH_AT_NOTE = "ISO datetime at which the published entry returns to draft; null cancels. Omitting it never cancels it.";
3132
+ var ENTRY_LIST_DETAIL_NOTE = "true = full rows with every field value and the published copy. Large: read one entry with get_content_entry instead.";
3131
3133
  var ENTRY_LIST_LIMIT_NOTE = "entries per page, 1-200; 50 when omitted. Read `meta.totalPages` and ask for the next `page`.";
3132
3134
  var PAGE_HEAD_NOTE = "noindex, canonical, og and twitter set the page's head extras; each MERGES into what is stored (a key you leave out is kept, null or an empty string clears it).";
3133
3135
  var STRUCTURE_FENCE = "ORGANISATION ONLY: Content sidebar folders never change a URL, slug, content or publish state, and nothing is rebuilt or delivered; URL folders (page folders) are set in the dashboard. Read the resource bettercms://playbook/structure before you organise anything: it holds the rules this refuses on \u2014 system folders, type purity, the Admin/Developer access check, root pins and page-bound models.";
@@ -3412,7 +3414,8 @@ function buildToolDefs(deps) {
3412
3414
  where: z.record(z.string(), z.unknown()).optional().describe(PARAM_TEXT.where),
3413
3415
  sort: z.string().max(100).optional().describe(PARAM_TEXT.sort),
3414
3416
  page: z.number().int().min(1).optional().describe(PARAM_TEXT.page),
3415
- limit: z.number().int().min(1).max(200).optional().describe(ENTRY_LIST_LIMIT_NOTE)
3417
+ limit: z.number().int().min(1).max(200).optional().describe(ENTRY_LIST_LIMIT_NOTE),
3418
+ detail: z.boolean().optional().describe(ENTRY_LIST_DETAIL_NOTE)
3416
3419
  });
3417
3420
  const clearableText = (max) => z.string().max(max).nullable().optional();
3418
3421
  const headPatchShape = {
@@ -5217,20 +5220,11 @@ ${notes.join("\n")}` : summary, created);
5217
5220
  name: "list_content_entries",
5218
5221
  config: {
5219
5222
  title: "List content entries (incl. drafts)",
5220
- description: "List content entries \u2014 including drafts \u2014 filtered by model and/or page, by field values (`where`), sorted and paged. Use it to SEE existing content before editing. For a singleton page, pass its pageId to get its single entry. A project-scoped connection sees its own project's entries plus workspace-level ones, which it can read but not change. Returns `limit` entries per `page` (50 by default); the summary says which page of how many.",
5223
+ description: "List content entries \u2014 including drafts \u2014 filtered by model and/or page, by field values (`where`), sorted and paged. Use it to SEE existing content before editing. For a singleton page, pass its pageId to get its single entry. A project-scoped connection sees its own project's entries plus workspace-level ones, which it can read but not change. Returns `limit` entries per `page` (50 by default); the summary says which page of how many. Each entry is a SUMMARY (id, slug, title, status, model, page, dates, optimisticVersion) \u2014 read values with get_content_entry, or pass `detail: true` for full rows.",
5221
5224
  inputSchema: listEntriesInput.shape
5222
5225
  },
5223
5226
  handler: guard(
5224
5227
  async (args) => withClient(async (client) => {
5225
- const filter = {
5226
- ...args.modelId ? { modelId: args.modelId } : {},
5227
- ...args.pageId ? { pageId: args.pageId } : {},
5228
- ...args.status ? { status: args.status } : {}
5229
- };
5230
- if ([args.limit, args.where, args.sort, args.page].every((v) => v === void 0)) {
5231
- const entries = await client.listEntries(filter);
5232
- return ok(`${entries.length} entr(y/ies).`, entries);
5233
- }
5234
5228
  const res = await client.fetchJSON(
5235
5229
  client.url(`/management/content/entries${entryListSearch(args)}`),
5236
5230
  { method: "GET" }
@@ -6132,6 +6126,10 @@ components \u2014 is \`editor_setup\`, run on demand against the live build. The
6132
6126
  \`get_deploy_status\` \`editorSetup\` (and get_next_steps) say when it has not run for the live
6133
6127
  build: \`never\` or \`stale\` \u2192 run it before anything below.
6134
6128
 
6129
+ **Builds run \`build:bcms\` instead of \`build\`** when package.json declares one: the build alone,
6130
+ without CI checks (\`"build:bcms": "astro build"\` beside \`"build": "astro check && astro build"\`),
6131
+ keeping any step the build needs. The convert codemod adds it; never edit \`build\` for BetterCMS.
6132
+
6135
6133
  \`deploy_project\` and \`promote_project\` both answer **409
6136
6134
  AUTHORING_DECISION_REQUIRED** until a human has chosen this project's architecture. This is
6137
6135
  asked ONCE per project, ever. It is not an error to retry or route around: read the message