trash_get_profile
Retrieve a specific TRaSH Guides quality profile for Radarr or Sonarr, including custom format scores, quality settings, and implementation details.
Instructions
Get a specific TRaSH Guides quality profile with all custom format scores, quality settings, and implementation details
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| service | Yes | Which service | |
| profile | Yes | Profile name (e.g., 'remux-web-1080p', 'uhd-bluray-web', 'hd-bluray-web') |
Implementation Reference
- src/index.ts:770-788 (registration)Registration of the 'trash_get_profile' tool with its name, description, and input schema (service + profile name)
{ 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"], }, }, - src/index.ts:2091-2130 (handler)Handler for 'trash_get_profile' tool call. Calls trashClient.getProfile(service, profileName) and returns the profile details including custom format scores, quality settings, etc.
case "trash_get_profile": { const { service, profile: profileName } = args as { service: TrashService; profile: string }; const profile = await trashClient.getProfile(service, profileName); if (!profile) { return { content: [{ type: "text", text: JSON.stringify({ error: `Profile '${profileName}' not found for ${service}`, hint: "Use trash_list_profiles to see available profiles", }, null, 2), }], isError: true, }; } return { content: [{ type: "text", text: JSON.stringify({ name: profile.name, description: profile.trash_description?.replace(/<br>/g, '\n'), trash_id: profile.trash_id, upgradeAllowed: profile.upgradeAllowed, cutoff: profile.cutoff, minFormatScore: profile.minFormatScore, cutoffFormatScore: profile.cutoffFormatScore, language: profile.language, qualities: profile.items.map(i => ({ name: i.name, allowed: i.allowed, items: i.items, })), customFormats: Object.entries(profile.formatItems || {}).map(([name, trashId]) => ({ name, trash_id: trashId, })), }, null, 2), }], }; } - src/index.ts:771-788 (schema)Input schema for trash_get_profile: requires 'service' (radarr|sonarr) and 'profile' (string profile name)
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"], }, }, - src/trash-client.ts:259-273 (helper)The underlying helper method TrashClient.getProfile() that fetches profile JSON from TRaSH Guides GitHub repo and caches it
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; } }