Skip to main content
Glama
ilhankilic

YaparAI MCP Server

by ilhankilic

generate_text

Generate scripts, storyboards, song lyrics, or marketing copy using Gemini AI. Provide a prompt and optional settings for creativity and length.

Instructions

Generate text content using Gemini AI.

Create scripts, storyboards, song lyrics, marketing copy, and more. Powered by Google Gemini. Cost: ~2 credits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesWhat to generate (e.g., "Write a 30-second ad script for a coffee brand")
sub_modeNoGeneration mode — "script" (video/ad scripts), "storyboard" (visual scene descriptions), or "lyrics" (song lyrics)script
temperatureNoCreativity level (0.0 = focused, 1.0 = creative, default 0.7)
max_tokensNoMaximum output length (default 2048)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'generate_text' tool. It accepts parameters (prompt, sub_mode, temperature, max_tokens), creates a YaparAIClient, and delegates to client.gemini_generate().
    async def generate_text(
        prompt: str,
        sub_mode: str = "script",
        temperature: float = 0.7,
        max_tokens: int = 2048,
    ) -> dict:
        """
        Generate text content using Gemini AI.
    
        Create scripts, storyboards, song lyrics, marketing copy, and more.
        Powered by Google Gemini. Cost: ~2 credits.
    
        Args:
            prompt: What to generate (e.g., "Write a 30-second ad script for a coffee brand")
            sub_mode: Generation mode — "script" (video/ad scripts), "storyboard"
                (visual scene descriptions), or "lyrics" (song lyrics)
            temperature: Creativity level (0.0 = focused, 1.0 = creative, default 0.7)
            max_tokens: Maximum output length (default 2048)
    
        Returns:
            Dict with generated text content.
        """
        client = YaparAIClient()
        return await client.gemini_generate({
            "prompt": prompt,
            "sub_mode": sub_mode,
            "temperature": temperature,
            "max_tokens": max_tokens,
        })
  • Imports the generate_text function from the ai tools module.
    from yaparai.tools.ai import (
        generate_text,
        analyze_image,
    )
  • Registers generate_text as an MCP tool via mcp.tool(generate_text).
    mcp.tool(generate_text)
  • Type annotations in the function signature (prompt: str, sub_mode: str = 'script', temperature: float = 0.7, max_tokens: int = 2048) serve as the input schema for the tool.
    """AI tools — text generation, image analysis."""
    
    from __future__ import annotations
    
    from yaparai.client import YaparAIClient
Behavior2/5

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

No annotations are provided, so the description must convey behavioral traits. It mentions cost (~2 credits) but does not disclose whether the tool is read-only, destructive, or any side effects (e.g., token usage, rate limits). For a generative tool, this is a significant gap.

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

Conciseness4/5

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

The description is concise at three sentences, front-loading the core purpose. Each sentence adds value: purpose, examples, cost. No unnecessary words.

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

Completeness3/5

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

Given the tool's complexity (4 parameters, output schema exists), the description covers the basic purpose and examples but lacks usage context, error handling, or return value explanation. The output schema likely covers return values, so the description is minimally adequate.

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 documents all parameters adequately. The description adds no additional meaning beyond the schema; it mentions the sub_mode values implicitly through examples but does not elaborate on temperature or max_tokens.

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

Purpose4/5

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

The description uses a clear verb 'Generate' and specifies the resource 'text content using Gemini AI'. It lists example outputs (scripts, storyboards, lyrics, marketing copy), which helps differentiate from sibling tools like generate_caption (more focused) or generate_hashtags (narrower). However, it does not explicitly state that this is the general-purpose text generation tool, leaving some ambiguity.

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 usage by listing example outputs, but it does not state when to use this tool versus other text-generation siblings (e.g., generate_caption for captions, generate_hashtags for hashtags). No explicit when-not or alternative recommendations are provided.

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