Skip to main content
Glama

recommend_templates

Suggests official video templates by analyzing video mode and optional search criteria to help users find appropriate starting points for video creation.

Instructions

Recommend official templates based on video mode and optional query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsYes

Implementation Reference

  • The main handler function for the 'recommend_templates' tool. It takes TemplateRecommendationArgs, calls nolang_api.recommend_template, processes the response into TemplateSummary objects, and returns a 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
  • Registration of the 'recommend_templates' tool using the FastMCP @mcp.tool decorator, specifying the name and description.
    @mcp.tool( name="recommend_templates", description="Recommend official templates based on video mode and optional query.", )
  • Pydantic model defining the input arguments for the 'recommend_templates' tool: video_mode (required), query (optional), is_mobile_format (optional).
    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 model defining the output result for the 'recommend_templates' tool: a list of TemplateSummary objects.
    class TemplateRecommendationResult(BaseModel): model_config = ConfigDict(extra="allow") templates: List[TemplateSummary] = Field(..., description="List of recommended template summaries")

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