Skip to main content
Glama

Loudness Target

audacity_loudness_target
Destructive

Measures integrated loudness and applies static gain to reach a target LUFS while preserving true-peak headroom and respecting a max boost limit.

Instructions

Measure then apply static gain to approach targetLufs while preserving measured true-peak headroom and respecting maxBoostDb. Requires ffmpeg and a non-silent audio track; default scope is its own extent. dryRun returns the measured input and Amplify plan without applying gain. Reports before/after and whether the target was achievable; it never compresses or guesses absent LUFS/true peak.

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": {
      "track": "<track>"
    },
    "name": "audacity_loudness_target"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNo
startNo
trackYes
dryRunNo
maxBoostDbNomaximum positive static gain, in dB; does not cap attenuation
targetLufsNodesired integrated loudness, in LUFS
toleranceLuNoallowed distance from targetLufs, in LU
truePeakCeilingDbtpNomaximum rendered true peak, in dBTP

Output Schema

NameRequiredDescriptionDefault
planYes
afterNo
notesNo
stepsYes
beforeYes
dryRunYes
targetCheckNo
clippedSamplesNo
samplePeakDbfsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already flag destructive=true, non-idempotent, openWorld, so the description is not the sole source of the safety profile. It still adds substantive behavior: the operation is static gain only ('never compresses'), it respects a boost ceiling despite destructive write, it will not guess when LUFS/true-peak data is absent, and dryRun is non-mutating. It does not state whether the gain is written in place or to a new file, which would be the remaining gap.

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-loaded with the core action, then layered with constraints, then the dryRun semantics. It is dense with semicolon-chained clauses but nearly every clause carries information; no filler sentences.

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?

For an 8-parameter mutation tool with an output schema, the description covers prerequisites, scope defaults, preview mode, failure reporting ('whether the target was achievable'), and the no-compression guarantee. Return-value detail is correctly omitted since an output schema exists; only in-place vs. new-file behavior is unaddressed.

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?

With only 50% schema description coverage, the description compensates by explaining targetLufs ('approach targetLufs'), the maxBoostDb constraint, dryRun's return behavior, and the meaning of the unlabeled start/end pair via 'default scope is its own extent'. Only 'track' is left to inference, and that is the obvious required field.

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?

States a specific compound action ('measure then apply static gain to approach targetLufs') on a specific resource (an audio track), with the governing constraints named (true-peak headroom, maxBoostDb). It is distinguishable from measure-only siblings like audacity_measure and from generic effect tools, but it never names an alternative explicitly.

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?

Gives real preconditions (requires ffmpeg, non-silent track) and a concrete preview path ('dryRun returns the measured input and Amplify plan without applying gain'), plus a default scope note. What is missing is explicit routing: it never says when to prefer audacity_measure alone or a different loudness approach, and there are no stated exclusions.

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