prowlarr_test_indexers
Test all indexers to verify their health status and ensure reliable content searches in your media management system.
Instructions
Test all indexers and return their health status
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:560-568 (registration)Registration of the 'prowlarr_test_indexers' tool in the TOOLS array, including name, description, and input schema (empty object). Added conditionally if Prowlarr client is configured.{ name: "prowlarr_test_indexers", description: "Test all indexers and return their health status", inputSchema: { type: "object" as const, properties: {}, required: [], }, },
- src/index.ts:1594-1615 (handler)Main handler for the tool in the MCP server request handler. Calls ProwlarrClient.testAllIndexers(), retrieves indexer list for names, formats response with health stats, counts healthy/failed indexers.case "prowlarr_test_indexers": { if (!clients.prowlarr) throw new Error("Prowlarr not configured"); const results = await clients.prowlarr.testAllIndexers(); const indexers = await clients.prowlarr.getIndexers(); const indexerMap = new Map(indexers.map(i => [i.id, i.name])); return { content: [{ type: "text", text: JSON.stringify({ count: results.length, indexers: results.map(r => ({ id: r.id, name: indexerMap.get(r.id) || 'Unknown', isValid: r.isValid, errors: r.validationFailures.map(f => f.errorMessage), })), healthy: results.filter(r => r.isValid).length, failed: results.filter(r => !r.isValid).length, }, null, 2), }], }; }
- src/arr-client.ts:966-968 (handler)Core implementation in ProwlarrClient: POST request to Prowlarr API endpoint '/api/v1/indexer/testall' to test all configured indexers and get validation results.async testAllIndexers(): Promise<Array<{ id: number; isValid: boolean; validationFailures: Array<{ propertyName: string; errorMessage: string }> }>> { return this['request']<Array<{ id: number; isValid: boolean; validationFailures: Array<{ propertyName: string; errorMessage: string }> }>>('/indexer/testall', { method: 'POST' }); }
- src/arr-client.ts:959-961 (helper)Helper method in ProwlarrClient to fetch list of indexers (used in handler to map IDs to names for response).async getIndexers(): Promise<Indexer[]> { return this['request']<Indexer[]>('/indexer'); }
- src/arr-client.ts:461-480 (helper)Base request method in ArrClient used by all API calls, including testAllIndexers. Handles authentication (X-Api-Key), error handling, and JSON parsing.protected async request<T>(endpoint: string, options: RequestInit = {}): Promise<T> { const url = `${this.config.url}/api/${this.apiVersion}${endpoint}`; const headers: Record<string, string> = { 'Content-Type': 'application/json', 'X-Api-Key': this.config.apiKey, ...(options.headers as Record<string, string> || {}), }; const response = await fetch(url, { ...options, headers, }); if (!response.ok) { const text = await response.text(); throw new Error(`${this.serviceName} API error: ${response.status} ${response.statusText} - ${text}`); } return response.json() as Promise<T>; }