create_blog
Generate a blog post on your website using AI. Describe the content and optionally schedule it for later publication.
Instructions
Create an AI-generated blog post on a website.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| website_id | Yes | The website ID | |
| prompt | Yes | Describe the blog post to create | |
| schedule_at | No | Optional ISO 8601 datetime to schedule for later |
Implementation Reference
- server/index.js:602-617 (handler)The main handler function that executes the 'create_blog' tool logic. It accepts website_id (required), prompt (required), and schedule_at (optional ISO 8601 datetime). It calls the API endpoint POST /v1/ai/workspace/website/{website_id}/blog with the prompt and optional schedule_at, then returns the result as JSON text.
server.tool( "create_blog", "Create an AI-generated blog post on a website.", { website_id: z.string().describe("The website ID"), prompt: z.string().describe("Describe the blog post to create"), schedule_at: z.string().optional().describe("Optional ISO 8601 datetime to schedule for later"), }, { title: "Create Blog Post", readOnlyHint: false, destructiveHint: false, openWorldHint: true }, async ({ website_id, prompt, schedule_at }) => { const body = { prompt }; if (schedule_at) body.schedule_at = schedule_at; const data = await apiCall(`/v1/ai/workspace/website/${website_id}/blog`, "POST", body); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } ); - server/index.js:605-609 (schema)Input schema for the create_blog tool. Defines three parameters: website_id (string, required), prompt (string, required - describes the blog post to create), and schedule_at (string, optional - ISO 8601 datetime for scheduling).
{ website_id: z.string().describe("The website ID"), prompt: z.string().describe("Describe the blog post to create"), schedule_at: z.string().optional().describe("Optional ISO 8601 datetime to schedule for later"), }, - server/index.js:602-617 (registration)The tool is registered via server.tool() with the name 'create_blog', a description 'Create an AI-generated blog post on a website.', metadata { title: 'Create Blog Post', readOnlyHint: false, destructiveHint: false, openWorldHint: true }, and the async handler function.
server.tool( "create_blog", "Create an AI-generated blog post on a website.", { website_id: z.string().describe("The website ID"), prompt: z.string().describe("Describe the blog post to create"), schedule_at: z.string().optional().describe("Optional ISO 8601 datetime to schedule for later"), }, { title: "Create Blog Post", readOnlyHint: false, destructiveHint: false, openWorldHint: true }, async ({ website_id, prompt, schedule_at }) => { const body = { prompt }; if (schedule_at) body.schedule_at = schedule_at; const data = await apiCall(`/v1/ai/workspace/website/${website_id}/blog`, "POST", body); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } );