publish_page
Publish a static page on a website with HTML content, custom URL path, and SEO title.
Instructions
Publish a static page with HTML content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| website_id | Yes | The website ID | |
| path | Yes | URL path (e.g. /about) | |
| page_content | Yes | Page content in HTML | |
| page_title | Yes | Page title for SEO |
Implementation Reference
- server/index.js:533-551 (registration)Registration of the publish_page tool via server.tool() with its name, description, schema, metadata, and handler.
server.tool( "publish_page", "Publish a static page with HTML content.", { website_id: z.string().describe("The website ID"), path: z.string().describe("URL path (e.g. /about)"), page_content: z.string().describe("Page content in HTML"), page_title: z.string().describe("Page title for SEO"), }, { title: "Publish Page", readOnlyHint: false, destructiveHint: false, openWorldHint: true }, async ({ website_id, path, page_content, page_title }) => { const body = { path, page_content, seo: { page_title }, }; const data = await apiCall(`/v1/workspace/website/${website_id}/pages/create`, "POST", body); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } - server/index.js:543-551 (handler)The async handler function for publish_page that constructs the request body (path, page_content, seo with page_title) and calls the API to create the page.
async ({ website_id, path, page_content, page_title }) => { const body = { path, page_content, seo: { page_title }, }; const data = await apiCall(`/v1/workspace/website/${website_id}/pages/create`, "POST", body); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } - server/index.js:536-542 (schema)Input schema for publish_page defining required parameters: website_id (string), path (string), page_content (string HTML), and page_title (string for SEO).
{ website_id: z.string().describe("The website ID"), path: z.string().describe("URL path (e.g. /about)"), page_content: z.string().describe("Page content in HTML"), page_title: z.string().describe("Page title for SEO"), }, { title: "Publish Page", readOnlyHint: false, destructiveHint: false, openWorldHint: true }, - server/index.js:112-123 (helper)The apiCall helper function used by the publish_page handler to make HTTP requests to the Lindo AI API.
async function apiCall(path, method, body) { const url = `${BASE_URL}${path}`; const res = await fetch(url, { method, headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json", }, ...(body ? { body: JSON.stringify(body) } : {}), }); return res.json(); }