Skip to main content
Glama

compare_audio

Compare reference and candidate audio to check timing, level, bands, chroma, and envelope, with alignment, gain, and optional residual output for mix verification.

Instructions

Compare reference and rendered audio by timing, level, bands, chroma and envelope.

Files need matching channel counts. Candidate resampling and bounded constant
alignment are reported; no time warp conceals tempo errors. Positive delay means
candidate audio arrived later. Gain compensation is only for comparison, and
waveform error is phase-sensitive, not a musical quality or leakage score.
Poll get_audio_job; outputs and optional residual live in a unique run.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmNoTrue carries the removal out. False changes nothing and returns a report of what the call would remove, which is how to look before committing to it.
output_dirYesParent directory for a unique audio run.
end_secondsNoExclusive end in source-file seconds.
start_secondsNoStart in absolute source-file seconds.
candidate_pathYesLocal mono/stereo audio file path (WAV/FLAC).
reference_pathYesLocal mono/stereo audio file path (WAV/FLAC).
write_residualNoWrite the gain-aligned, phase-sensitive difference as a FLOAT WAV.
max_alignment_msNoDelay search radius in milliseconds; zero disables alignment.
candidate_start_secondsNoCandidate-file seconds corresponding to the reference section start.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior5/5

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

Beyond the annotations it discloses substantial behavior: channel-count requirements, that resampling and bounded constant alignment are reported, that no time warp hides tempo errors, the sign convention for delay, that gain compensation is comparison-only, and that the error metric is phase-sensitive rather than a quality score. These are exactly the caveats an agent needs and cannot get from the structured fields.

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?

It is front-loaded with the core purpose and every subsequent sentence carries a distinct constraint or caveat. It is fairly dense and clausal, but there is little wasted text and nothing belongs earlier than it appears.

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?

With an output schema present, the description does not need to enumerate return values, and it still explains the interpretation of key outputs and the polling workflow. Annotations already cover the safety profile, leaving only minor gaps for a 9-parameter comparison tool.

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 the baseline is 3, but the description adds interpretive meaning: the alignment search radius concept, the meaning of a positive delay, and the gain/residual semantics tied to write_residual. It enriches parameter intent beyond the field descriptions.

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 opens with a specific verb and resource ('Compare reference and rendered audio') and enumerates the comparison dimensions (timing, level, bands, chroma, envelope), which clearly separates it from analyze_audio or capture_audio. It never names a sibling explicitly, so differentiation is implied rather than stated.

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

Usage Guidelines3/5

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

It gives real preconditions and workflow ('Files need matching channel counts', 'Poll get_audio_job'), which is more than pure purpose. However, it never states when to prefer this tool over alternatives like analyze_audio or verify_tempo_map, so guidance is implied rather than explicit.

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