sonarr_get_quality_profiles
Retrieve Sonarr quality profiles to view allowed formats, upgrade settings, and custom format scores for TV show management.
Instructions
Get detailed quality profiles from Sonarr (TV). Shows allowed qualities, upgrade settings, and custom format scores.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:108-116 (registration)Registration of the 'sonarr_get_quality_profiles' tool in the TOOLS array (dynamic via serviceName='sonarr'). Defines name, description, and empty input schema.{ name: `${serviceName}_get_quality_profiles`, description: `Get detailed quality profiles from ${displayName}. Shows allowed qualities, upgrade settings, and custom format scores.`, inputSchema: { type: "object" as const, properties: {}, required: [], }, },
- src/index.ts:794-827 (handler)Tool handler in CallToolRequest switch statement. Handles sonarr_get_quality_profiles by calling SonarrClient.getQualityProfiles() and formatting the JSON response.// Quality Profiles case "sonarr_get_quality_profiles": case "radarr_get_quality_profiles": case "lidarr_get_quality_profiles": case "readarr_get_quality_profiles": { const serviceName = name.split('_')[0] as keyof typeof clients; const client = clients[serviceName]; if (!client) throw new Error(`${serviceName} not configured`); const profiles = await client.getQualityProfiles(); return { content: [{ type: "text", text: JSON.stringify({ count: profiles.length, profiles: profiles.map(p => ({ id: p.id, name: p.name, upgradeAllowed: p.upgradeAllowed, cutoff: p.cutoff, allowedQualities: p.items .filter(i => i.allowed) .map(i => i.quality?.name || i.name || (i.items?.map(q => q.quality.name).join(', '))) .filter(Boolean), customFormats: p.formatItems?.filter(f => f.score !== 0).map(f => ({ name: f.name, score: f.score, })) || [], minFormatScore: p.minFormatScore, cutoffFormatScore: p.cutoffFormatScore, })), }, null, 2), }], }; }
- src/arr-client.ts:529-531 (helper)Core implementation of getQualityProfiles() in ArrClient base class (inherited by SonarrClient). Makes API GET request to /qualityprofile endpoint.async getQualityProfiles(): Promise<QualityProfile[]> { return this.request<QualityProfile[]>('/qualityprofile'); }
- src/arr-client.ts:290-309 (schema)TypeScript interface defining the QualityProfile structure returned from the *arr API, used in tool response.export interface QualityProfile { id: number; name: string; upgradeAllowed: boolean; cutoff: number; items: Array<{ id?: number; name?: string; quality?: { id: number; name: string; source: string; resolution: number }; items?: Array<{ quality: { id: number; name: string } }>; allowed: boolean; }>; minFormatScore: number; cutoffFormatScore: number; formatItems: Array<{ format: number; name: string; score: number; }>; }
- src/index.ts:174-175 (registration)Conditional registration call for Sonarr tools, including sonarr_get_quality_profiles, only if Sonarr client is configured.// Add config tools for each configured service (except Prowlarr which has different config) if (clients.sonarr) addConfigTools('sonarr', 'Sonarr (TV)');