Skip to main content
Glama

audio_spectrogram

Generate a spectrogram PNG from an authorized local audio segment to visualize frequency content over time and inspect amplitude levels for audio analysis.

Instructions

Return a spectrogram PNG of an authorized local segment (0.25–30 s). Time left to right, frequency bottom 0 Hz to top floor(max_hz/15.625)*15.625 Hz. Dark navy -90 dBFS to pale yellow 0 dBFS, Hann amplitude estimates; up to 900 time columns. Use sense_audio for numeric evidence. Image is sent to the host/model.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "audio_spectrogram"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
max_hzNo
start_sNo
duration_sNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the accepted segment length range, the frequency bin rounding rule (floor(max_hz/15.625)*15.625), the amplitude/color mapping in dBFS, Hann-window estimates, a resolution ceiling of 900 time columns, and the side effect that the image is delivered to the host/model. That is unusually rich behavioral context for an unannotated tool.

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?

Front-loads the resource and the key constraint, then packs axes, scale, windowing, and resolution into short sentences with no filler. The axis sentence is dense to the point of being cryptic ('top floor(max_hz/15.625)*15.625 Hz'), costing a little readability.

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?

No output schema exists, and the description covers the return artifact well (PNG, orientation, color/dB scale, column cap, delivery to host). Remaining gaps are modest: start_s semantics, failure behavior for out-of-range durations, and what 'authorized' implies are left unstated.

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 0%, so the description must compensate; it adds real meaning for max_hz (rounded to 15.625 Hz multiples, top of the axis) and duration_s (0.25–30 s bounds, default-relevant). start_s and path receive no added semantics beyond 'authorized local segment', leaving two of four parameters thinner than ideal.

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?

States a specific verb and output artifact ('Return a spectrogram PNG') scoped to 'an authorized local segment (0.25–30 s)', which immediately separates it from the numeric sibling it names. An agent can distinguish this from sense_audio without opening either schema.

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?

Explicitly routes numeric needs to sense_audio ('Use sense_audio for numeric evidence'), implying this tool is for visual inspection. It lacks an explicit when-not clause and gives no guidance relative to other visual siblings like view_frame or inspect_region.

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