Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
serviceYesWhich service
mediaServerYesWhich media server you use

Implementation Reference

  • 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"],
      },
    }
Behavior2/5

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

No annotations are provided, and the description does not disclose behavioral traits such as read-only nature, side effects, output format, or error conditions. The full burden falls on the description, which only states the action and prerequisite.

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 with no wasted words, efficiently conveying the core purpose and a key prerequisite.

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

Completeness2/5

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

Given the lack of output schema, the description does not explain what the comparison results look like or how they are returned, leaving the agent with incomplete context for using the tool correctly.

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?

Parameter descriptions in the schema already cover 'service' and 'mediaServer' with enums; the description adds no further meaning, so it meets the baseline for high schema coverage.

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 the action (compare), resource (naming configuration), and reference (TRaSH Guides recommendations), distinguishing it from sibling tools like trash_get_naming or arr_get_naming.

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 a prerequisite ('Requires the corresponding *arr service to be configured'), but lacks explicit guidance on when to use this tool versus alternatives or when not to use it.

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