Skip to main content
Glama

trash_compare_naming

Compare your naming configuration with TRaSH Guides recommendations to ensure proper media organization for Plex, Emby, Jellyfin, or standard setups in Radarr or Sonarr.

Instructions

Compare your naming configuration against TRaSH Guides recommendations. Requires the corresponding *arr service to be configured.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serviceYesWhich service
mediaServerYesWhich media server you use

Implementation Reference

  • Executes the trash_compare_naming tool: fetches user's naming config from *arr client and TRaSH naming conventions, maps media server to recommended formats, compares folder/file naming patterns, and returns match status with recommendations.
    case "trash_compare_naming": {
      const { service, mediaServer } = args as { service: TrashService; mediaServer: string };
    
      // Get client
      const client = service === 'radarr' ? clients.radarr : clients.sonarr;
      if (!client) {
        return {
          content: [{
            type: "text",
            text: JSON.stringify({ error: `${service} not configured. Cannot compare naming.` }, null, 2),
          }],
          isError: true,
        };
      }
    
      // Fetch both
      const [userNaming, trashNaming] = await Promise.all([
        client.getNamingConfig(),
        trashClient.getNaming(service),
      ]);
    
      if (!trashNaming) {
        return {
          content: [{
            type: "text",
            text: JSON.stringify({ error: `Could not fetch TRaSH naming for ${service}` }, null, 2),
          }],
          isError: true,
        };
      }
    
      // Map media server to naming key
      const serverMap: Record<string, { folder: string; file: string }> = {
        plex: { folder: 'plex-imdb', file: 'plex-imdb' },
        emby: { folder: 'emby-imdb', file: 'emby-imdb' },
        jellyfin: { folder: 'jellyfin-imdb', file: 'jellyfin-imdb' },
        standard: { folder: 'default', file: 'standard' },
      };
    
      const keys = serverMap[mediaServer] || serverMap.standard;
      const recommendedFolder = trashNaming.folder[keys.folder] || trashNaming.folder.default;
      const recommendedFile = trashNaming.file[keys.file] || trashNaming.file.standard;
    
      // Extract user's current naming (field names vary by service)
      const namingRecord = userNaming as unknown as Record<string, unknown>;
      const userFolder = namingRecord.movieFolderFormat ||
        namingRecord.seriesFolderFormat ||
        namingRecord.standardMovieFormat;
      const userFile = namingRecord.standardMovieFormat ||
        namingRecord.standardEpisodeFormat;
    
      return {
        content: [{
          type: "text",
          text: JSON.stringify({
            mediaServer,
            yourNaming: {
              folder: userFolder,
              file: userFile,
            },
            trashRecommended: {
              folder: recommendedFolder,
              file: recommendedFile,
            },
            folderMatch: userFolder === recommendedFolder,
            fileMatch: userFile === recommendedFile,
            recommendations: [
              ...(userFolder !== recommendedFolder ? [`Update folder format to: ${recommendedFolder}`] : []),
              ...(userFile !== recommendedFile ? [`Update file format to: ${recommendedFile}`] : []),
            ],
          }, null, 2),
        }],
      };
    }
  • Tool definition including name, description, and input schema (service: radarr/sonarr, mediaServer: plex/emby/jellyfin/standard). Added to TOOLS array for registration.
      name: "trash_compare_naming",
      description: "Compare your naming configuration against TRaSH Guides recommendations. Requires the corresponding *arr service to be configured.",
      inputSchema: {
        type: "object" as const,
        properties: {
          service: {
            type: "string",
            enum: ["radarr", "sonarr"],
            description: "Which service",
          },
          mediaServer: {
            type: "string",
            enum: ["plex", "emby", "jellyfin", "standard"],
            description: "Which media server you use",
          },
        },
        required: ["service", "mediaServer"],
      },
    }
  • src/index.ts:598-734 (registration)
    The tool is registered by pushing its definition to the TOOLS array, which is returned by listTools handler.
    TOOLS.push(
      {
        name: "trash_list_profiles",
        description: "List available TRaSH Guides quality profiles for Radarr or Sonarr. Shows recommended profiles for different use cases (1080p, 4K, Remux, etc.)",
        inputSchema: {
          type: "object" as const,
          properties: {
            service: {
              type: "string",
              enum: ["radarr", "sonarr"],
              description: "Which service to get profiles for",
            },
          },
          required: ["service"],
        },
      },
      {
        name: "trash_get_profile",
        description: "Get a specific TRaSH Guides quality profile with all custom format scores, quality settings, and implementation details",
        inputSchema: {
          type: "object" as const,
          properties: {
            service: {
              type: "string",
              enum: ["radarr", "sonarr"],
              description: "Which service",
            },
            profile: {
              type: "string",
              description: "Profile name (e.g., 'remux-web-1080p', 'uhd-bluray-web', 'hd-bluray-web')",
            },
          },
          required: ["service", "profile"],
        },
      },
      {
        name: "trash_list_custom_formats",
        description: "List available TRaSH Guides custom formats. Can filter by category: hdr, audio, resolution, source, streaming, anime, unwanted, release, language",
        inputSchema: {
          type: "object" as const,
          properties: {
            service: {
              type: "string",
              enum: ["radarr", "sonarr"],
              description: "Which service",
            },
            category: {
              type: "string",
              description: "Optional filter by category",
            },
          },
          required: ["service"],
        },
      },
      {
        name: "trash_get_naming",
        description: "Get TRaSH Guides recommended naming conventions for your media server (Plex, Emby, Jellyfin, or standard)",
        inputSchema: {
          type: "object" as const,
          properties: {
            service: {
              type: "string",
              enum: ["radarr", "sonarr"],
              description: "Which service",
            },
            mediaServer: {
              type: "string",
              enum: ["plex", "emby", "jellyfin", "standard"],
              description: "Which media server you use",
            },
          },
          required: ["service", "mediaServer"],
        },
      },
      {
        name: "trash_get_quality_sizes",
        description: "Get TRaSH Guides recommended min/max/preferred sizes for each quality level",
        inputSchema: {
          type: "object" as const,
          properties: {
            service: {
              type: "string",
              enum: ["radarr", "sonarr"],
              description: "Which service",
            },
            type: {
              type: "string",
              description: "Content type: 'movie', 'anime' for Radarr; 'series', 'anime' for Sonarr",
            },
          },
          required: ["service"],
        },
      },
      {
        name: "trash_compare_profile",
        description: "Compare your quality profile against TRaSH Guides recommendations. Shows missing custom formats, scoring differences, and quality settings. Requires the corresponding *arr service to be configured.",
        inputSchema: {
          type: "object" as const,
          properties: {
            service: {
              type: "string",
              enum: ["radarr", "sonarr"],
              description: "Which service",
            },
            profileId: {
              type: "number",
              description: "Your quality profile ID to compare",
            },
            trashProfile: {
              type: "string",
              description: "TRaSH profile name to compare against",
            },
          },
          required: ["service", "profileId", "trashProfile"],
        },
      },
      {
        name: "trash_compare_naming",
        description: "Compare your naming configuration against TRaSH Guides recommendations. Requires the corresponding *arr service to be configured.",
        inputSchema: {
          type: "object" as const,
          properties: {
            service: {
              type: "string",
              enum: ["radarr", "sonarr"],
              description: "Which service",
            },
            mediaServer: {
              type: "string",
              enum: ["plex", "emby", "jellyfin", "standard"],
              description: "Which media server you use",
            },
          },
          required: ["service", "mediaServer"],
        },
      }
    );
  • Fetches and caches TRaSH Guides naming conventions from GitHub, used by trash_compare_naming.
    async getNaming(service: TrashService): Promise<TrashNaming | null> {
      const cached = cache.getNaming(service);
      if (cached) return cached;
    
      try {
        const naming = await fetchJSON<TrashNaming>(
          `${TRASH_BASE_URL}/${service}/naming/${service}-naming.json`
        );
        cache.setNaming(service, naming);
        return naming;
      } catch {
        return null;
      }
    }
  • Fetches the *arr application's naming configuration via API, used by trash_compare_naming.
    async getNamingConfig(): Promise<NamingConfig> {
      return this.request<NamingConfig>('/config/naming');
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions a requirement ('Requires the corresponding *arr service to be configured'), which adds useful context about dependencies. However, it doesn't disclose other behavioral traits such as whether this is a read-only operation, what the output format might be, potential side effects, or error conditions. For a comparison tool with zero annotation coverage, this is a significant gap.

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

Conciseness5/5

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

The description is two sentences, front-loaded with the core purpose and followed by a prerequisite. Every word earns its place, with no redundancy or unnecessary details. It's efficiently structured and appropriately sized for the tool's complexity.

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?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is somewhat complete but has gaps. It covers the purpose and a prerequisite, but lacks details on behavioral aspects like output format or error handling. Without annotations or an output schema, the description should do more to compensate, making it only adequate for basic understanding.

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%, with both parameters ('service' and 'mediaServer') having clear enum-based descriptions in the schema. The description doesn't add any additional meaning beyond what the schema provides, such as explaining how these choices affect the comparison. Given the high schema coverage, the baseline score of 3 is appropriate, as the schema does the heavy lifting.

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's purpose: 'Compare your naming configuration against TRaSH Guides recommendations.' It specifies the verb 'compare' and the resource 'naming configuration,' making it distinct from most siblings like 'trash_get_naming' (which likely retrieves rather than compares). However, it doesn't explicitly differentiate from 'trash_compare_profile,' which might be a similar comparison tool for profiles.

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

Usage Guidelines3/5

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

The description provides some usage context: 'Requires the corresponding *arr service to be configured.' This implies a prerequisite but doesn't specify when to use this tool versus alternatives like 'trash_get_naming' or other *arr naming tools. It lacks explicit guidance on scenarios or exclusions, leaving usage somewhat implied rather than clearly defined.

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/aplaceforallmystuff/mcp-arr'

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