Skip to main content
Glama

plex_organization

Fix Plex library clutter and slow performance by organizing files, analyzing media, cleaning bundles, and optimizing the database.

Instructions

Comprehensive library organization and maintenance operations for Plex Media Server.

PORTMANTEAU PATTERN RATIONALE: Consolidates 5 library structural maintenance and database optimization tasks into one tool to streamline the archival and cleanup workflows.

Return Format

{"success": bool, "operation": str, "data": dict|list, "library_id": str|None}

Examples

await plex_organization(operation="organize", library_id="1", dry_run=True) await plex_organization(operation="analyze", library_id="1") await plex_organization(operation="clean_bundles", library_id="1", threshold_days=30) await plex_organization(operation="optimize_database", vacuum=True, reindex=True)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vacuumNoRun VACUUM during database optimization.
analyzeNoRun ANALYZE during database optimization.
dry_runNoSimulate organization without making changes.
reindexNoRun REINDEX during database optimization.
patternsNoOrganization patterns for file naming and structure.
operationYesThe organization operation to perform.
library_idNoID of the target library.
threshold_daysNoAge threshold in days for cleanup operations.
Behavior3/5

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

Annotations state readOnlyHint=false and destructiveHint=false, so the description doesn't need to re-state these. It adds useful behavioral context with the return format and dry_run parameter examples, showing simulation capability. However, it doesn't disclose side effects like clean_bundles deleting files or optimize_database modifying the database, which is significant for a maintenance tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured with sections (rationale, return format, examples) and is moderately sized, but the 'PORTMANTEAU PATTERN RATIONALE' paragraph is more meta-commentary than operational guidance. It's not as concise as it could be, yet the examples earn their place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 8 parameters and 5 operations, this is a complex tool. The description provides a return format and examples but lacks detailed explanations of each operation (e.g., what exactly 'fix_issues' does, what 'organize' changes). No output schema, so the description should compensate, but it doesn't fully describe behaviors or edge cases. Adequate but with clear gaps.

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 parameters are well documented in the schema. The description adds value through examples (e.g., threshold_days=30, vacuum=True) and the return format clue, but it doesn't deepen meaning for parameters like patterns or operation beyond what the schema provides. Baseline 3 is appropriate.

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 clearly states the tool performs 'comprehensive library organization and maintenance operations for Plex Media Server' and lists five specific operations via the schema's enum. It distinguishes itself as a consolidated tool (portmanteau) for library maintenance and database optimization, though it could more explicitly differentiate from sibling tools like plex_library or plex_performance.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool vs. alternatives is provided. The rationale mentions 'archival and cleanup workflows,' which gives a vague sense of use, but there are no exclusions or alternative tool references. The examples show operations but don't clarify when to choose this over other Plex tools.

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