Skip to main content
Glama
ilhankilic

YaparAI MCP Server

by ilhankilic

generate_caption

Create platform-optimized social media captions for any topic. AI generates captions in multiple languages and tones for Instagram, Facebook, TikTok, or Twitter.

Instructions

Generate an AI-powered social media caption.

Creates engaging, platform-optimized captions using AI. Supports multiple languages and tones.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYesWhat the post is about (e.g., "new summer collection launch")
platformNoTarget platform ("instagram", "facebook", "tiktok", "twitter")instagram
languageNoCaption language ("tr" for Turkish, "en" for English)tr
toneNoWriting tone ("professional", "casual", "fun", "formal")professional
org_idNoOrganization ID (uses YAPARAI_ORG_ID env var if not provided)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main handler function for the 'generate_caption' tool. Accepts topic, platform, language, tone, and org_id parameters. Calls the YaparAIClient.social_generate_caption method.
    async def generate_caption(
        topic: str,
        platform: Platform = "instagram",
        language: Literal["tr", "en"] = "tr",
        tone: Literal["professional", "casual", "fun", "formal"] = "professional",
        org_id: str | None = None,
    ) -> dict:
        """
        Generate an AI-powered social media caption.
    
        Creates engaging, platform-optimized captions using AI.
        Supports multiple languages and tones.
    
        Args:
            topic: What the post is about (e.g., "new summer collection launch")
            platform: Target platform ("instagram", "facebook", "tiktok", "twitter")
            language: Caption language ("tr" for Turkish, "en" for English)
            tone: Writing tone ("professional", "casual", "fun", "formal")
            org_id: Organization ID (uses YAPARAI_ORG_ID env var if not provided)
    
        Returns:
            Dict with generated caption text.
        """
        oid = resolve_org_id(org_id)
        client = YaparAIClient()
        return await client.social_generate_caption(oid, {
            "topic": topic,
            "platform": platform,
            "language": language,
            "tone": tone,
        })
  • Registration of generate_caption as an MCP tool via mcp.tool() decorator in the server setup.
    mcp.tool(generate_caption)
  • The function signature acts as the input schema: topic (str), platform (Literal instagram/facebook/tiktok/twitter), language (Literal tr/en), tone (Literal professional/casual/fun/formal), org_id (optional str).
    async def generate_caption(
        topic: str,
        platform: Platform = "instagram",
        language: Literal["tr", "en"] = "tr",
        tone: Literal["professional", "casual", "fun", "formal"] = "professional",
  • Client helper method social_generate_caption that makes the HTTP POST request to the /api/enterprise/orgs/{org_id}/social/caption/generate endpoint.
    async def social_generate_caption(self, org_id: str, payload: dict) -> dict:
        """Generate AI caption for social post."""
        return await self._request(
            "POST", f"/api/enterprise/orgs/{org_id}/social/caption/generate", json=payload
        )
  • Import of generate_caption from yaparai.tools.social module into server.py.
    from yaparai.tools.social import (
        list_social_accounts,
        create_social_post,
        list_social_posts,
        get_social_quota,
        generate_caption,
        generate_hashtags,
        list_inbox,
        read_conversation,
        reply_to_message,
        ai_reply_suggestion,
    )
Behavior3/5

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

With no annotations, the description carries full burden. It mentions AI-powered generation, platform optimization, and language/tone support. However, it does not disclose limitations, required permissions, or potential quality variations. The org_id parameter and env var fallback are transparent.

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?

Two sentences, front-loaded, no wasted words. The first sentence captures the core action, and the second adds value by highlighting key features.

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?

The description is complete enough given the full schema and presence of an output schema. However, it does not explicitly state what the tool returns (e.g., the generated caption text), though the output schema likely covers this. Minor gap.

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 coverage is 100%, so baseline is 3. The description says 'supports multiple languages and tones' but this adds no new meaning beyond what the schema already provides for language and tone parameters. No extra parameter semantics.

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 'Generate an AI-powered social media caption', which is specific and distinct from sibling tools like generate_hashtags or generate_text. It also mentions platform optimization, further clarifying its purpose.

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 implies it is for creating captions for social media posts but provides no explicit guidance on when to use this tool versus alternatives or when not to use it. No exclusions or prerequisites are mentioned.

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