Skip to main content
Glama

trash_compare_profile

Compare your quality profile against TRaSH Guides recommendations to identify missing custom formats, scoring differences, and quality settings adjustments.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serviceYesWhich service
profileIdYesYour quality profile ID to compare
trashProfileYesTRaSH profile name to compare against

Implementation Reference

  • src/index.ts:847-869 (registration)
    Tool registration: defines the 'trash_compare_profile' tool with its input schema (service, profileId, trashProfile). Listed among TRaSH Guides tools (always available).
    {
      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"],
      },
    },
  • Handler: the switch-case handler for 'trash_compare_profile'. Fetches the user's quality profile from the configured *arr service via client.getQualityProfiles() and the TRaSH reference profile via trashClient.getProfile(), then compares their allowed qualities and custom formats, returning matching, missing, and extra items plus recommendations.
    case "trash_compare_profile": {
      const { service, profileId, trashProfile } = args as {
        service: TrashService;
        profileId: number;
        trashProfile: 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 profiles.` }, null, 2),
          }],
          isError: true,
        };
      }
    
      // Fetch both profiles
      const [userProfiles, trashProfileData] = await Promise.all([
        client.getQualityProfiles(),
        trashClient.getProfile(service, trashProfile),
      ]);
    
      const userProfile = userProfiles.find(p => p.id === profileId);
      if (!userProfile) {
        return {
          content: [{
            type: "text",
            text: JSON.stringify({
              error: `Profile ID ${profileId} not found`,
              availableProfiles: userProfiles.map(p => ({ id: p.id, name: p.name })),
            }, null, 2),
          }],
          isError: true,
        };
      }
    
      if (!trashProfileData) {
        return {
          content: [{
            type: "text",
            text: JSON.stringify({
              error: `TRaSH profile '${trashProfile}' not found`,
              hint: "Use trash_list_profiles to see available profiles",
            }, null, 2),
          }],
          isError: true,
        };
      }
    
      // Compare qualities
      const userQualities = new Set<string>(
        userProfile.items
          .filter(i => i.allowed)
          .map(i => i.quality?.name || i.name)
          .filter((n): n is string => n !== undefined)
      );
      const trashQualities = new Set<string>(
        trashProfileData.items
          .filter(i => i.allowed)
          .map(i => i.name)
      );
    
      const qualityComparison = {
        matching: [...userQualities].filter(q => trashQualities.has(q)),
        missingFromYours: [...trashQualities].filter(q => !userQualities.has(q)),
        extraInYours: [...userQualities].filter(q => !trashQualities.has(q)),
      };
    
      // Compare custom formats
      const userCFNames = new Set(
        (userProfile.formatItems || [])
          .filter(f => f.score !== 0)
          .map(f => f.name)
      );
      const trashCFNames = new Set(Object.keys(trashProfileData.formatItems || {}));
    
      const cfComparison = {
        matching: [...userCFNames].filter(cf => trashCFNames.has(cf)),
        missingFromYours: [...trashCFNames].filter(cf => !userCFNames.has(cf)),
        extraInYours: [...userCFNames].filter(cf => !trashCFNames.has(cf)),
      };
    
      return {
        content: [{
          type: "text",
          text: JSON.stringify({
            yourProfile: {
              name: userProfile.name,
              id: userProfile.id,
              upgradeAllowed: userProfile.upgradeAllowed,
              cutoff: userProfile.cutoff,
            },
            trashProfile: {
              name: trashProfileData.name,
              upgradeAllowed: trashProfileData.upgradeAllowed,
              cutoff: trashProfileData.cutoff,
            },
            qualityComparison,
            customFormatComparison: cfComparison,
            recommendations: [
              ...(qualityComparison.missingFromYours.length > 0
                ? [`Enable these qualities: ${qualityComparison.missingFromYours.join(', ')}`]
                : []),
              ...(cfComparison.missingFromYours.length > 0
                ? [`Add these custom formats: ${cfComparison.missingFromYours.slice(0, 5).join(', ')}${cfComparison.missingFromYours.length > 5 ? ` and ${cfComparison.missingFromYours.length - 5} more` : ''}`]
                : []),
              ...(userProfile.upgradeAllowed !== trashProfileData.upgradeAllowed
                ? [`Set upgradeAllowed to ${trashProfileData.upgradeAllowed}`]
                : []),
            ],
          }, null, 2),
        }],
      };
    }
  • Helper: TrashClient.getProfile() fetches a TRaSH quality profile by service and name from the GitHub RAW URLs, with caching.
    async getProfile(service: TrashService, profileName: string): Promise<TrashQualityProfile | null> {
      const key = `${service}/${profileName}`;
      const cached = cache.getProfile(key);
      if (cached) return cached;
    
      try {
        const profile = await fetchJSON<TrashQualityProfile>(
          `${TRASH_BASE_URL}/${service}/quality-profiles/${profileName}.json`
        );
        cache.setProfile(key, profile);
        return profile;
      } catch {
        return null;
      }
    }
  • Helper: ArrClient.getQualityProfiles() fetches the user's quality profiles from the configured *arr application via its REST API.
    async getQualityProfiles(): Promise<QualityProfile[]> {
      return this.request<QualityProfile[]>('/qualityprofile');
    }
Behavior4/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 uses 'Shows' implying a read-only operation, but does not explicitly state that no changes are made. It discloses the prerequisite but could be more explicit about non-destructive behavior. For a comparison tool, this is adequate but not perfect.

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?

Two sentences: the first states purpose and output, the second states a prerequisite. No redundant information. Every sentence adds value, making it concise and well-structured.

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?

The description covers what the tool does, what it shows, and a prerequisite. There is no output schema, so the description hints at return values (missing custom formats, scoring differences, quality settings). It does not explicitly compare with siblings, but overall it is sufficiently complete for a comparison tool.

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 each parameter having a basic description (e.g., 'Which service', 'Your quality profile ID to compare', 'TRaSH profile name to compare against'). The tool description adds a general prerequisite but no additional parameter-specific detail. Baseline 3 is appropriate as the schema already explains the parameters adequately.

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 uses a specific verb ('Compare') and resource ('your quality profile against TRaSH Guides recommendations'). It clearly lists what it shows (missing custom formats, scoring differences, quality settings), distinguishing it from siblings like trash_compare_naming or trash_get_profile.

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 description states a prerequisite ('Requires the corresponding *arr service to be configured'), which is helpful. However, it does not explicitly state when to use this tool versus alternatives (e.g., trash_get_profile for just viewing recommendations without comparison). The context is clear but lacks exclusion 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/aplaceforallmystuff/mcp-arr'

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