Skip to main content
Glama
easyhak

YouTube Search & Download MCP Server

by easyhak

validate_provider

Check if the YouTube search provider functions correctly to ensure reliable video search and download operations within the MCP server environment.

Instructions

Validate that the YouTube search provider is working correctly.

Returns: JSON with validation status and provider information

Example: validate_provider()

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The implementation of the validate_provider tool, which checks the status of the search provider and returns a JSON response.
    @mcp.tool()
    async def validate_provider() -> str:
        """
        Validate that the YouTube search provider is working correctly.
    
        Returns:
            JSON with validation status and provider information
    
        Example:
            validate_provider()
        """
        try:
            provider = get_search_provider()
            is_valid = await provider.validate_connection()
    
            return json.dumps(
                {
                    "valid": is_valid,
                    "provider": "yt-dlp",
                    "status": "operational" if is_valid else "error",
                },
                indent=2,
            )
        except Exception as e:
            logger.error(f"Provider validation failed: {e}")
            return json.dumps(
                {"valid": False, "provider": "yt-dlp", "status": "error", "error": str(e)}, indent=2
            )
  • The function that registers the utility tools, including validate_provider, with the MCP server.
    def register_utility_tools(mcp: FastMCP) -> None:

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/easyhak/youtube-search-mcp'

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