update_website
Update a website record by providing its ID, then modify the business name or description as needed.
Instructions
Update website details.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| record_id | Yes | Website record ID | |
| business_name | No | Business name | |
| business_description | No | Business description |
Implementation Reference
- server/index.js:354-370 (handler)The 'update_website' tool handler. It accepts record_id (required), business_name (optional), and business_description (optional), then sends a PATCH request to /v1/workspace/website/update with the provided fields.
server.tool( "update_website", "Update website details.", { record_id: z.string().describe("Website record ID"), business_name: z.string().optional().describe("Business name"), business_description: z.string().optional().describe("Business description"), }, { title: "Update Website", readOnlyHint: false, destructiveHint: false, openWorldHint: false }, async ({ record_id, business_name, business_description }) => { const body = { record_id }; if (business_name) body.business_name = business_name; if (business_description) body.business_description = business_description; const data = await apiCall("/v1/workspace/website/update", "PATCH", body); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } ); - server/index.js:354-370 (registration)The 'update_website' tool is registered via server.tool() with all its schema, options, and handler inline.
server.tool( "update_website", "Update website details.", { record_id: z.string().describe("Website record ID"), business_name: z.string().optional().describe("Business name"), business_description: z.string().optional().describe("Business description"), }, { title: "Update Website", readOnlyHint: false, destructiveHint: false, openWorldHint: false }, async ({ record_id, business_name, business_description }) => { const body = { record_id }; if (business_name) body.business_name = business_name; if (business_description) body.business_description = business_description; const data = await apiCall("/v1/workspace/website/update", "PATCH", body); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } ); - server/index.js:357-361 (schema)Input schema for 'update_website': record_id (string, required), business_name (string, optional), business_description (string, optional).
{ record_id: z.string().describe("Website record ID"), business_name: z.string().optional().describe("Business name"), business_description: z.string().optional().describe("Business description"), }, - server/index.js:112-123 (helper)The apiCall helper function that sends authenticated HTTP requests to the Lindo AI API. Used by the handler to make the PATCH request.
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(); }