MCP tools reference
Complete grouped reference to the PageDesigner MCP server tools.
Complete grouped reference to the tools exposed by the PageDesigner MCP server and the safe workflow for using them.
This page lists the current PageDesigner MCP tools. The server returns the authoritative JSON Schema through tools/list; client UIs should use that schema for exact arguments.
Recommended workflow
flowchart TD
A[Read agent guide and design docs] --> B[List pages and storefront summary]
B --> C[Inspect target page context]
C --> D{Need product, plan, or link facts?}
D -- Yes --> E[Read catalog data and valid link targets]
D -- No --> F[Search library or target components]
E --> F
F --> G[Make surgical tool changes]
G --> H[Re-read context or component]
H --> I[Update SEO and settings]
I --> J{Explicit publication intent?}
J -- No --> K[Leave draft and report]
J -- Yes --> L[Publish and verify]Orientation and storefront facts
| Tool | Purpose |
|---|---|
list_pages | List PageDesigner pages with ID, title, slug, published state, and update time |
get_page | Read page metadata, SEO, custom-code flags, and content lengths |
get_storefront_summary | Get counts for pages, categories, products, and plans |
list_categories | List product categories, hierarchy, and product counts |
get_category | Read one category and optionally its products |
list_products | List visible products, optionally with plans and prices |
get_product | Read one product, category, plans, and prices |
list_plans | List plans filtered by product, category, type, or currency |
get_plan | Read one plan, billing interval, product, and prices |
list_link_targets | Return valid site, page, category, product, and checkout URLs |
Rule
Before writing product, plan, billing, or pricing copy, read the applicable storefront tool. Before setting a PageDesigner or Paymenter CTA, call list_link_targets and use a returned href.
Page lifecycle
| Tool | Purpose | Important behavior |
|---|---|---|
create_page | Create a page | Draft by default; slug can be generated |
update_page_settings | Update title, slug, SEO, publish, and navigation fields | Does not touch canvas HTML |
duplicate_page | Copy a page | New copy is unpublished |
publish_page | Set the page active | Requires explicit intent |
unpublish_page | Hide the page from public visitors | Safer than deletion |
delete_page | Permanently delete | Requires confirm: true |
Page and component inspection
| Tool | Purpose |
|---|---|
get_page_context | Return a compact component tree; prefer depth 2–3 |
ensure_component_ids | Assign stable IDs to nodes missing them |
get_component | Read one component's classes, attributes, children, and optional HTML |
search_components | Search by ID, name, tag, class, text, Hosted UID, or i18n key |
get_page_html | Read rendered page HTML with a character limit |
get_page_css | Read page CSS with a character limit |
Call get_page_context before editing. Use the exact component IDs returned by inspection tools.
Library and reusable components
| Tool | Purpose | Important behavior |
|---|---|---|
list_library | Search Hosted cache and custom blocks | Use component_uid when available |
add_component | Add a library model to a page | Can target parent and index |
create_component | Save a new local reusable block | Can optionally place it |
fork_component | Copy a Hosted/custom source into a new local block | Original never changes; source must be cached |
Prefer a suitable library model over hand-building a common hero, pricing, feature, or FAQ section.
Canvas structure and content
| Tool | Purpose | Risk |
|---|---|---|
insert_html | Insert safe HTML under a parent or root | Structural |
replace_component_html | Replace one component or root children | Destructive |
remove_component | Remove one component | Destructive |
move_component | Reorder or reparent | Structural |
set_page_html | Replace the entire canvas and optionally CSS | Destructive full rebuild |
update_text | Change visible text only | Surgical |
update_classes | Add/remove/set CSS classes | Surgical unless using full set |
update_attributes | Set safe attributes | Surgical |
set_component_link | Set a safe CTA/link URL plus optional label/title/target | Call list_link_targets first |
HTML safety
Canvas HTML must not contain scripts, event handlers, or javascript: URLs. Use theme utilities rather than inline theme colors.
Translations
| Tool | Purpose | Important behavior |
|---|---|---|
list_locales | List available, current, and fallback locales | |
list_translations | List translation keys and per-locale values | |
get_translation | Read one key and its bound component IDs | |
set_translation | Create or update locale values | |
bind_translation | Attach a component to a key and optionally seed values | |
unbind_translation | Remove the component binding | |
remove_translation | Remove a locale value or whole key | Whole-key deletion requires confirmation |
Keys must match the safe PageDesigner key pattern and should remain stable. Do not overwrite unrelated locales.
Page-level custom code
| Tool | Purpose | Important behavior |
|---|---|---|
get_custom_code | Read all page custom-code slots | Call before editing |
set_custom_code | Set head, before/after HTML, CSS, or JavaScript slots | Can replace provided slots |
add_custom_script | Append or replace a script in head or after-content location | Append by default; code runs publicly |
Never put a secret in public page code. Use location: head only when necessary. Use replace only with explicit intent.
Design documentation
| Tool | Purpose |
|---|---|
list_docs | List PageDesigner design documents |
read_docs | Read a document such as best practices, theme colors, classes/layout, or components |
get_agent_guide | Read the complete connected-agent workflow |
Read the design docs before creating or substantially restyling content.
Tool annotations and destructive work
The MCP schemas annotate read-only and destructive operations. Clients should expose those cues.
Treat these as high risk:
delete_pageset_page_htmlreplace_component_htmlremove_component- whole-key
remove_translation - Custom Code replacement
publish_page
Before a high-risk operation:
- Inspect the target.
- Confirm the page ID and component ID.
- Prefer an unpublished duplicate.
- Clarify the intended scope.
- Verify after the call.
Prompts are not tools
The server provides build_page, edit_section, and design_review prompts. A prompt prepares an instruction for the client. It does not mutate anything until the client calls tools.
Resources are not page publication
Reading pagedesigner://pages/{page_id}/context or /html is inspection. It does not open, save, or publish the page in a browser.
Example: safe pricing-page task
get_storefront_summarylist_productswithinclude_plans: truelist_link_targetsfor product/checkout targetscreate_pageas a draftlist_docsandread_docslist_libraryfor hero, pricing, and FAQadd_componentget_page_contextupdate_text,update_classes, andset_component_linkupdate_page_settingsfor SEO- Re-read the page and leave it unpublished for human Preview
Example: safe translation update
list_localeslist_translationsget_translationfor each target keyset_translationonly for intended localesget_translationagain to verify- Leave unrelated locale values unchanged
Reporting
A connected assistant should report:
- page ID and title;
- component IDs or labels changed;
- settings or locales changed;
- whether the page remains draft or is published;
- verification performed;
- any user decision still required.
It must never claim success when a tool returned an error.