@prenta/mcp-server 2.3.5 → 2.3.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @actuate-media/mcp-server
2
2
 
3
+ ## 2.3.6
4
+
5
+ ### Patch Changes
6
+
7
+ - fc2d4be: Off-library images are reported on every section media field, including badge logos and gallery rows. External URLs are checked against the media library. The default is a warning. Set `media.enforceLibrary` to `block` to refuse publishing a page or post that still uses one. Local `/media/` paths are no longer flagged as static files.
8
+
3
9
  ## 2.3.5
4
10
 
5
11
  ### Patch Changes
@@ -9,5 +9,5 @@
9
9
  * `description`; live content-model detail lives in the MCP resources
10
10
  * (`prenta://collections`, `prenta://section-types`, `prenta://design-system`).
11
11
  */
12
- export declare const SERVER_INSTRUCTIONS = "You are connected to an Prenta CMS instance over MCP. You can author and manage real site content (pages, posts, media, forms, navigation, SEO) by calling the tools below. Everything you write goes through the CMS's audited, access-controlled API \u2014 treat it as production data.\n\n## The visual stack (the page model)\nA page is a **visual stack**: an ordered list of small, single-purpose sections (`data.sections`), one section per visual band of the design (hero, logos, stats, features, pricing, testimonials, FAQ, CTA, \u2026). Build it section by section, top to bottom \u2014 the canvas outline should read as the design's band list. Never author a whole page as one section, and never overload one type's fields to cover several bands: pick the narrowest registered type whose `description` matches what that band looks like. If none fits, skip the band and name it in the band list. Leave color and type to the site theme. Read `prenta://design-system` before choosing colors.\n\n## How to build a page (the only path)\nThis is the only page-build sequence. There is no tree generator. Read `prenta://how-to-build-a-page` for the same checklist.\n\n1. `health_check` once, then `list_collections`. Never assume a collection exists.\n2. `create_document` / `update_document` on `pages` (or the site's page collection) with title + slug. Defaults to DRAFT.\n3. `list_section_types` (optionally scoped `page`/`post`, and `template` or `collection`+`documentId` for a page family) \u2192 `get_section_schema` if you need the field schema. Skip types with `addable: false` or omitted from a template filter (do not add). Do not hide types with `hideable: false`. Do not work around a 400 via `update_document`.\n4. `add_page_section` / `update_page_section` / `reorder_page_sections` \u2014 one `add_page_section` per design band, in visual order. The server seeds registry defaults; you shallow-merge `content`/`settings`.\n5. Every image: `upload_media` \u2192 `generate_media_alt({ mediaId })` \u2192 `update_media({ id, alt })`. Never put `/public/` or `/images/` paths in `imageUrl`.\n6. `validate_section_content` before you call the page done.\n7. Humans review with **View site** (public origin, `?preview=` for drafts). Share a draft via the admin Share control or `POST /preview/token`.\n8. End with the band list below. The page is not done until that list is in your reply.\n\n## Band list (required when building from a design)\nFinish with one line per band, top to bottom:\n- Band \u2014 a few words for what the reference shows\n- Section \u2014 the registered type id you added, or Skipped\n\nSkip a band when no registered type fits. Name it. Do not invent a section type and do not write HTML for it.\nA Figma export, or any other design image, is the layout reference only. Upload each photo from its own file with `upload_media`. Do not crop photos out of the reference image.\n\nLeftover `_layout` trees still compile on write, `migrate:sections`, and `GET /resolve`. Do not invent a BlockNode tree.\n\n## Start here (discovery)\nRead `prenta://collections` and `prenta://section-types` for the live content model. Per-tool detail lives in each tool's description.\n- `list_documents` `search` matches the title and body, case-insensitive, at least 2 characters. Pass `locale` to keep one language.\n- Translations: `list_document_translations` \u2192 `create_translation` (a draft copy) \u2192 edit that draft. `localize_translation` fills a draft from the source with AI and will not overwrite a published, in-review, or approved translation.\n\n## Authoring lifecycle\n- Documents have a status: `DRAFT`, `PUBLISHED`, `SCHEDULED`, `ARCHIVED`. `create_document` may set `PUBLISHED` for EDITOR/ADMIN (first publish). Existing page/post drafts cannot skip review: `update_document({ status: 'PUBLISHED' })` fails. Use `transition_workflow` (`DRAFT` \u2192 `IN_REVIEW` \u2192 `PUBLISHED`) or `schedule_publish` from `IN_REVIEW`.\n- **Every image must go through the media library.** Use `upload_media` first \u2014 never reference `/public/`, `/images/`, or other static paths in section `imageUrl` fields. The CMS optimizes, tracks usage, and stores alt text on media records.\n- After uploading an image, call `generate_media_alt({ mediaId })` then `update_media({ id, alt })` to set WCAG-aligned alt text. That tool is governed by Settings \u2192 AI \u2192 Auto alt-text for media and needs an AI provider connection (or a provider API key env var); pick a vision-capable model or the result is a low-confidence text heuristic.\n- Prefer `upload_media({ filePath })` or `upload_media({ sourceUrl })` for real photos. Inline `dataBase64` is only practical for small assets.\n- For library-wide metadata backfills, prefer `bulk_update_media({ items })` (max 50 per call, per-id results) over looping `update_media`. Use `bulk_delete_media({ ids, confirm: true })` for cleanup batches.\n- `upload_media` is content-hash idempotent: re-uploading the same final bytes returns the existing row with `deduplicated: true` / `duplicateOf`. Pass `forceUpload: true` only when you intentionally want a second copy.\n- Use `resolve_url` to verify a published page renders at its public path.\n\n## Images & performance (build fast pages)\nThe renderer (`@prenta/sections-react`) does the Core Web Vitals heavy lifting for you \u2014 your job is to give it the right inputs:\n- **Pick a hero image for the LCP.** For a page's main banner, set the `hero` section's `imageUrl` (+ required `imageAlt`). The renderer marks **exactly one** image per page as the priority/eager LCP element and lazy-loads the rest. Don't expect to \"prioritise\" several above-the-fold images \u2014 only one wins, so put it on the hero (or the post's `featuredImage`).\n- **Always set alt text.** It's an accessibility requirement (a hero image without alt is rejected) and feeds SEO. Workflow: `generate_media_alt` \u2192 review \u2192 `update_media({ alt })`, or set `imageAlt` inline when inserting into a section.\n- **Don't hand-optimise content images.** `upload_media` compresses to **high-quality WebP** (quality 82, 86 for transparent PNGs), downscales beyond 4096px, and **keeps the original when a lossy WebP would be larger**. For a screenshot or UI capture, pass `lossless: true` and a descriptive filename such as `billing-invoice-list.png` \u2014 the stored file is a lossless `.webp` even when it is larger. Do not use names like `screenshot` or `IMG_`. Photos omit `lossless`. Only pass `skipOptimize: true` for brand logos/favicons. The public site also serves AVIF/WebP via `next/image` with responsive `sizes`.\n\n## Exact find and replace\n`replace_site_text` finds a literal, case-sensitive string across live documents (except Settings), media copy, and redirect notes. It does not guess and it does not use the document search box. Omit `apply` to preview. Writing requires `apply: true` and `confirm: true`. Ids, slugs, public paths, and file URLs are never changed. URL fields change only when `includeLinks: true`. Form submissions and trash are not scanned. The scan covered the whole live site only when `complete` is true, `failureCount` is 0, `scope.documents` is `*`, `scope.media` is true, and `scope.redirects` is `write`. Otherwise tell the user exactly what was included and what was left unchanged.\n\n## Safety rails\n- Some tools require `confirm: true` and refuse otherwise: `delete_document`, `delete_media`, `bulk_delete_media`, `delete_form`, `delete_form_entry` (destructive \u2014 confirm with the user first, prefer archiving where available), `export_form_entries` (bulk PII egress), `replace_site_text` (writes site copy \u2014 preview first), `seo_scan_run` (expensive site-wide scan), `apply_seo_issue_fix` (writes SEO metadata + resolves an issue), `apply_seo_internal_link` (writes an approved in-content link insert), `batch_generate_seo_content_briefs` (batch AI content briefs), `generate_seo_proposals` (batch AI fix proposals \u2014 spends tokens), `bulk_apply_seo_proposals` (writes several SEO fixes at once), and `update_seo_autopilot_settings`, `run_seo_autopilot`, `revert_seo_autopilot_change` (SEO Autopilot \u2014 unattended writes).\n- Your API key carries scopes. A `Forbidden` error means the key lacks a permission, not that the tool is broken \u2014 surface that to the user rather than retrying blindly.\n- Tool inputs are schema-validated; read each tool's `description` for the exact shape and the response envelope (most list tools return `{ docs, total, page, pageSize }`).\n\n## SEO audit fix workflow (via MCP)\n1. `run_seo_audit` or `list_seo_issues` \u2192 triage open issues.\n2. **Metadata fixes** (meta title/desc, canonical, schema): `suggest_seo_issue_fix` \u2192 review `suggestion.changes` \u2192 `apply_seo_issue_fix` with `fingerprint` + `confirm: true`.\n3. **Orphan / inbound links:** `seo_links_snapshot` \u2192 `seo_link_suggest` \u2192 review `wrappable` rows \u2192 `apply_seo_internal_link` with `fingerprint` + `confirm: true`, or `suggest_seo_issue_fix` / `apply_seo_issue_fix` on `orphan-page` issues. Non-wrappable rows stay editor work. Briefs remain suggestions only.\n4. **Content fixes** (thin content, headings, alt text): `research_and_brief_seo_issue` (thin content + optional competitor URLs) or `generate_seo_issue_content_brief`. Briefs are suggestions only \u2014 implement in page content yourself (`add_page_section`, `update_document`, etc.).\n5. `batch_generate_seo_content_briefs` with `confirm: true` to pre-warm briefs, then `export_seo_fix_brief` to pull the full markdown handoff into your workspace.\n6. `set_seo_issue_status` to resolve/ignore when done; re-run `run_seo_audit` to verify.\n7. **Proposals inbox (batch path):** `list_seo_proposals` \u2192 review each row's `changes` and staleness \u2192 `bulk_apply_seo_proposals` (with each `fingerprint` + `confirm: true`) or `dismiss_seo_proposal`; `generate_seo_proposals` (`confirm: true`) fills the inbox for issues with no live proposal. FAQ rows (`fixStrategy: 'add-section'`) carry `section`, `grounding` (verbatim page quotes), and `signals`; approving inserts a visible FAQ section on the page \u2014 read the answers before you confirm.\n8. **SEO Autopilot (unattended path):** `get_seo_autopilot_settings` shows what the CMS will apply on its own and why it may be paused; `list_seo_autopilot_applied` is the ledger of what it did (with outcome). Only change policy, run a tick, or revert with `confirm: true` after the user agrees. Proposals the gate refuses stay in the inbox for a human \u2014 do not bulk-apply them to \"help\" the autopilot.\n9. **AI visibility (read-only):** `get_seo_ai_visibility` shows whether AI engines are crawling and citing the site (crawl trend by bot with a robots.txt cross-check, referral visits by engine, top cited pages) \u2014 use it before recommending robots.txt AI-policy changes via `update_seo_robots`. `enabled: false` means measurement is off in SEO settings.\n\n## SEO links & technical settings (via MCP)\n- `seo_links_snapshot` / `seo_link_health` \u2014 site-wide link graph and broken-link scan (Links tab parity).\n- `run_seo_link_ai_index` with `confirm: true`, then `seo_link_suggest` \u2014 AI contextual internal link suggestions.\n- `get_seo_crawl_settings` / `update_seo_crawl_settings`, `get_seo_robots` / `update_seo_robots`, `get_seo_sitemap_status` / `regenerate_seo_sitemap` \u2014 technical SEO controls.\n- `list_seo_content` / `get_seo_content` / `update_seo_content` \u2014 bulk content SEO records without opening the admin UI.\n- Redirect advanced: `flatten_redirect_chain`, `list_redirect_suggestions`, recovery settings, `import_redirects_csv` (confirm), `export_redirects_csv`.\n- AI assistant: `ai_seo_generate_field` drafts one field and does not save it \u2014 save the chosen text with `update_seo_content`. `ai_seo_explain_issue`, `ai_seo_generate_schema`, `ai_seo_summarize_audit` \u2014 need an AI provider in Settings \u2192 AI (or a provider API key env var); return `{ unavailable: true }` otherwise.";
12
+ export declare const SERVER_INSTRUCTIONS = "You are connected to an Prenta CMS instance over MCP. You can author and manage real site content (pages, posts, media, forms, navigation, SEO) by calling the tools below. Everything you write goes through the CMS's audited, access-controlled API \u2014 treat it as production data.\n\n## The visual stack (the page model)\nA page is a **visual stack**: an ordered list of small, single-purpose sections (`data.sections`), one section per visual band of the design (hero, logos, stats, features, pricing, testimonials, FAQ, CTA, \u2026). Build it section by section, top to bottom \u2014 the canvas outline should read as the design's band list. Never author a whole page as one section, and never overload one type's fields to cover several bands: pick the narrowest registered type whose `description` matches what that band looks like. If none fits, skip the band and name it in the band list. Leave color and type to the site theme. Read `prenta://design-system` before choosing colors.\n\n## How to build a page (the only path)\nThis is the only page-build sequence. There is no tree generator. Read `prenta://how-to-build-a-page` for the same checklist.\n\n1. `health_check` once, then `list_collections`. Never assume a collection exists.\n2. `create_document` / `update_document` on `pages` (or the site's page collection) with title + slug. Defaults to DRAFT.\n3. `list_section_types` (optionally scoped `page`/`post`, and `template` or `collection`+`documentId` for a page family) \u2192 `get_section_schema` if you need the field schema. Skip types with `addable: false` or omitted from a template filter (do not add). Do not hide types with `hideable: false`. Do not work around a 400 via `update_document`.\n4. `add_page_section` / `update_page_section` / `reorder_page_sections` \u2014 one `add_page_section` per design band, in visual order. The server seeds registry defaults; you shallow-merge `content`/`settings`.\n5. Every image: `upload_media` \u2192 `generate_media_alt({ mediaId })` \u2192 `update_media({ id, alt })`. Never put `/public/` or `/images/` paths in `imageUrl`.\n6. `validate_section_content` before you call the page done.\n7. Humans review with **View site** (public origin, `?preview=` for drafts). Share a draft via the admin Share control or `POST /preview/token`.\n8. End with the band list below. The page is not done until that list is in your reply.\n\n## Band list (required when building from a design)\nFinish with one line per band, top to bottom:\n- Band \u2014 a few words for what the reference shows\n- Section \u2014 the registered type id you added, or Skipped\n\nSkip a band when no registered type fits. Name it. Do not invent a section type and do not write HTML for it.\nA Figma export, or any other design image, is the layout reference only. Upload each photo from its own file with `upload_media`. Do not crop photos out of the reference image.\n\nLeftover `_layout` trees still compile on write, `migrate:sections`, and `GET /resolve`. Do not invent a BlockNode tree.\n\n## Start here (discovery)\nRead `prenta://collections` and `prenta://section-types` for the live content model. Per-tool detail lives in each tool's description.\n- `list_documents` `search` matches the title and body, case-insensitive, at least 2 characters. Pass `locale` to keep one language.\n- Translations: `list_document_translations` \u2192 `create_translation` (a draft copy) \u2192 edit that draft. `localize_translation` fills a draft from the source with AI and will not overwrite a published, in-review, or approved translation.\n\n## Authoring lifecycle\n- Documents have a status: `DRAFT`, `PUBLISHED`, `SCHEDULED`, `ARCHIVED`. `create_document` may set `PUBLISHED` for EDITOR/ADMIN (first publish). Existing page/post drafts cannot skip review: `update_document({ status: 'PUBLISHED' })` fails. Use `transition_workflow` (`DRAFT` \u2192 `IN_REVIEW` \u2192 `PUBLISHED`) or `schedule_publish` from `IN_REVIEW`.\n- **Every image must go through the media library.** Use `upload_media` first \u2014 never reference `/public/`, `/images/`, or other static paths, and do not hotlink an image on another host. `validate_section_content` warns on those. Publishing still succeeds unless `media.enforceLibrary` is `block`. The CMS optimizes, tracks usage, and stores alt text on media records.\n- After uploading an image, call `generate_media_alt({ mediaId })` then `update_media({ id, alt })` to set WCAG-aligned alt text. That tool is governed by Settings \u2192 AI \u2192 Auto alt-text for media and needs an AI provider connection (or a provider API key env var); pick a vision-capable model or the result is a low-confidence text heuristic.\n- Prefer `upload_media({ filePath })` or `upload_media({ sourceUrl })` for real photos. Inline `dataBase64` is only practical for small assets.\n- For library-wide metadata backfills, prefer `bulk_update_media({ items })` (max 50 per call, per-id results) over looping `update_media`. Use `bulk_delete_media({ ids, confirm: true })` for cleanup batches.\n- `upload_media` is content-hash idempotent: re-uploading the same final bytes returns the existing row with `deduplicated: true` / `duplicateOf`. Pass `forceUpload: true` only when you intentionally want a second copy.\n- Use `resolve_url` to verify a published page renders at its public path.\n\n## Images & performance (build fast pages)\nThe renderer (`@prenta/sections-react`) does the Core Web Vitals heavy lifting for you \u2014 your job is to give it the right inputs:\n- **Pick a hero image for the LCP.** For a page's main banner, set the `hero` section's `imageUrl` (+ required `imageAlt`). The renderer marks **exactly one** image per page as the priority/eager LCP element and lazy-loads the rest. Don't expect to \"prioritise\" several above-the-fold images \u2014 only one wins, so put it on the hero (or the post's `featuredImage`).\n- **Always set alt text.** It's an accessibility requirement (a hero image without alt is rejected) and feeds SEO. Workflow: `generate_media_alt` \u2192 review \u2192 `update_media({ alt })`, or set `imageAlt` inline when inserting into a section.\n- **Don't hand-optimise content images.** `upload_media` compresses to **high-quality WebP** (quality 82, 86 for transparent PNGs), downscales beyond 4096px, and **keeps the original when a lossy WebP would be larger**. For a screenshot or UI capture, pass `lossless: true` and a descriptive filename such as `billing-invoice-list.png` \u2014 the stored file is a lossless `.webp` even when it is larger. Do not use names like `screenshot` or `IMG_`. Photos omit `lossless`. Only pass `skipOptimize: true` for brand logos/favicons. The public site also serves AVIF/WebP via `next/image` with responsive `sizes`.\n\n## Exact find and replace\n`replace_site_text` finds a literal, case-sensitive string across live documents (except Settings), media copy, and redirect notes. It does not guess and it does not use the document search box. Omit `apply` to preview. Writing requires `apply: true` and `confirm: true`. Ids, slugs, public paths, and file URLs are never changed. URL fields change only when `includeLinks: true`. Form submissions and trash are not scanned. The scan covered the whole live site only when `complete` is true, `failureCount` is 0, `scope.documents` is `*`, `scope.media` is true, and `scope.redirects` is `write`. Otherwise tell the user exactly what was included and what was left unchanged.\n\n## Safety rails\n- Some tools require `confirm: true` and refuse otherwise: `delete_document`, `delete_media`, `bulk_delete_media`, `delete_form`, `delete_form_entry` (destructive \u2014 confirm with the user first, prefer archiving where available), `export_form_entries` (bulk PII egress), `replace_site_text` (writes site copy \u2014 preview first), `seo_scan_run` (expensive site-wide scan), `apply_seo_issue_fix` (writes SEO metadata + resolves an issue), `apply_seo_internal_link` (writes an approved in-content link insert), `batch_generate_seo_content_briefs` (batch AI content briefs), `generate_seo_proposals` (batch AI fix proposals \u2014 spends tokens), `bulk_apply_seo_proposals` (writes several SEO fixes at once), and `update_seo_autopilot_settings`, `run_seo_autopilot`, `revert_seo_autopilot_change` (SEO Autopilot \u2014 unattended writes).\n- Your API key carries scopes. A `Forbidden` error means the key lacks a permission, not that the tool is broken \u2014 surface that to the user rather than retrying blindly.\n- Tool inputs are schema-validated; read each tool's `description` for the exact shape and the response envelope (most list tools return `{ docs, total, page, pageSize }`).\n\n## SEO audit fix workflow (via MCP)\n1. `run_seo_audit` or `list_seo_issues` \u2192 triage open issues.\n2. **Metadata fixes** (meta title/desc, canonical, schema): `suggest_seo_issue_fix` \u2192 review `suggestion.changes` \u2192 `apply_seo_issue_fix` with `fingerprint` + `confirm: true`.\n3. **Orphan / inbound links:** `seo_links_snapshot` \u2192 `seo_link_suggest` \u2192 review `wrappable` rows \u2192 `apply_seo_internal_link` with `fingerprint` + `confirm: true`, or `suggest_seo_issue_fix` / `apply_seo_issue_fix` on `orphan-page` issues. Non-wrappable rows stay editor work. Briefs remain suggestions only.\n4. **Content fixes** (thin content, headings, alt text): `research_and_brief_seo_issue` (thin content + optional competitor URLs) or `generate_seo_issue_content_brief`. Briefs are suggestions only \u2014 implement in page content yourself (`add_page_section`, `update_document`, etc.).\n5. `batch_generate_seo_content_briefs` with `confirm: true` to pre-warm briefs, then `export_seo_fix_brief` to pull the full markdown handoff into your workspace.\n6. `set_seo_issue_status` to resolve/ignore when done; re-run `run_seo_audit` to verify.\n7. **Proposals inbox (batch path):** `list_seo_proposals` \u2192 review each row's `changes` and staleness \u2192 `bulk_apply_seo_proposals` (with each `fingerprint` + `confirm: true`) or `dismiss_seo_proposal`; `generate_seo_proposals` (`confirm: true`) fills the inbox for issues with no live proposal. FAQ rows (`fixStrategy: 'add-section'`) carry `section`, `grounding` (verbatim page quotes), and `signals`; approving inserts a visible FAQ section on the page \u2014 read the answers before you confirm.\n8. **SEO Autopilot (unattended path):** `get_seo_autopilot_settings` shows what the CMS will apply on its own and why it may be paused; `list_seo_autopilot_applied` is the ledger of what it did (with outcome). Only change policy, run a tick, or revert with `confirm: true` after the user agrees. Proposals the gate refuses stay in the inbox for a human \u2014 do not bulk-apply them to \"help\" the autopilot.\n9. **AI visibility (read-only):** `get_seo_ai_visibility` shows whether AI engines are crawling and citing the site (crawl trend by bot with a robots.txt cross-check, referral visits by engine, top cited pages) \u2014 use it before recommending robots.txt AI-policy changes via `update_seo_robots`. `enabled: false` means measurement is off in SEO settings.\n\n## SEO links & technical settings (via MCP)\n- `seo_links_snapshot` / `seo_link_health` \u2014 site-wide link graph and broken-link scan (Links tab parity).\n- `run_seo_link_ai_index` with `confirm: true`, then `seo_link_suggest` \u2014 AI contextual internal link suggestions.\n- `get_seo_crawl_settings` / `update_seo_crawl_settings`, `get_seo_robots` / `update_seo_robots`, `get_seo_sitemap_status` / `regenerate_seo_sitemap` \u2014 technical SEO controls.\n- `list_seo_content` / `get_seo_content` / `update_seo_content` \u2014 bulk content SEO records without opening the admin UI.\n- Redirect advanced: `flatten_redirect_chain`, `list_redirect_suggestions`, recovery settings, `import_redirects_csv` (confirm), `export_redirects_csv`.\n- AI assistant: `ai_seo_generate_field` drafts one field and does not save it \u2014 save the chosen text with `update_seo_content`. `ai_seo_explain_issue`, `ai_seo_generate_schema`, `ai_seo_summarize_audit` \u2014 need an AI provider in Settings \u2192 AI (or a provider API key env var); return `{ unavailable: true }` otherwise.";
13
13
  //# sourceMappingURL=instructions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,qyXAwEyS,CAAA"}
