trash_compare_naming
Compare your Radarr or Sonarr naming configuration against TRaSH Guides recommendations to verify alignment with best practices.
Instructions
Compare your naming configuration against TRaSH Guides recommendations. Requires the corresponding *arr service to be configured.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| service | Yes | Which service | |
| mediaServer | Yes | Which media server you use |
Implementation Reference
- src/index.ts:2337-2410 (handler)The 'trash_compare_naming' tool handler implementation. Fetches the user's naming configuration from the *arr service and the TRaSH recommended naming conventions, then compares them. Reports whether folder/file naming matches and provides recommendations for mismatches.
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), }], }; } - src/index.ts:870-889 (registration)Tool registration for 'trash_compare_naming' in the TOOLS array. Defines the input schema requiring 'service' (radarr/sonarr) and 'mediaServer' (plex/emby/jellyfin/standard).
{ 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"], }, }