readarr_get_quality_profiles
Retrieve quality profiles from Readarr to view allowed book formats, upgrade settings, and custom format scores for media management.
Instructions
Get detailed quality profiles from Readarr (Books). Shows allowed qualities, upgrade settings, and custom format scores.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:796-827 (handler)Main handler logic for the 'readarr_get_quality_profiles' tool. Matches the tool name, extracts the service ('readarr'), retrieves the ReadarrClient instance, calls getQualityProfiles(), and returns a formatted JSON response summarizing quality profiles with allowed qualities, custom formats, and scores.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/index.ts:108-116 (registration)Registration of the tool in the TOOLS array via dynamic template `${serviceName}_get_quality_profiles` (serviceName='readarr') inside addConfigTools function, which is invoked when Readarr is configured.{ 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:178-178 (registration)Conditional invocation of addConfigTools for 'readarr' service, which registers the 'readarr_get_quality_profiles' tool if Readarr client is initialized.if (clients.readarr) addConfigTools('readarr', 'Readarr (Books)');
- src/arr-client.ts:529-531 (helper)Core helper method getQualityProfiles() in ArrClient (inherited by ReadarrClient) that performs the API request to fetch quality profiles from Readarr (/qualityprofile endpoint).async getQualityProfiles(): Promise<QualityProfile[]> { return this.request<QualityProfile[]>('/qualityprofile'); }
- src/arr-client.ts:290-309 (schema)Type definition for QualityProfile, used by getQualityProfiles() return type and in the handler's response mapping for input/output structure.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; }>; }