page.create
Creates and publishes a new page on an existing website and links it to the navbar. Exact pre-built templates exist for /blog (live blog API), /about, /services, /contact, /privacy, and /terms. For all other page intents (e.g. personal portfolio showcases, facility tours, admissions, team, custom landing pages, interactive calculators/quizzes, product catalogs), HamroLink automatically constructs a tailored, theme-aligned custom HTML/CSS page with declarative SDK actions. You can pass 'html', 'css', optional browser-side 'js' (executed in an isolated sandboxed iframe), or 'prompt' directly.
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>",
"name": "<name>",
"slug": "<slug>"
},
"name": "page.create"
}
}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 | Optional scoped CSS styling for the custom HTML page. | |
| seo | No | SEO title, description, keywords, image, and structuredData schema | |
| html | No | Optional raw custom HTML content. When provided, creates a custom HTML/CSS/JS page. | |
| name | Yes | Name of the new page (e.g. 'Portfolio V2', 'Blog', 'About Us', 'Facility', 'Scholarships') | |
| slug | Yes | URL slug for the new page (e.g. '/portfolio-v2', '/blog', '/about', '/facility', '/scholarships') | |
| prompt | No | Optional instructions or content brief describing what to build on the custom page (e.g. 'Personal portfolio showcase with projects and interactive contact form' or 'School science lab and campus facilities'). | |
| siteId | Yes | MongoDB Site ID | |
| sections | No | Optional. Leave omitted to automatically use HamroLink's pre-built template or custom synthesis. Only provide if constructing custom sections, and include complete data for each section. | |
| published | No | Set true to publish immediately | |
| templateId | No | Template layout key. Use 'blank_html' for an empty custom HTML/CSS/JS canvas page, or 'about'/'services'/'contact'/'privacy'/'terms' for exact page templates. | |
| useCustomPrimitives | No | Set true only if the user explicitly requests custom primitives instead of the standard template. |