update_page_content
Update an existing webpage by replacing its HTML content. Modify page content and SEO settings for any page on your website.
Instructions
Update the content of an existing page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| website_id | Yes | The website ID | |
| page_id | Yes | The page ID | |
| page_content | Yes | Updated page content in HTML | |
| seo | No | SEO settings object |
Implementation Reference
- server/index.js:554-570 (registration)Registration of the 'update_page_content' tool via server.tool() with name, description, and metadata.
server.tool( "update_page_content", "Update the content of an existing page.", { website_id: z.string().describe("The website ID"), page_id: z.string().describe("The page ID"), page_content: z.string().describe("Updated page content in HTML"), seo: z.record(z.unknown()).optional().describe("SEO settings object"), }, { title: "Update Page Content", readOnlyHint: false, destructiveHint: false, openWorldHint: true }, async ({ website_id, page_id, page_content, seo }) => { const body = { page_content }; if (seo) body.seo = seo; const data = await apiCall(`/v1/workspace/website/${website_id}/pages/${page_id}/update`, "POST", body); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } ); - server/index.js:557-562 (schema)Input schema defining required parameters: website_id (string), page_id (string), page_content (string - HTML), and optional seo (record).
{ website_id: z.string().describe("The website ID"), page_id: z.string().describe("The page ID"), page_content: z.string().describe("Updated page content in HTML"), seo: z.record(z.unknown()).optional().describe("SEO settings object"), }, - server/index.js:564-569 (handler)Handler function that constructs the request body with page_content (and optionally seo), then calls the API endpoint POST /v1/workspace/website/{website_id}/pages/{page_id}/update.
async ({ website_id, page_id, page_content, seo }) => { const body = { page_content }; if (seo) body.seo = seo; const data = await apiCall(`/v1/workspace/website/${website_id}/pages/${page_id}/update`, "POST", body); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; }