Skip to main content
Glama
team-tissis

NoLang MCP Server

by team-tissis

recommend_templates

Find official templates for video creation by specifying video mode and optional search terms. Supports various formats including slideshows, audio, and query-based videos.

Instructions

Recommend official templates based on video mode and optional query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
templatesYesList of recommended template summaries

Implementation Reference

  • The main handler function for the 'recommend_templates' tool. It takes TemplateRecommendationArgs, calls the nolang_api to recommend templates based on video_mode, query, and is_mobile_format, processes the response into TemplateSummary objects, and returns TemplateRecommendationResult.
    async def recommend_templates(
        args: TemplateRecommendationArgs,
    ) -> TemplateRecommendationResult:
        try:
            response = await nolang_api.recommend_template(
                args.video_mode,
                args.query or None,
                args.is_mobile_format if args.is_mobile_format else None,
            )
            templates = [
                TemplateSummary(
                    template_video_id=t.template_video_id,
                    title=t.title,
                    description=t.description or None,
                )
                for t in response.templates
            ]
            return TemplateRecommendationResult(templates=templates)
        except httpx.HTTPStatusError as e:
            raise RuntimeError(format_http_error(e)) from e
  • The @mcp.tool decorator that registers the recommend_templates handler function with the given name and description.
    @mcp.tool(
        name="recommend_templates",
        description="Recommend official templates based on video mode and optional query.",
    )
  • Pydantic schema for input arguments to the recommend_templates tool: video_mode (required VideoModeEnum), query (optional str), is_mobile_format (optional bool).
    class TemplateRecommendationArgs(BaseModel):
        """Arguments for getting template recommendations."""
    
        model_config = ConfigDict(extra="forbid")
    
        video_mode: VideoModeEnum = Field(
            ...,
            description="Target mode for template recommendations",
        )
        query: str = Field(
            default="",
            description="User input text for template recommendations",
        )
        is_mobile_format: bool = Field(
            default=False,
            description="Set to True to target mobile format templates",
        )
  • Pydantic schema for the output of the recommend_templates tool: list of TemplateSummary objects.
    class TemplateRecommendationResult(BaseModel):
        model_config = ConfigDict(extra="allow")
    
        templates: List[TemplateSummary] = Field(..., description="List of recommended template summaries")
  • Pydantic schema for individual template summaries returned in the result.
    class TemplateSummary(BaseModel):
        model_config = ConfigDict(extra="allow")
    
        template_video_id: UUID = Field(..., description="Unique identifier for the template video")
        title: str = Field(..., description="Title of the template video")
        description: Optional[str] = Field(None, description="Description of the template video")
Behavior2/5

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

With no annotations provided, the description carries full burden but reveals minimal behavioral traits. It mentions 'recommend' but doesn't disclose whether this is a read-only operation, requires authentication, has rate limits, or what the recommendation output entails. The description doesn't contradict annotations (none exist), but offers inadequate behavioral context.

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 a single, efficient sentence that front-loads the core purpose. Every word earns its place with no redundancy or unnecessary elaboration, making it easy to parse quickly.

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 0% schema coverage and no annotations, the description is minimal but covers the primary use case. An output schema exists, so return values needn't be explained. However, for a tool with one parameter object containing three fields, more detail on parameter interactions or behavioral context would improve 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 0%, so the description must compensate. It mentions 'video mode' and 'optional query', aligning with the schema's required 'video_mode' and optional 'query' parameters, but omits 'is_mobile_format'. The description adds basic meaning but doesn't fully compensate for the coverage gap, especially for the boolean parameter.

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 clearly states the action ('Recommend') and resource ('official templates'), specifying the primary input ('video mode') and optional input ('query'). It distinguishes from siblings by focusing on template recommendation rather than video generation or listing, though it doesn't explicitly contrast with them.

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 when template recommendations are needed based on video mode, but provides no explicit guidance on when to use this tool versus alternatives like 'generate_video_with_template' or 'list_video_settings'. 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/team-tissis/nolang-mcp'

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