Skip to main content
Glama
team-tissis

NoLang MCP Server

by team-tissis

list_generated_videos

Retrieve a paginated list of AI-generated videos created through the NoLang API for easy management and access to your video content.

Instructions

Return a paginated list of videos you have generated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsYes

Implementation Reference

  • The handler function that executes the list_generated_videos tool logic, fetching videos via API and formatting results.
    async def list_generated_videos(args: ListVideosArgs) -> ListVideosResult:
        try:
            response = await nolang_api.list_videos(args.page)
            summaries = [
                VideoSummary(video_id=v.video_id, created_at=v.created_at, prompt=v.prompt or "") for v in response.results
            ]
            return ListVideosResult(
                total_videos=response.total_count,
                page=args.page,
                has_next=response.has_next,
                videos=summaries,
            )
        except httpx.HTTPStatusError as e:
            raise RuntimeError(format_http_error(e)) from e
  • Registers the list_generated_videos tool in the FastMCP server.
    @mcp.tool(
        name="list_generated_videos",
        description="Return a paginated list of videos you have generated.",
    )
  • Pydantic schema for input arguments to the list_generated_videos tool.
    class ListVideosArgs(BaseModel):
        """Arguments for listing videos."""
    
        model_config = ConfigDict(extra="forbid")
    
        page: int = Field(default=1, description="Page number to retrieve", ge=1)
  • Pydantic schema for the output result of the list_generated_videos tool.
    class ListVideosResult(BaseModel):
        model_config = ConfigDict(extra="allow")
    
        total_videos: int = Field(..., description="Total number of videos matching the criteria")
        page: int = Field(..., description="Current page number")
        has_next: bool = Field(..., description="True if there is another page of results")
        videos: List[VideoSummary] = Field(..., description="List of video summaries")
  • Helper method in NoLangAPI client that retrieves the paginated list of generated videos from the API.
    async def list_videos(self, page: int = 1) -> VideoListResponse:
        response_data = await self._get("/videos/", params={"page": page})
        return VideoListResponse(**response_data)

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