Skip to main content
Glama

download_from_youtube

Download audio files from YouTube URLs for analysis with the mcp-audio-analysis server. Extract content directly from video links to process locally.

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 main handler function implementing the 'download_from_youtube' tool. It uses pytubefix to download the audio-only stream from a YouTube URL and saves it as an MP4 file in the temp directory, returning the path.
    @mcp.tool()
    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
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions a caution about not knowing the song name, which hints at limitations, but fails to describe critical behaviors such as file format, download location, error handling, or performance traits. For a download tool with zero annotation coverage, this leaves significant gaps in understanding how it operates.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief and front-loaded with the core functionality in the first sentence. The second sentence adds a caution but could be more integrated. Overall, it's efficient with minimal waste, though the warning feels slightly tacked on rather than seamlessly structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a download operation, no annotations, no output schema, and low schema coverage, the description is incomplete. It lacks details on output format (e.g., what the 'path' entails), error conditions, dependencies, or side effects. The caution about song names is insufficient to cover the tool's full context and usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must compensate. It explains that the parameter 'youtube_url' is used to download a file, adding meaning beyond the schema's basic type definition. However, it doesn't detail URL format requirements, validation rules, or examples, leaving some semantic gaps for the single parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Downloads a file from a given youtube URL and returns the path to the downloaded file.' It specifies the verb ('downloads'), resource ('file from a given youtube URL'), and output ('returns the path'). However, it doesn't explicitly differentiate from sibling tools like 'download_from_url' beyond the YouTube-specific context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal guidance: 'Be careful, you will never know the name of the song.' This is a vague warning rather than clear usage instructions. It doesn't specify when to use this tool versus alternatives like 'download_from_url' or other siblings, nor does it outline prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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