schedule_content
Schedule social media posts for LinkedIn, Instagram, X, or TikTok by specifying content, platform, and date/time to save to a publishing queue.
Instructions
Save content to the publishing queue (content-queue.json). Stores the post with platform, scheduled date/time, and status.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | The post content to schedule | |
| platform | Yes | Target platform | |
| scheduled_date | Yes | Scheduled date (YYYY-MM-DD) | |
| scheduled_time | No | Scheduled time (HH:MM, default 09:00) | 09:00 |
Implementation Reference
- src/index.ts:903-935 (handler)The handler function for schedule_content which reads the current queue, creates a new queue item, adds it, and writes the updated queue to the file.
async ({ content, platform, scheduled_date, scheduled_time }) => { const queue = readQueue(); const item: QueueItem = { id: generateId(), content, platform, scheduled_date, scheduled_time, status: "pending", created_at: new Date().toISOString(), }; queue.push(item); writeQueue(queue); const output = [ "Contenu ajoute a la file d'attente !", "", `ID: ${item.id}`, `Plateforme: ${platform}`, `Date: ${scheduled_date} a ${scheduled_time}`, `Statut: pending`, `Longueur: ${content.length} caracteres`, "", `Total en file: ${queue.length} posts`, `Fichier: ${QUEUE_FILE}`, ].join("\n"); return { content: [{ type: "text" as const, text: output }], }; }, ); - src/index.ts:888-902 (registration)The registration of the schedule_content tool with its title, description, and input schema.
server.registerTool( "schedule_content", { title: "Schedule Content", description: "Save content to the publishing queue (content-queue.json). " + "Stores the post with platform, scheduled date/time, and status.", inputSchema: { content: z.string().describe("The post content to schedule"), platform: z.enum(["linkedin", "instagram", "x", "tiktok"]).describe("Target platform"), scheduled_date: z.string().describe("Scheduled date (YYYY-MM-DD)"), scheduled_time: z.string().default("09:00").describe("Scheduled time (HH:MM, default 09:00)"), }, annotations: { readOnlyHint: false, openWorldHint: false, destructiveHint: false }, },