Skip to main content
Glama

plex_ffmpeg_mgr

Destructive

Repair and inspect Plex media files using FFmpeg: probe streams, sync audio/subtitles, extract clips or subtitles, and change aspect ratio.

Instructions

Industrial-grade FFmpeg management tool for Plex media.

PORTMANTEAU PATTERN RATIONALE: Consolidates low-level media repair and inspection tasks that require system-level FFmpeg binaries. This avoids tool explosion while providing powerful repair capabilities for broken rips or sync-drifted media.

OPERATIONS:

  • probe: Inspect media file streams and format metadata.

  • sync_audio: Shift audio track timing by an offset.

  • sync_subtitles: Shift subtitle track timing by an offset.

  • revert: Restore the .bak backup of a modified file.

  • extract_subtitles: Extract a subtitle stream to a sidecar file.

  • extract_clip: Extract a video segment using FFmpeg with stream copy.

  • extract_audio: Extract an audio segment as WAV PCM.

  • set_aspect: Change display aspect ratio (metadata or re-encode).

Return Format

{"success": bool, "data": dict, "message": str}

Examples

await plex_ffmpeg_mgr(operation="probe", media_key="12345") await plex_ffmpeg_mgr(operation="sync_audio", media_key="12345", offset_seconds=-1.5) await plex_ffmpeg_mgr(operation="extract_clip", media_key="12345", start_seconds=30, duration_seconds=10) await plex_ffmpeg_mgr(operation="extract_audio", media_key="12345", start_seconds=60, duration_seconds=15)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reencodeNoFull re-encode for set_aspect.
media_keyYesPlex ratingKey of the media item.
operationYesOperation to perform.
output_pathNoOutput file path. Auto-generated in temp dir if omitted.
aspect_ratioNoTarget aspect ratio (e.g. 16:9).
stream_indexNoStream index for subtitle extraction.
start_secondsNoStart offset in seconds for clip extraction.
offset_secondsNoDelay in seconds for sync operations.
duration_secondsNoDuration in seconds for clip extraction.
Behavior4/5

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

Annotations already declare destructiveHint=true, and the description adds useful context beyond that: it lists operations that modify files (sync_audio, sync_subtitles, set_aspect), mentions that revert restores a '.bak backup', and indicates that extract operations create sidecar files. This goes beyond the generic annotation to explain what gets modified and how reversibility works.

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?

The description is longer than typical but well-structured with clear sections (rationale, operations, return format, examples). It front-loads the main purpose and uses bullet points for readability. While some phrases like 'Industrial-grade' are fluff, most sentences provide functional information. It earns a solid 4 rather than 5 because of verbosity.

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?

This is a complex multi-operation tool with 9 parameters and no output schema, so the description carries a heavy burden. It handles this well by providing a return format template, examples, and an operation list that gives semantic meaning to the enum. However, it does not detail what each operation returns in its data dict, which would be helpful for an agent to parse results correctly.

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 baseline is 3. The description adds value by mapping operation names to their behavior, which clarifies which parameters are relevant for which operation (e.g., offset_seconds for sync, start_seconds/duration_seconds for extraction). The examples also demonstrate usage of optional parameters, such as a negative offset_seconds, and show how media_key is used.

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?

The description clearly states it is an 'Industrial-grade FFmpeg management tool for Plex media' and enumerates eight distinct operations (probe, sync_audio, sync_subtitles, revert, etc.), giving a specific verb, resource, and scope. It also distinguishes itself from sibling tools by noting it 'consolidates low-level media repair and inspection tasks requiring system-level FFmpeg binaries.'

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?

The rationale paragraph provides clear context for when to use this tool: for broken rips or sync-drifted media that require low-level FFmpeg operations, and it explains that consolidation prevents tool explosion. However, it does not explicitly name alternative tools to use instead (e.g., plex_metadata for high-level metadata), so it stops short of full exclusionary guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sandraschi/plexmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server