Skip to main content
Glama

spectrogram

Generate a mel spectrogram image from audio files (WAV, FLAC, mp3, ogg) for visual analysis of harmonic content, sweeps, or silence. Optionally annotate with beat, onset, and pitch detections.

Instructions

Render a mel spectrogram (or a tiled contact sheet covering the whole file) from a WAV, FLAC, mp3, or ogg file, for visual inspection of harmonic content, sweeps, or silence. The image comes back inline as MCP image content (base64 PNG) whenever it fits the size cap, so you can look at it directly without filesystem access; pass out_path to also (or instead) write the PNG to disk. Set annotate=true to draw what the analyzers heard onto the image — detected beats (orange ticks, top), onsets (cyan ticks, bottom), pitch segments (magenta lines) — and from_s/to_s to zoom into a time window. Use this when a numeric probe report isn't enough and you want to look at the audio.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
to_sNoOptional: render only up to this time (seconds into the file).
sheetNoTile the piece into a contact sheet instead of one long strip — useful for reviewing a whole piece in one vision call. Default false. Incompatible with annotate.
from_sNoOptional: render only from this time (seconds into the file).
annotateNoDraw analysis overlays (beat grid, onsets, pitch) on the image. Default false.
out_pathNoOptional: also write the PNG here. Required in practice only when the image exceeds the inline size cap (the call says so if that happens).
audio_pathYesPath to the input WAV, FLAC, mp3, or ogg.
bars_per_tileNoTime sections per tile when sheet is true. Default 8.
Behavior5/5

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

With no annotations, the description fully discloses behavior: inline PNG return, optional disk write, annotate overlays, zoom, sheet mode, and incompatibility between sheet and annotate. It also mentions size caps and practical usage notes.

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 well-structured with front-loaded purpose and concise details. Every sentence adds value, though slightly more brevity could be achieved without losing clarity.

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

Completeness4/5

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

Given the tool's complexity and lack of output schema, the description covers all key behaviors: inline vs. disk output, optional analysis overlays, time zoom, and sheet mode. It adequately prepares the agent for common scenarios.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds significant context beyond the schema, such as the purpose of zooming, the meaning of annotate overlays, and the sheet mode's time tiling, making parameter selection more informed.

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

Purpose5/5

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

The description clearly states the tool renders a mel spectrogram for visual inspection of audio files, distinguishing it from numeric analysis tools like probe_audio. It specifies the supported audio formats and the primary use case, making it easy for the agent to select.

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

Usage Guidelines4/5

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

The description explicitly says to use this tool when a numeric report isn't enough and visual inspection is needed, implying alternatives for other scenarios. While it could be more explicit about when not to use, it provides clear context.

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/richer-richard/cochlea'

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