Skip to main content
Glama

detect_silence

Analyzes a media file's audio for silent stretches and returns timing intervals so you can decide which sections to cut or remove; detection only, no edits.

Instructions

Analyzes a media file's audio for silent stretches using ffmpeg's silencedetect filter, run locally via child_process -- NOT via Premiere's scripting API, which has no audio-level/RMS reading capability at all (confirmed: every audio tool in this codebase only writes levels, never reads them). Requires ffmpeg. If it is missing, the result includes nextStep / installCommand: install ffmpeg on this machine (do not ask the user to do it by hand), then retry detect_silence once. This is DETECTION ONLY -- it does not cut or modify anything. Use the returned intervals with split_clip/ripple_delete/razor_timeline_at_time if you want to remove the silence.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "detect_silence"
  }
}

Input Schema

NameRequiredDescriptionDefault
mediaPathNoDirect filesystem path to the media file to analyze
projectItemIdNoProject item ID to resolve to a media path instead of passing mediaPath directly
noiseThresholdDbNoSilence threshold in dBFS, e.g. -30 (default -30). Audio quieter than this is considered silent.
minDurationSecondsNoMinimum duration in seconds for a quiet stretch to be reported as silence (default 1.5)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.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 local child_process execution rather than the host app's API, the ffmpeg dependency, the failure shape (nextStep / installCommand in the result), the single-retry policy, and that nothing is mutated. It even preempts the natural wrong assumption by noting no audio-level reading exists in the codebase.

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?

Purpose and the non-Premiere caveat are front-loaded, and the operational guidance follows in a logical order. The parenthetical '(confirmed: every audio tool in this codebase only writes levels, never reads them)' is defensive justification that a caller doesn't strictly need, which keeps it off a 5.

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?

There is no output schema, and the description does cover the meaningful return surface: silence intervals plus nextStep / installCommand on dependency failure. It does not name the interval fields or whether times are in seconds or frames, which an agent would need to feed split_clip correctly.

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?

Schema description coverage is 100%, so mediaPath, projectItemId, noiseThresholdDb and minDurationSeconds are already documented, including defaults and units. The description adds nothing about parameter behavior, such as what happens if both mediaPath and projectItemId are supplied or how threshold interacts with reported intervals, so the baseline 3 applies.

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 resource ('analyzes a media file's audio for silent stretches') plus the exact mechanism (ffmpeg silencedetect via child_process), and explicitly separates itself from Premiere's scripting API and from the sibling tools that actually cut clips. An agent can distinguish it from detect_scene_edits or adjust_audio_levels without opening any schema.

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

Usage Guidelines5/5

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

Explicitly says this is DETECTION ONLY and names the downstream tools (split_clip, ripple_delete, razor_timeline_at_time) to use with the returned intervals if the goal is removal. It also gives the recovery path when the prerequisite is missing: install ffmpeg programmatically, then retry once, rather than deferring to the user.

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