sonarr_get_quality_profiles
Retrieve quality profiles from Sonarr including allowed qualities, upgrade settings, and custom format scores.
Instructions
Get detailed quality profiles from Sonarr (TV). Shows allowed qualities, upgrade settings, and custom format scores.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:132-142 (registration)Tool registration: sonarr_get_quality_profiles is dynamically created by addConfigTools('sonarr', 'Sonarr (TV)') on line 201. The tool name is generated via template literal `${serviceName}_get_quality_profiles` with inputSchema requiring no arguments.
function addConfigTools(serviceName: string, displayName: string) { TOOLS.push( { 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:137-142 (schema)Input schema for sonarr_get_quality_profiles: empty object with no required properties (no arguments needed).
inputSchema: { type: "object" as const, properties: {}, required: [], }, }, - src/index.ts:1186-1217 (handler)Handler for sonarr_get_quality_profiles: Extracts 'sonarr' from the tool name, gets the SonarrClient, calls client.getQualityProfiles() (which maps to GET /api/v3/qualityprofile), and returns a formatted response with profile details including allowed qualities, custom format scores, upgrade settings, and cutoff information.
case "sonarr_get_quality_profiles": case "radarr_get_quality_profiles": case "lidarr_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:467-474 (helper)Base API method getQualityProfiles() on ArrClient class that calls GET /api/v3/qualityprofile. Returns QualityProfile[] which is the data source for the tool handler.
} /** * Get quality profiles */ async getQualityProfiles(): Promise<QualityProfile[]> { return this.request<QualityProfile[]>('/qualityprofile'); } - src/arr-client.ts:232-251 (helper)QualityProfile interface definition showing the data structure returned by the API: id, name, upgradeAllowed, cutoff, items (with quality info and allowed flag), formatItems, minFormatScore, cutoffFormatScore.
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; }>; }