create_website
Create a website using AI from a text description. Optionally assign to a client by ID or email, or create a new client.
Instructions
Create a new website using AI. Optionally assign to a client by providing client_id (existing) or client_email (lookup or create new).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Describe the website to create | |
| schedule_at | No | Optional ISO 8601 datetime to schedule for later | |
| client_id | No | Existing client ID to assign the website to | |
| client_email | No | Client email. Looks up existing client or creates a new one. | |
| client_name | No | Client name, used when creating a new client with client_email. |
Implementation Reference
- server/index.js:316-327 (handler)The handler function that executes the 'create_website' tool logic. It builds a request body with prompt and optional scheduling/client fields, then calls the API endpoint /v1/ai/workspace/website via POST.
async ({ prompt, schedule_at, client_id, client_email, client_name }) => { const body = { prompt }; if (schedule_at) body.schedule_at = schedule_at; if (client_id || client_email) { body.client = {}; if (client_id) body.client.client_id = client_id; if (client_email) body.client.email = client_email; if (client_name) body.client.name = client_name; } const data = await apiCall("/v1/ai/workspace/website", "POST", body); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } - server/index.js:309-314 (schema)Zod schema definitions for the create_website tool inputs. Fields: prompt (required string), schedule_at (optional ISO datetime), client_id (optional string), client_email (optional string), client_name (optional string).
prompt: z.string().describe("Describe the website to create"), schedule_at: z.string().optional().describe("Optional ISO 8601 datetime to schedule for later"), client_id: z.string().optional().describe("Existing client ID to assign the website to"), client_email: z.string().optional().describe("Client email. Looks up existing client or creates a new one."), client_name: z.string().optional().describe("Client name, used when creating a new client with client_email."), }, - server/index.js:305-328 (registration)Registration of the 'create_website' tool on the MCP server via server.tool(), including description, options (title, readOnlyHint, destructiveHint, openWorldHint), and the handler.
server.tool( "create_website", "Create a new website using AI. Optionally assign to a client by providing client_id (existing) or client_email (lookup or create new).", { prompt: z.string().describe("Describe the website to create"), schedule_at: z.string().optional().describe("Optional ISO 8601 datetime to schedule for later"), client_id: z.string().optional().describe("Existing client ID to assign the website to"), client_email: z.string().optional().describe("Client email. Looks up existing client or creates a new one."), client_name: z.string().optional().describe("Client name, used when creating a new client with client_email."), }, { title: "Create Website", readOnlyHint: false, destructiveHint: false, openWorldHint: true }, async ({ prompt, schedule_at, client_id, client_email, client_name }) => { const body = { prompt }; if (schedule_at) body.schedule_at = schedule_at; if (client_id || client_email) { body.client = {}; if (client_id) body.client.client_id = client_id; if (client_email) body.client.email = client_email; if (client_name) body.client.name = client_name; } const data = await apiCall("/v1/ai/workspace/website", "POST", body); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } ); - server/index.js:112-123 (helper)The apiCall helper function used by the create_website 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(); }