Skip to main content
Glama

schedule_post

Schedule social media posts for future publication on X, Instagram, or Threads by setting content, platform, and publication time.

Instructions

Schedule a post for future publication

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesPost content
mediaUrlsNoOptional media URLs to attach
platformYes
scheduledForYesISO 8601 datetime (e.g., 2025-10-14T10:00:00Z)

Implementation Reference

  • The handler function that implements the schedule_post tool. It fetches connected accounts, selects the one for the specified platform, calls the Sociona API /schedule endpoint with the provided content and scheduled time, and returns a confirmation message with the scheduled post ID.
    private async schedulePost(args: any) { const { accounts } = await this.apiRequest('GET', '/accounts'); const account = accounts.find((a: any) => a.provider === args.platform); if (!account) { throw new Error(`No ${args.platform} account connected. Available accounts: ${accounts.map((a: any) => a.provider).join(', ')}`); } const result = await this.apiRequest('POST', '/schedule', { accountId: account.id, platform: args.platform, content: args.content, scheduledFor: args.scheduledFor, mediaUrls: args.mediaUrls || [], }); return { content: [ { type: 'text', text: `✅ Post scheduled for ${args.scheduledFor} on ${args.platform}!\nScheduled Post ID: ${result.scheduledPost.id}`, }, ], }; }
  • JSON input schema for the schedule_post tool, defining required properties: platform (enum: X, INSTAGRAM, THREADS), content (string), scheduledFor (ISO 8601 string), and optional mediaUrls (array of strings).
    inputSchema: { type: 'object', properties: { platform: { type: 'string', enum: ['X', 'INSTAGRAM', 'THREADS'], }, content: { type: 'string', description: 'Post content', }, scheduledFor: { type: 'string', description: 'ISO 8601 datetime (e.g., 2025-10-14T10:00:00Z)', }, mediaUrls: { type: 'array', items: { type: 'string' }, description: 'Optional media URLs to attach', }, }, required: ['platform', 'content', 'scheduledFor'], },
  • src/index.ts:56-82 (registration)
    Registration of the schedule_post tool in the ListToolsRequestSchema handler, providing the tool name, description, and inputSchema.
    { name: 'schedule_post', description: 'Schedule a post for future publication', inputSchema: { type: 'object', properties: { platform: { type: 'string', enum: ['X', 'INSTAGRAM', 'THREADS'], }, content: { type: 'string', description: 'Post content', }, scheduledFor: { type: 'string', description: 'ISO 8601 datetime (e.g., 2025-10-14T10:00:00Z)', }, mediaUrls: { type: 'array', items: { type: 'string' }, description: 'Optional media URLs to attach', }, }, required: ['platform', 'content', 'scheduledFor'], }, },
  • src/index.ts:140-141 (registration)
    Dispatch registration in the CallToolRequestSchema switch statement, routing schedule_post calls to the schedulePost handler method.
    case 'schedule_post': return await this.schedulePost(args);

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/fav-devs/sociona-mcp-server'

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