Skip to main content
Glama
team-tissis

NoLang MCP Server

by team-tissis

generate_video_with_template

Create videos using existing templates by providing text, documents, audio, or images. This tool generates AI-powered videos through the NoLang API for various content formats.

Instructions

Consumes paid credits. Start video generation using an official template Video ID. Provide text, pdf_path, pptx_path, audio_path, video_path, or image_paths as required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
video_idYesUnique identifier for the queued video

Implementation Reference

  • The handler function that executes the tool logic: fetches video setting data from the provided video_id and calls the shared _generate_video helper.
    async def generate_video_with_template(
        args: VideoGenerationFromVideoArgs,
    ) -> VideoGenerationResult:
        video_setting_data = await nolang_api.get_video_setting_from_video_id(args.video_id)
        return await _generate_video(
            video_setting_data,
            args.text,
            args.pdf_path,
            args.pptx_path,
            args.audio_path,
            args.video_path,
            args.image_paths,
        )
  • The @mcp.tool decorator registering the tool with FastMCP.
    @mcp.tool(
        name="generate_video_with_template",
        description="Consumes paid credits. Start video generation using an official template Video ID. Provide text, pdf_path, pptx_path, audio_path, video_path, or image_paths as required.",
    )
  • Pydantic schema for the tool's input arguments (inherits common VideoGenerationToolArgs fields like text, pdf_path, etc.).
    class VideoGenerationFromVideoArgs(VideoGenerationToolArgs):
        """Arguments for generating video from existing video ID."""
    
        video_id: UUID = Field(
            ...,
            description="ID of existing video to use as template",
        )
  • Shared helper function implementing the core video generation logic by dispatching to appropriate nolang_api methods based on input types.
    async def _generate_video(
        setting: Union[UUID, str, Dict[str, Any]],
        text: str = "",
        pdf_path: str = "",
        pptx_path: str = "",
        audio_path: str = "",
        video_path: str = "",
        image_paths: str = "",
    ) -> VideoGenerationResult:
        """Generate a video and return a structured response."""
    
        try:
            # PDF analysis mode
            if pdf_path and text:
                result = await nolang_api.generate_video_with_pdf_and_text(setting, pdf_path, text)
            # PDF mode
            elif pdf_path:
                result = await nolang_api.generate_video_with_pdf(setting, pdf_path)
            # PPTX mode
            elif pptx_path:
                result = await nolang_api.generate_video_with_pptx(setting, pptx_path)
            # Audio mode
            elif audio_path:
                result = await nolang_api.generate_video_with_audio(setting, audio_path)
            # Video mode
            elif video_path:
                result = await nolang_api.generate_video_with_video(setting, video_path)
            # Text mode (with/without images)
            elif text:
                image_files = None
                if image_paths:
                    image_files = [p.strip() for p in image_paths.split(",") if p.strip()]
                result = await nolang_api.generate_video_with_text(setting, text, image_files)
            else:
                raise ValueError("At least one of text, pdf_path, pptx_path, audio_path or video_path must be provided")
    
            return VideoGenerationResult(video_id=result.video_id)
        except httpx.HTTPStatusError as e:
            # Surface HTTP errors back to the LLM as a structured object
            raise RuntimeError(format_http_error(e)) from e
        except FileNotFoundError as e:
            raise RuntimeError(str(e)) from e
Behavior2/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 mentions 'Consumes paid credits' which is valuable cost information, but doesn't address critical behaviors like whether this is an asynchronous operation (implied by 'wait_video_generation_and_get_download_url' sibling), what permissions are needed, rate limits, or what happens when generation fails. The description is incomplete for a tool that likely involves significant processing.

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 appropriately concise with two sentences. The first sentence provides critical cost information upfront, and the second lists input types efficiently. However, the second sentence could be structured more clearly to indicate these are alternative input options rather than all being required simultaneously.

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

Completeness2/5

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

Given this is a complex video generation tool with 1 parameter (though nested with multiple properties), 0% schema description coverage, no annotations, but with an output schema, the description is inadequate. It doesn't explain the relationship between input types and generation modes, doesn't mention the asynchronous nature implied by sibling tools, and leaves too much undefined for proper agent understanding.

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

Parameters2/5

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

The schema description coverage is 0%, so the description must compensate. It lists parameter types ('text, pdf_path, pptx_path, audio_path, video_path, or image_paths') but provides no semantic context about when each is required, what 'modes' exist, or how they interact with the video_id. The description adds minimal value beyond what can be inferred from parameter names alone.

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

Purpose3/5

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

The description states the tool 'Start video generation using an official template Video ID' which provides a verb ('Start video generation') and resource ('template Video ID'), but it's vague about what 'official template' means and doesn't clearly distinguish from sibling tools like 'generate_video_with_setting'. The mention of consuming credits adds context but doesn't clarify the core purpose.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'generate_video_with_setting' or 'recommend_templates'. It lists input types but doesn't explain which modes or scenarios require which inputs, leaving the agent with insufficient context for tool selection.

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/team-tissis/nolang-mcp'

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