Skip to main content
Glama
ilhankilic

YaparAI MCP Server

by ilhankilic

create_social_post

Create and publish social media posts across Instagram, Facebook, TikTok, and Twitter. Supports text, images, videos, and optional scheduling for later.

Instructions

Create and publish a social media post.

Post to Instagram, Facebook, TikTok, Twitter/X and other platforms. Supports text, images, and videos. Requires enterprise subscription.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesPost caption/text content
platformYesTarget platform ("instagram", "facebook", "tiktok", "twitter")
account_idYesSocial account ID (from list_social_accounts)
media_urlsNoOptional list of image/video URLs to attach
scheduled_atNoOptional ISO 8601 datetime to schedule the post (e.g., "2026-05-01T10:00:00Z"). If None, posts immediately.
org_idNoOrganization ID (uses YAPARAI_ORG_ID env var if not provided)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core implementation of the create_social_post tool. Builds a payload dict with text, platform, account_id (and optionally media_urls, scheduled_at), then calls client.social_create_post(oid, payload).
    async def create_social_post(
        text: str,
        platform: Platform,
        account_id: str,
        media_urls: list[str] | None = None,
        scheduled_at: str | None = None,
        org_id: str | None = None,
    ) -> dict:
        """
        Create and publish a social media post.
    
        Post to Instagram, Facebook, TikTok, Twitter/X and other platforms.
        Supports text, images, and videos. Requires enterprise subscription.
    
        Args:
            text: Post caption/text content
            platform: Target platform ("instagram", "facebook", "tiktok", "twitter")
            account_id: Social account ID (from list_social_accounts)
            media_urls: Optional list of image/video URLs to attach
            scheduled_at: Optional ISO 8601 datetime to schedule the post
                          (e.g., "2026-05-01T10:00:00Z"). If None, posts immediately.
            org_id: Organization ID (uses YAPARAI_ORG_ID env var if not provided)
    
        Returns:
            Dict with post_id, status, platform, and published details.
        """
        oid = resolve_org_id(org_id)
        client = YaparAIClient()
        payload: dict = {
            "text": text,
            "platform": platform,
            "account_id": account_id,
        }
        if media_urls:
            payload["media_urls"] = media_urls
        if scheduled_at:
            payload["scheduled_at"] = scheduled_at
        return await client.social_create_post(oid, payload)
  • The Platform type alias (Literal["instagram", "facebook", "tiktok", "twitter"]) used as a parameter type for the create_social_post function.
    Platform = Literal["instagram", "facebook", "tiktok", "twitter"]
  • Registration of create_social_post as an MCP tool via mcp.tool(create_social_post).
    mcp.tool(create_social_post)
  • Imports resolve_org_id from _org helper module, used to resolve the organization ID parameter in create_social_post.
    from yaparai.tools._org import resolve_org_id
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description carries full burden. It discloses that the tool creates and publishes posts and supports media, but does not mention behavioral traits like idempotency, rate limits, or whether the post is immediately visible. This is adequate but could be more comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, consisting of two sentences that front-load the core purpose and key details. Every sentence adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (6 parameters, multiple platforms), the description covers the essential aspects: purpose, platforms, media types, and subscription requirement. It relies on the output schema for return values, which is acceptable. Minor omission: no mention of scheduling or account linking, but those are in the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already explains parameters well. The description adds value by noting the enterprise requirement, but otherwise repeats information available in the schema (platforms, media support). Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: create and publish a social media post. It lists specific platforms (Instagram, Facebook, TikTok, Twitter/X) and supported content types (text, images, videos), distinguishing it from sibling tools like generate_caption or list_social_posts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions the enterprise subscription requirement but provides no explicit guidance on when to use this tool vs alternatives (e.g., generate_caption for caption generation). It implies usage for posting but lacks when-not-to-use or comparative context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/ilhankilic/yaparai-mcp'

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