page.update
Updates an existing page. SUPPORTS DIRECT RAW HTML/CSS/JS INJECTION: Pass 'html', 'css', and optional browser-side 'js' (executed in an isolated sandboxed iframe with restrictive CSP) to update or replace the page content with custom handwritten HTML, scoped CSS, and interactive JavaScript (e.g. calculators, quizzes, dynamic product experiences, personal portfolio showcase, custom landing page). You can also pass 'prompt' to have HamroLink automatically style or rewrite the page using site theme tokens and declarative SDK attributes (data-hl-contact, data-hl-action).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"siteId": "<siteId>",
"slug": "<slug>"
},
"name": "page.update"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| js | No | Optional browser-side JavaScript for interactive DOM manipulation, event listeners, calculators, quizzes, or animations (executed in an isolated sandboxed iframe with restrictive CSP). | |
| css | No | Direct scoped CSS styling for the custom HTML page. Automatically scoped with PostCSS. | |
| seo | No | SEO title, description, keywords, image, and structuredData schema | |
| html | No | Direct custom HTML markup to update or replace the page content with a custom HTML/CSS/JS layout. Automatically sanitized with DOMPurify. | |
| name | No | Updated page name | |
| slug | Yes | Target page slug (e.g. '/' or '/about' or '/portfolio-v2-test') | |
| prompt | No | Instructions or content brief describing what to update or style on the page. | |
| siteId | Yes | MongoDB Site ID | |
| newSlug | No | Optional new URL slug to rename this page (e.g. '/our-services' or '/' to make it the website homepage) | |
| sections | No | Array of section objects to replace page content (optional if 'html' or 'prompt' is provided) | |
| published | No | Publication status (default true) | |
| makeHomePage | No | Set to true to make this page the primary homepage ('/') of the website. The current homepage will be safely archived to '/home-previous'. | |
| rehydrateWithAi | No | Set to true to automatically rewrite or style the page content with AI matching site brand tokens. |