3.9 KiB
name, description
| name | description |
|---|---|
| laysite-mcp | Design or revise website pages as LaySite drafts through its MCP server. Use when asked to create a site page, choose a template, assemble reusable components, or hand a draft over for editing in the LaySite visual canvas. |
LaySite MCP
Use the configured LaySite MCP connection to the target site's /mcp endpoint. The server uses Streamable HTTP with a Bearer token. Keep the token in the client's credential configuration. Follow the repository's MCP setup if the connection is missing.
Work with drafts
- Call
list_pages,list_templates, andlist_designs. Useget_pageto inspect the page being revised and related site pages. Confirm the intended site and use the exact template keys and design IDs the server returns. - For a new page, call
create_draftwith a unique lowercase slug and a descriptive name. Passtemplateto start from a whole-page template. Keep the layout and content that fit the task. - For a revision, read the draft using
get_pagebefore callingsave_draftwith its latestversion. Send only the fields that changed. When sendingsections, include every section intended to remain, in display order. Keep existing keys and reconstruct dynamic feeds with their component'spresetwhen that preset represents the current configuration. If the feed has custom settings the MCP schema cannot express, keep the existing section list and leave that adjustment for the canvas. - Read the draft back. Check content, section order, button destinations, design selections and image descriptions. Open the returned preview when the administrator session is available. Pass the returned
editorandpreviewlinks to the human editor for refinement and publishing.
Treat a version conflict as a signal to reread the draft and reconcile any intervening changes. Leave published pages, shared headers and footers, and site settings under human control. For a published page revision, create a separate draft when the user wants a reviewable version.
Keep page design consistent
- Follow the existing site's palette, spacing, button styles, navigation and terminology. Start with a matching template or reusable component. Use
header_id,footer_id, andpalette_idonly when the task calls for a specific saved design. - Give the page one clear primary heading and one primary action. Use each section's title as its heading, then start headings in the body at
h3. Use semantic paragraphs, lists, links, figures and tables. Write meaningful labels and use the visitor's language. - Reuse LaySite's CSS classes for buttons and components. Use plain, sanitizable HTML for custom bodies, and keep everything editable in the canvas. Keep scripts, event handlers, inline CSS and embedded forms out of draft markup. Check that the design can stack on narrow screens and stays readable at mobile widths.
- For hero actions, send
[href, label, style, opensNewTab]. Usesolidfor the primary action andoutline,underline, orplainfor secondary actions. Internal links normally open in the same tab. - Use stable, unique section keys such as
getting-started. Reservehome,contact,main-content,primary-navigation, andpreviewfor the application. Confirm destinations exist and use descriptive alt text for informative images. - Keep SEO titles and summaries specific to the page. Use provided facts, assets, links and claims. Flag missing dates, prices, contact details or media in the handoff.
Source changes
When the user asks to extend LaySite itself, follow its repository instructions. Use Webman controllers, PHP views, SQLite migrations when changing persisted data, native CSS and the existing jQuery handlers. Reuse the template registry, canvas and sanitizer. Store built-in previews as system assets and keep uploads in the user media library. Keep page-theme assets conditional and keep public routes, status codes and backups aligned with data changes.