radarr_search
Search for movies by name to find tmdbId, which is required to add movies via radarr_add_movie.
Instructions
Search for movies by name. Returns results with tmdbId needed for radarr_add_movie.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| term | Yes | Search term (movie name) |
Implementation Reference
- src/index.ts:404-417 (registration)Tool registration for 'radarr_search' as an MCP tool with input schema requiring a 'term' (string) parameter.
{ name: "radarr_search", description: "Search for movies by name. Returns results with tmdbId needed for radarr_add_movie.", inputSchema: { type: "object" as const, properties: { term: { type: "string", description: "Search term (movie name)", }, }, required: ["term"], }, }, - src/index.ts:1667-1686 (handler)Handler for the 'radarr_search' tool call. Calls clients.radarr.searchMovies(term) and returns JSON with title, year, tmdbId, imdbId, and overview.
case "radarr_search": { if (!clients.radarr) throw new Error("Radarr not configured"); const term = (args as { term: string }).term; const results = await clients.radarr.searchMovies(term); return { content: [{ type: "text", text: JSON.stringify({ count: results.length, results: results.slice(0, 10).map(r => ({ title: r.title, year: r.year, tmdbId: r.tmdbId, imdbId: r.imdbId, overview: r.overview?.substring(0, 200) + (r.overview && r.overview.length > 200 ? '...' : ''), })), }, null, 2), }], }; } - src/arr-client.ts:651-653 (helper)RadarrClient.searchMovies(term) method - executes the API call to /movie/lookup?term=... on the Radarr instance.
async searchMovies(term: string): Promise<SearchResult[]> { return this['request']<SearchResult[]>(`/movie/lookup?term=${encodeURIComponent(term)}`); } - src/arr-client.ts:363-380 (schema)SearchResult type definition used as return type for searchMovies (contains title, year, tmdbId, imdbId, overview, etc.).
export interface SearchResult { title: string; sortTitle: string; status: string; overview: string; year: number; images: Array<{ coverType: string; url: string }>; remotePoster?: string; // Sonarr specific tvdbId?: number; // Radarr specific tmdbId?: number; imdbId?: string; // Lidarr specific foreignArtistId?: string; artistName?: string; disambiguation?: string; }