Skip to main content
Glama
team-tissis

NoLang MCP Server

by team-tissis

list_video_settings

Retrieve paginated video configuration options from the NoLang MCP Server to customize AI-generated video creation parameters.

Instructions

Return a paginated list of your VideoSettings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsYes

Implementation Reference

  • The main handler function for the 'list_video_settings' MCP tool. It is decorated with @mcp.tool for registration, calls the NoLang API via nolang_api.list_video_settings, processes the response into VideoSettingSummary objects, and returns a ListVideoSettingsResult.
    @mcp.tool(
        name="list_video_settings",
        description="Return a paginated list of your VideoSettings.",
    )
    async def list_video_settings(args: ListVideoSettingsArgs) -> ListVideoSettingsResult:
        try:
            response = await nolang_api.list_video_settings(args.page)
            summaries = [
                VideoSettingSummary(
                    video_setting_id=s.video_setting_id,
                    title=s.title,
                    updated_at=s.updated_at,
                    required_fields=s.request_fields if isinstance(s.request_fields, dict) else {},
                )
                for s in response.results
            ]
            return ListVideoSettingsResult(
                total_settings=response.total_count,
                page=args.page,
                has_next=response.has_next,
                settings=summaries,
            )
        except httpx.HTTPStatusError as e:
            raise RuntimeError(format_http_error(e)) from e
  • Pydantic schema for the input arguments of the list_video_settings tool, defining the 'page' parameter.
    class ListVideoSettingsArgs(BaseModel):
        """Arguments for listing video settings."""
    
        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_video_settings tool.
    class ListVideoSettingsResult(BaseModel):
        model_config = ConfigDict(extra="allow")
    
        total_settings: int = Field(..., description="Total number of video settings")
        page: int = Field(..., description="Current page number")
        has_next: bool = Field(..., description="True if there is another page of results")
        settings: List[VideoSettingSummary] = Field(..., description="List of video setting summaries")
  • Helper method in the NoLangAPI client class that performs the HTTP GET request to retrieve paginated video settings from the API and parses it into VideoSettingsResponse.
    async def list_video_settings(self, page: int = 1) -> VideoSettingsResponse:
        response_data = await self._get("/unstable/video-settings/", params={"page": page})
        return VideoSettingsResponse(**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