Skip to main content
Glama

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
NameRequiredDescriptionDefault
contentYesThe post content to schedule
platformYesTarget platform
scheduled_dateYesScheduled date (YYYY-MM-DD)
scheduled_timeNoScheduled time (HH:MM, default 09:00)09:00

Implementation Reference

  • 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 },
      },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gomessoaresemmanuel-cpu/content-distribution-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server