Skip to main content

Audio Trim Silence

Immutable Catalog Entry

This descriptor comes from the active versioned Portal catalog.

WRITEffmpeg.audio_trim_silence
  • Contract tier: agent_ready
  • Risk: write
  • Catalog version: 2026-07-12.3
  • Descriptor hash: 47bc033af80594ec94eaa42f15f6db53afc2c66fa1a99da6fa10c8cb09959d5d

Use this to remove leading and/or trailing silence from staged audio using a bounded duration and decibel threshold. It queues a new output asset.

Request Body

{
"jsonrpc": "2.0",
"id": "ffmpeg-audio-trim-silence-example",
"method": "tools/call",
"params": {
"name": "ffmpeg.audio_trim_silence",
"arguments": {
"asset_id": "asset_id_123",
"bitrate": "",
"priority": "",
"threshold_db": "",
"trim_leading": "",
"output_format": "output_format_example",
"trim_trailing": "",
"min_silence_sec": ""
}
}
}

Arguments Schema

{
"type": "object",
"required": [
"asset_id"
],
"properties": {
"bitrate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Optional FFmpeg bitrate string accepted by the bounded operation."
},
"asset_id": {
"type": "string",
"description": "Stable ID of one staged FFmpeg media asset."
},
"priority": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Optional queue priority configured by the server, such as urgent or batch."
},
"threshold_db": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Silence detection threshold in decibels."
},
"trim_leading": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Whether leading silence should be removed."
},
"output_format": {
"type": "string",
"default": "m4a",
"description": "Requested supported container or codec family for the new audio asset."
},
"trim_trailing": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Whether trailing silence should be removed."
},
"min_silence_sec": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Minimum detected silence duration eligible for trimming."
}
},
"additionalProperties": false
}

Output Schema

{
"type": "object",
"required": [
"job_id",
"cache_hit"
],
"properties": {
"job_id": {
"type": "string",
"description": "Stable ID used with the job readback tools."
},
"cache_hit": {
"type": "boolean",
"description": "Whether a matching completed result was reused."
},
"output_asset_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Completed output asset IDs when immediately available from cache."
}
},
"additionalProperties": false
}

Code Examples

curl -X POST 'https://portal.madpanda3d.com/api/mcp' \
-H 'Authorization: Bearer mad_live_***' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "ffmpeg-audio-trim-silence-example",
"method": "tools/call",
"params": {
"name": "ffmpeg.audio_trim_silence",
"arguments": {
"asset_id": "asset_id_123",
"bitrate": "",
"priority": "",
"threshold_db": "",
"trim_leading": "",
"output_format": "output_format_example",
"trim_trailing": "",
"min_silence_sec": ""
}
}
}'

Example Responses

{
"ok": true,
"message": "Tool ffmpeg.audio_trim_silence executed successfully.",
"note": "Response shape varies by MCP tool. Inspect live responses for exact fields."
}