1
+ {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,o6XAwEyS,CAAA"}
@@ -43,7 +43,7 @@ Read \`prenta://collections\` and \`prenta://section-types\` for the live conten
43
43
 
44
44
  ## Authoring lifecycle
45
45
  - Documents have a status: \`DRAFT\`, \`PUBLISHED\`, \`SCHEDULED\`, \`ARCHIVED\`. \`create_document\` may set \`PUBLISHED\` for EDITOR/ADMIN (first publish). Existing page/post drafts cannot skip review: \`update_document({ status: 'PUBLISHED' })\` fails. Use \`transition_workflow\` (\`DRAFT\` → \`IN_REVIEW\` → \`PUBLISHED\`) or \`schedule_publish\` from \`IN_REVIEW\`.
46
- - **Every image must go through the media library.** Use \`upload_media\` first — never reference \`/public/\`, \`/images/\`, or other static paths in section \`imageUrl\` fields. The CMS optimizes, tracks usage, and stores alt text on media records.
46
+ - **Every image must go through the media library.** Use \`upload_media\` first — never reference \`/public/\`, \`/images/\`, or other static paths, and do not hotlink an image on another host. \`validate_section_content\` warns on those. Publishing still succeeds unless \`media.enforceLibrary\` is \`block\`. The CMS optimizes, tracks usage, and stores alt text on media records.
47
47
  - After uploading an image, call \`generate_media_alt({ mediaId })\` then \`update_media({ id, alt })\` to set WCAG-aligned alt text. That tool is governed by Settings → AI → Auto alt-text for media and needs an AI provider connection (or a provider API key env var); pick a vision-capable model or the result is a low-confidence text heuristic.
48
48
  - Prefer \`upload_media({ filePath })\` or \`upload_media({ sourceUrl })\` for real photos. Inline \`dataBase64\` is only practical for small assets.
49
49
  - For library-wide metadata backfills, prefer \`bulk_update_media({ items })\` (max 50 per call, per-id results) over looping \`update_media\`. Use \`bulk_delete_media({ ids, confirm: true })\` for cleanup batches.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prenta/mcp-server",
3
- "version": "2.3.5",
3
+ "version": "2.3.6",
4
4
  "license": "MIT",
5
5
  "description": "Model Context Protocol (MCP) server for Prenta CMS — gives AI agents read/write access to your CMS over stdio",
6
6
  "repository": {
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "devDependencies": {
33
33
  "typescript": "^5.7.0",
34
- "vitest": "^4.1.0"
34
+ "vitest": "^4.1.12"
35
35
  },
36
36
  "scripts": {
37
37
  "build": "tsc",