Skip to main content
Glama

generate_image

Create AI-generated images from text prompts using VAP (Flux2 Pro) technology. Specify aspect ratios and quality settings for customized visual content generation.

Instructions

Generate an AI image from text prompt using VAP (Flux2 Pro). Returns a task ID for async tracking. Cost: $0.18

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesDetailed description of the image to generate. Note: If aspect ratio is mentioned in the prompt (e.g., '16:9', 'widescreen', 'portrait'), also pass it in the aspect_ratio parameter for guaranteed correct dimensions.
aspect_ratioNoOutput image aspect ratio. If the user mentions a specific ratio like '16:9' or 'widescreen' in their prompt, extract and pass it here explicitly for best results.1:1
qualityNoGeneration quality (high costs 1.5x)standard

Implementation Reference

  • Tool handler for MCP request routing; it routes 'generate_image' to the backend API via 'make_request'.
    def handle_tools_call(params: Dict) -> Dict:
        """
        Handle tools/call request.
    
        Directive #240: Special handlers for video tools.
        """
        tool_name = params.get("name", "")
        arguments = params.get("arguments", {})
    
        # ═══════════════════════════════════════════════════════════════════
        # VIDEO TOOL HANDLERS (Directive #240)
        # ═══════════════════════════════════════════════════════════════════
    
        if tool_name == "generate_video":
            return _handle_generate_video(arguments)
    
        if tool_name == "estimate_video_cost":
            return _handle_estimate_video_cost(arguments)
    
        if tool_name == "get_task":
            return _handle_get_task(arguments)
    
        # Default: forward to MCP API
        response = make_request("/tools/call", {
            "name": tool_name,
            "arguments": arguments
        })
        return response
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively adds context beyond the input schema: it specifies the AI model (VAP/Flux2 Pro), reveals async behavior (returns a task ID for tracking), and discloses cost ($0.18). However, it omits details like rate limits, authentication needs, or error handling, keeping it from a perfect score.

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 highly concise and front-loaded, with two sentences that efficiently cover purpose, technology, async behavior, and cost. Every element adds value without redundancy, making it easy for an agent to quickly grasp the tool's essence.

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 moderate complexity (3 parameters, async operation, cost) and lack of annotations/output schema, the description is largely complete. It covers key behavioral aspects like async tracking and cost, but could improve by mentioning output format (e.g., image URL or file type) or error scenarios, slightly limiting completeness.

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%, providing detailed parameter documentation. The description adds minimal semantics beyond the schema, only mentioning cost implications for quality indirectly. It doesn't elaborate on prompt best practices or aspect ratio interactions beyond what's in the schema descriptions, so it meets the baseline for high coverage.

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 specific action ('Generate an AI image'), resource ('from text prompt'), and technology ('using VAP (Flux2 Pro)'), distinguishing it from siblings like generate_music or generate_video. It precisely communicates the core function without being vague or tautological.

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 for AI image generation but provides no explicit guidance on when to use this tool versus alternatives like ai_edit or inpaint. It mentions async tracking via task ID, which hints at use cases requiring follow-up, but lacks clear when/when-not directives or named alternatives for similar tasks.

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/elestirelbilinc-sketch/vap-showcase'

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