radarr_get_movies
Retrieve movies from Radarr library with pagination and title filtering to manage and browse your collection.
Instructions
Get movies from Radarr library with optional pagination and title filtering. Defaults to limit=25 to avoid very large responses. Use offset to fetch additional pages.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of movies to return (default: 25, max: 100) | |
| offset | No | Number of movies to skip before returning results (default: 0) | |
| search | No | Optional case-insensitive title filter |
Implementation Reference
- src/index.ts:382-403 (registration)Tool schema registration for 'radarr_get_movies' in the TOOLS array. Defines input schema with optional limit, offset, and search parameters. Only added when Radarr is configured (clients.radarr truthy).
{ name: "radarr_get_movies", description: "Get movies from Radarr library with optional pagination and title filtering. Defaults to limit=25 to avoid very large responses. Use offset to fetch additional pages.", inputSchema: { type: "object" as const, properties: { limit: { type: "number", description: "Maximum number of movies to return (default: 25, max: 100)", }, offset: { type: "number", description: "Number of movies to skip before returning results (default: 0)", }, search: { type: "string", description: "Optional case-insensitive title filter", }, }, required: [], }, }, - src/index.ts:1622-1665 (handler)Tool handler for 'radarr_get_movies' in the CallToolRequestSchema switch statement. Fetches all movies via clients.radarr.getMovies(), applies optional title filter, paginates with limit/offset, and returns JSON with movie metadata (id, title, year, status, hasFile, sizeOnDisk, monitored, studio).
case "radarr_get_movies": { if (!clients.radarr) throw new Error("Radarr not configured"); const { limit = 25, offset = 0, search } = args as { limit?: number; offset?: number; search?: string; }; const normalizedLimit = Math.max(1, Math.min(limit, 100)); const normalizedOffset = Math.max(0, offset); const filter = search?.trim().toLowerCase(); const allMovies = await clients.radarr.getMovies(); const filteredMovies = filter ? allMovies.filter(m => m.title.toLowerCase().includes(filter)) : allMovies; const pagedMovies = filteredMovies.slice(normalizedOffset, normalizedOffset + normalizedLimit); return { content: [{ type: "text", text: JSON.stringify({ total: allMovies.length, filteredCount: filteredMovies.length, returned: pagedMovies.length, offset: normalizedOffset, limit: normalizedLimit, hasMore: normalizedOffset + normalizedLimit < filteredMovies.length, nextOffset: normalizedOffset + normalizedLimit < filteredMovies.length ? normalizedOffset + normalizedLimit : null, search: search ?? null, movies: pagedMovies.map(m => ({ id: m.id, title: m.title, year: m.year, status: m.status, hasFile: m.hasFile, sizeOnDisk: formatBytes(m.sizeOnDisk), monitored: m.monitored, studio: m.studio, })), }, null, 2), }], }; } - src/arr-client.ts:637-639 (helper)RadarrClient.getMovies() helper method that calls the Radarr API's /movie endpoint to fetch all movies from the library.
async getMovies(): Promise<Movie[]> { return this['request']<Movie[]>('/movie'); }