radarr_refresh_movie
Triggers a metadata refresh for a movie in Radarr given its ID.
Instructions
Trigger a metadata refresh for a specific movie in Radarr
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| movieId | Yes | Movie ID to refresh |
Implementation Reference
- src/index.ts:1720-1740 (handler)The tool handler for 'radarr_refresh_movie' in the CallToolRequestSchema switch statement. Validates Radarr is configured, extracts movieId from args, fetches the movie metadata via getMovieById, triggers the refresh via refreshMovie, and returns success with movie details and command ID.
case "radarr_refresh_movie": { if (!clients.radarr) throw new Error("Radarr not configured"); const movieId = (args as { movieId: number }).movieId; const movie = await clients.radarr.getMovieById(movieId); const result = await clients.radarr.refreshMovie(movieId); return { content: [{ type: "text", text: JSON.stringify({ success: true, message: `Refresh triggered for movie`, movie: { id: movie.id, title: movie.title, year: movie.year, }, commandId: result.id, }, null, 2), }], }; } - src/index.ts:464-477 (schema)The tool registration/schema for 'radarr_refresh_movie' within the TOOLS array. Defines the tool name, description, and input schema requiring a 'movieId' number parameter.
{ name: "radarr_refresh_movie", description: "Trigger a metadata refresh for a specific movie in Radarr", inputSchema: { type: "object" as const, properties: { movieId: { type: "number", description: "Movie ID to refresh", }, }, required: ["movieId"], }, }, - src/index.ts:379-519 (registration)The conditional block (if (clients.radarr)) that registers all Radarr tools including radarr_refresh_movie into the TOOLS array. Only executed if Radarr is configured.
// Radarr tools if (clients.radarr) { TOOLS.push( { 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: [], }, }, { 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"], }, }, { name: "radarr_get_queue", description: "Get Radarr download queue. Supports pagination with limit and offset.", inputSchema: { type: "object" as const, properties: { limit: { type: "number", description: "Maximum number of queue items to return (default: 25, max: 100)", }, offset: { type: "number", description: "Number of queue items to skip before returning results (default: 0)", }, }, required: [], }, }, { name: "radarr_get_calendar", description: "Get upcoming movie releases from Radarr", inputSchema: { type: "object" as const, properties: { days: { type: "number", description: "Number of days to look ahead (default: 30)", }, }, required: [], }, }, { name: "radarr_search_movie", description: "Trigger a search to download a movie that's already in your library", inputSchema: { type: "object" as const, properties: { movieId: { type: "number", description: "Movie ID to search for", }, }, required: ["movieId"], }, }, { name: "radarr_refresh_movie", description: "Trigger a metadata refresh for a specific movie in Radarr", inputSchema: { type: "object" as const, properties: { movieId: { type: "number", description: "Movie ID to refresh", }, }, required: ["movieId"], }, }, { name: "radarr_add_movie", description: "Add a movie to Radarr. Use radarr_search first to find the tmdbId, and radarr_get_root_folders / radarr_get_quality_profiles to get valid values. Use radarr_get_tags to get valid tag IDs.", inputSchema: { type: "object" as const, properties: { tmdbId: { type: "number", description: "TMDB ID from radarr_search results", }, title: { type: "string", description: "Movie title", }, qualityProfileId: { type: "number", description: "Quality profile ID from radarr_get_quality_profiles", }, rootFolderPath: { type: "string", description: "Root folder path from radarr_get_root_folders", }, monitored: { type: "boolean", description: "Whether to monitor the movie (default: true)", }, minimumAvailability: { type: "string", enum: ["announced", "inCinemas", "released", "tba"], description: "When to consider the movie available (default: announced)", }, tags: { type: "array", items: { type: "number" }, description: "Array of tag IDs from radarr_get_tags (optional)", }, }, required: ["tmdbId", "title", "qualityProfileId", "rootFolderPath"], }, }, ); } - src/arr-client.ts:684-695 (helper)The RadarrClient.refreshMovie() method in the API client. Makes a POST request to /command with body {name: 'RefreshMovie', movieIds: [movieId]} to trigger a metadata refresh for a specific movie.
/** * Trigger a refresh for a specific movie */ async refreshMovie(movieId: number): Promise<{ id: number }> { return this['request']<{ id: number }>('/command', { method: 'POST', body: JSON.stringify({ name: 'RefreshMovie', movieIds: [movieId], }), }); } - src/arr-client.ts:629-695 (helper)The full RadarrClient class which extends ArrClient and contains the refreshMovie method along with other Radarr-specific methods like getMovies, getMovieById, searchMovie, etc.
export class RadarrClient extends ArrClient { constructor(config: ArrConfig) { super('radarr', config); } /** * Get all movies */ async getMovies(): Promise<Movie[]> { return this['request']<Movie[]>('/movie'); } /** * Get a specific movie */ async getMovieById(id: number): Promise<Movie> { return this['request']<Movie>(`/movie/${id}`); } /** * Search for movies */ async searchMovies(term: string): Promise<SearchResult[]> { return this['request']<SearchResult[]>(`/movie/lookup?term=${encodeURIComponent(term)}`); } /** * Add a movie */ async addMovie(movie: Partial<Movie> & { tmdbId: number; rootFolderPath: string; qualityProfileId: number }): Promise<Movie> { return this['request']<Movie>('/movie', { method: 'POST', body: JSON.stringify({ ...movie, monitored: movie.monitored ?? true, addOptions: { searchForMovie: true, }, }), }); } /** * Trigger a search for a movie */ async searchMovie(movieId: number): Promise<{ id: number }> { return this['request']<{ id: number }>('/command', { method: 'POST', body: JSON.stringify({ name: 'MoviesSearch', movieIds: [movieId], }), }); } /** * Trigger a refresh for a specific movie */ async refreshMovie(movieId: number): Promise<{ id: number }> { return this['request']<{ id: number }>('/command', { method: 'POST', body: JSON.stringify({ name: 'RefreshMovie', movieIds: [movieId], }), }); }