Content Publishing & Scheduling

This example demonstrates a simple workflow to publish and schedule content to social media platforms using the MCP server.

Basic Workflow

User: List all my users

AI: [Calls get-users-by-tenant-app]
Here are all your users:

1. John Smith (john.smith@example.com)
   - ID: user-123-abc-456-def
   - Created: January 15, 2025

2. Sarah Johnson (sarah.j@example.com)
   - ID: user-789-ghi-101-jkl
   - Created: February 3, 2025

User: List all user accounts Sarah Johnson have

AI: [Calls get-user-accounts with user_id]
Sarah Johnson (sarah.j@example.com) has the following user accounts:

1. Instagram
   - ID: acct-456-insta-789
   - Platform Account ID: 123456789012345
   - Last refreshed: May 10, 2025
   - Status: Active

User: Show me profile details

AI: [Calls fetch-profiles with user_account_id]
Here are the profile details for Sarah's Instagram account:

Profile Information:
- Username: sarah_johnson_official
- Display Name: Sarah Johnson
- Platform: Instagram
- URL: https://www.instagram.com/sarah_johnson_official
- Description: Digital marketing specialist | Photography enthusiast

Statistics:
- Followers: 2,450
- Following: 856
- Content Count: 128
- Joined: January 2025

User: Publish a new post to this account with this image https://example.com/scenic-view.jpg and title "Morning views are the best views"

AI: [Calls publish-content with required parameters]
Content successfully published to the Instagram account!

Details:
- Type: Instagram Post
- Format: Image
- Title: Morning views are the best views
- Media: Scenic view image
- Visibility: Public
- Job ID: job-123-456-789

User: Now schedule a post to be published tomorrow at 9 AM with the image https://example.com/product-launch.jpg and quote in the title

AI: [Calls publish-content with scheduled_for parameter]
I've successfully scheduled a post for Sarah's Instagram account.

Post Details:
- Type: Instagram Post
- Format: Image
- Title: "Success is not final, failure is not fatal: it is the courage to continue that counts." - Winston Churchill
- Scheduled for: Tomorrow at 09:00 AM
- Job ID: job-987-654-321

The post has been scheduled successfully and will automatically go live at the scheduled time.

Implementation Steps

To implement content publishing functionality, follow these simple steps:
  1. Get Users: Use get-users-by-tenant-app to retrieve all users
  2. Get User Accounts: Use get-user-accounts with the selected user’s ID to retrieve their connected social media accounts
  3. View Profile Details (Optional): Use fetch-profiles with the account ID to get profile information
  4. Publish Content: Use publish-content with the account ID, content type, format, media URL, and title to post immediately
  5. Schedule Content: Use publish-content with the additional scheduled_for parameter to schedule posts for the future (must be at least 10 minutes ahead)

Content Types and Formats

When publishing content, specify the appropriate type and format:
PlatformContent TypeAvailable Formats
InstagramINSTAGRAM_POSTIMAGE, VIDEO
InstagramINSTAGRAM_STORYIMAGE, VIDEO
InstagramINSTAGRAM_REELVIDEO
FacebookFACEBOOK_POSTIMAGE, VIDEO, TEXT
FacebookFACEBOOK_STORYIMAGE, VIDEO
FacebookFACEBOOK_REELVIDEO
LinkedInLINKEDIN_POSTIMAGE, VIDEO, TEXT
Twitter/XX_POSTIMAGE, VIDEO, TEXT
TikTokTIKTOK_VIDEOVIDEO
YouTubeYOUTUBE_VIDEOVIDEO
YouTubeYOUTUBE_SHORTVIDEO

Required MCP Tools

This implementation uses these tools:
  • get-users-by-tenant-app - Lists all users
  • get-user-accounts - Lists user’s social media accounts
  • fetch-profiles - Gets detailed profile information
  • publish-content - Publishes or schedules content to social platforms

Prompt Engineering Tips

When designing prompts for your AI assistant to handle content publishing requests, consider:
  1. Multi-turn conversations - Break down the content creation process into steps
  2. Platform-specific guidance - Suggest optimal content formats for each platform
  3. Preview capabilities - Allow users to visualize how posts will appear before publishing
  4. Scheduling options - Support both immediate posting and future scheduling
  5. Error handling - Provide clear feedback if there are issues with publishing

Advanced Features

To enhance this capability, consider implementing:
  • Content optimization suggestions - Recommend hashtags, image sizes, or text length adjustments
  • Cross-platform content adaptation - Automatically adjust content to match platform-specific requirements
  • Engagement time optimization - Suggest optimal posting times based on audience engagement patterns
  • Content series scheduling - Allow users to schedule multiple related posts as a campaign
  • Draft saving - Let users save content ideas as drafts for later refinement and posting