update_website_settings
Update website settings by specifying the website ID and a settings object with the desired configuration.
Instructions
Update website settings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| website_id | Yes | The website ID | |
| settings | Yes | Settings object |
Implementation Reference
- server/index.js:393-396 (handler)The handler function that executes the 'update_website_settings' tool logic. It calls the API endpoint /v1/workspace/website/{website_id}/settings with a PUT request, sending the settings object as the body, and returns the response as formatted JSON text.
async ({ website_id, settings }) => { const data = await apiCall(`/v1/workspace/website/${website_id}/settings`, "PUT", settings); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } - server/index.js:388-391 (schema)Input schema for the 'update_website_settings' tool using Zod. Defines website_id (string) and settings (record of unknown values) parameters.
{ website_id: z.string().describe("The website ID"), settings: z.record(z.unknown()).describe("Settings object"), }, - server/index.js:385-397 (registration)Registration of the 'update_website_settings' tool with the MCP server, including name, description, schema, metadata (title, hints), and handler.
server.tool( "update_website_settings", "Update website settings.", { website_id: z.string().describe("The website ID"), settings: z.record(z.unknown()).describe("Settings object"), }, { title: "Update Website Settings", readOnlyHint: false, destructiveHint: false, openWorldHint: false }, async ({ website_id, settings }) => { const data = await apiCall(`/v1/workspace/website/${website_id}/settings`, "PUT", settings); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } ); - server/index.js:112-123 (helper)Helper function used by the tool handler to make authenticated API calls to the Lindo AI backend with Bearer token authorization.
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(); }