Skip to main content
Glama

readarr_get_quality_profiles

Retrieve quality profiles from Readarr to view allowed formats, upgrade rules, and custom format scoring for book management.

Instructions

Get detailed quality profiles from Readarr (Books). Shows allowed qualities, upgrade settings, and custom format scores.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Primary handler for the 'readarr_get_quality_profiles' tool (shared pattern for all *arr services). Extracts service name from tool name, retrieves ReadarrClient, fetches quality profiles via API, processes and summarizes data (count, allowed qualities, custom formats with scores), returns formatted JSON response.
    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/index.ts:106-170 (registration)
    Registration of the tool including name construction ('readarr_get_quality_profiles'), description, and empty input schema. Called conditionally if Readarr client is configured (line 178). Adds to global TOOLS array used for MCP tool listing.
    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: [], }, }, { name: `${serviceName}_get_health`, description: `Get health check warnings and issues from ${displayName}. Shows any problems detected by the application.`, inputSchema: { type: "object" as const, properties: {}, required: [], }, }, { name: `${serviceName}_get_root_folders`, description: `Get root folders and storage info from ${displayName}. Shows paths, free space, and unmapped folders.`, inputSchema: { type: "object" as const, properties: {}, required: [], }, }, { name: `${serviceName}_get_download_clients`, description: `Get download client configurations from ${displayName}. Shows configured clients and their settings.`, inputSchema: { type: "object" as const, properties: {}, required: [], }, }, { name: `${serviceName}_get_naming`, description: `Get file naming configuration from ${displayName}. Shows naming patterns for files and folders.`, inputSchema: { type: "object" as const, properties: {}, required: [], }, }, { name: `${serviceName}_get_tags`, description: `Get all tags defined in ${displayName}. Tags can be used to organize and filter content.`, inputSchema: { type: "object" as const, properties: {}, required: [], }, }, { name: `${serviceName}_review_setup`, description: `Get comprehensive configuration review for ${displayName}. Returns all settings for analysis: quality profiles, download clients, naming, storage, indexers, health warnings, and more. Use this to analyze the setup and suggest improvements.`, inputSchema: { type: "object" as const, properties: {}, required: [], }, }
  • TypeScript interface defining the QualityProfile structure returned by the Readarr API and used in tool response processing.
    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; }>; }
  • Helper method in base ArrClient class (inherited by ReadarrClient) that performs the actual API request to fetch quality profiles from Readarr (/qualityprofile endpoint).
    async getQualityProfiles(): Promise<QualityProfile[]> { return this.request<QualityProfile[]>('/qualityprofile'); }
  • Initialization of the ReadarrClient instance from environment variables (READARR_URL, READARR_API_KEY), stored in global 'clients' object, prerequisite for tool handler.
    case 'readarr': clients.readarr = new ReadarrClient(config); break;

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