list_generated_videos
Retrieve a paginated list of AI-generated videos created through the NoLang MCP Server, allowing users to view and manage their video generation history.
Instructions
Return a paginated list of videos you have generated.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | Yes |
Implementation Reference
- nolang_mcp/server.py:159-177 (handler)The @mcp.tool decorator and handler function implementing the list_generated_videos tool, which lists generated videos by calling the API and mapping to VideoSummary objects.@mcp.tool( name="list_generated_videos", description="Return a paginated list of videos you have generated.", ) 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
- nolang_mcp/models.py:286-292 (schema)Pydantic schema for input arguments (ListVideosArgs) defining the page parameter.class ListVideosArgs(BaseModel): """Arguments for listing videos.""" model_config = ConfigDict(extra="forbid") page: int = Field(default=1, description="Page number to retrieve", ge=1)
- nolang_mcp/models.py:327-334 (schema)Pydantic schema for output result (ListVideosResult) including pagination info and list of VideoSummary.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")
- nolang_mcp/models.py:319-325 (schema)Supporting Pydantic schema VideoSummary used in the ListVideosResult.class VideoSummary(BaseModel): model_config = ConfigDict(extra="allow") video_id: UUID = Field(..., description="Unique identifier for the video") created_at: datetime = Field(..., description="Creation timestamp of the video") prompt: Optional[str] = Field(None, description="Original prompt used to generate the video")