prowlarr_search
Search across all configured Prowlarr indexers to find media content using a unified query interface.
Instructions
Search across all Prowlarr indexers
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query |
Implementation Reference
- src/arr-client.ts:987-993 (handler)Core handler function in ProwlarrClient that executes the search by constructing the query parameters and calling the Prowlarr /search API endpoint.async search(query: string, categories?: number[]): Promise<unknown[]> { const params = new URLSearchParams({ query }); if (categories) { categories.forEach(c => params.append('categories', c.toString())); } return this['request']<unknown[]>(`/search?${params.toString()}`); }
- src/index.ts:546-558 (schema)Tool schema definition including name, description, and input schema requiring a 'query' string.{ name: "prowlarr_search", description: "Search across all Prowlarr indexers", inputSchema: { type: "object" as const, properties: { query: { type: "string", description: "Search query", }, }, required: ["query"], },
- src/index.ts:535-579 (registration)Conditional registration of Prowlarr tools (including prowlarr_search) to the TOOLS array if Prowlarr client is configured.if (clients.prowlarr) { TOOLS.push( { name: "prowlarr_get_indexers", description: "Get all configured indexers in Prowlarr", inputSchema: { type: "object" as const, properties: {}, required: [], }, }, { name: "prowlarr_search", description: "Search across all Prowlarr indexers", inputSchema: { type: "object" as const, properties: { query: { type: "string", description: "Search query", }, }, required: ["query"], }, }, { name: "prowlarr_test_indexers", description: "Test all indexers and return their health status", inputSchema: { type: "object" as const, properties: {}, required: [], }, }, { name: "prowlarr_get_stats", description: "Get indexer statistics (queries, grabs, failures)", inputSchema: { type: "object" as const, properties: {}, required: [], }, } ); }
- src/index.ts:1585-1592 (handler)MCP server request handler that dispatches the tool call, extracts arguments, invokes ProwlarrClient.search, and formats the response.case "prowlarr_search": { if (!clients.prowlarr) throw new Error("Prowlarr not configured"); const query = (args as { query: string }).query; const results = await clients.prowlarr.search(query); return { content: [{ type: "text", text: JSON.stringify(results, null, 2) }], }; }
- src/arr-client.ts:950-994 (helper)ProwlarrClient class definition extending ArrClient, providing service-specific API methods including search.export class ProwlarrClient extends ArrClient { constructor(config: ArrConfig) { super('prowlarr', config); this.apiVersion = 'v1'; } /** * Get all indexers */ async getIndexers(): Promise<Indexer[]> { return this['request']<Indexer[]>('/indexer'); } /** * Test all indexers */ 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' }); } /** * Test a specific indexer */ async testIndexer(indexerId: number): Promise<{ id: number; isValid: boolean; validationFailures: Array<{ propertyName: string; errorMessage: string }> }> { return this['request']<{ id: number; isValid: boolean; validationFailures: Array<{ propertyName: string; errorMessage: string }> }>(`/indexer/${indexerId}/test`, { method: 'POST' }); } /** * Get indexer statistics */ async getIndexerStats(): Promise<{ indexers: IndexerStats[] }> { return this['request']<{ indexers: IndexerStats[] }>('/indexerstats'); } /** * Search across all indexers */ async search(query: string, categories?: number[]): Promise<unknown[]> { const params = new URLSearchParams({ query }); if (categories) { categories.forEach(c => params.append('categories', c.toString())); } return this['request']<unknown[]>(`/search?${params.toString()}`); } }