Skip to main content
Glama

download_from_youtube

Download audio files directly from YouTube URLs using this tool. Ideal for analyzing local audio files, it returns the path to the downloaded file without revealing the song name.

Instructions

Downloads a file from a given youtube URL and returns the path to the downloaded file. Be careful, you will never know the name of the song.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
youtube_urlYes

Implementation Reference

  • The handler function decorated with @mcp.tool(), which registers the tool and implements the download logic using pytubefix to fetch audio-only stream from YouTube and save it to a temporary directory.
    def download_from_youtube(youtube_url: str) -> str: """ Downloads a file from a given youtube URL and returns the path to the downloaded file. Be careful, you will never know the name of the song. """ yt = YouTube(youtube_url) ys = yt.streams.get_audio_only() path = ys.download(filename=yt.video_id + ".mp4", output_path=tempfile.gettempdir()) return path

Other Tools

Related Tools

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/hugohow/mcp-music-analysis'

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