Skip to main content
Glama

radarr_search

Search for movies to add to your Radarr media library by entering a movie title or search term.

Instructions

Search for movies to add to Radarr

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termYesSearch term (movie name)

Implementation Reference

  • Handler function in the MCP tool call switch statement that extracts the search term, calls RadarrClient.searchMovies(term), limits results to 10, and returns formatted JSON response.
    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), }], }; }
  • Input schema definition and tool registration (added to TOOLS array if Radarr client configured). Defines required 'term' string parameter.
    name: "radarr_search", description: "Search for movies to add to Radarr", inputSchema: { type: "object" as const, properties: { term: { type: "string", description: "Search term (movie name)", }, }, required: ["term"], }, },
  • Core handler method in RadarrClient that performs the actual API request to Radarr's /movie/lookup endpoint with the search term.
    async searchMovies(term: string): Promise<SearchResult[]> { return this['request']<SearchResult[]>(`/movie/lookup?term=${encodeURIComponent(term)}`); }
  • RadarrClient class definition including the searchMovies method and other movie-related helpers.
    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)}`); }
  • src/index.ts:67-86 (registration)
    Client instantiation loop where RadarrClient is created if RADARR_URL and RADARR_API_KEY are set, enabling radarr_search tool.
    for (const service of configuredServices) { const config = { url: service.url!, apiKey: service.apiKey! }; switch (service.name) { case 'sonarr': clients.sonarr = new SonarrClient(config); break; case 'radarr': clients.radarr = new RadarrClient(config); break; case 'lidarr': clients.lidarr = new LidarrClient(config); break; case 'readarr': clients.readarr = new ReadarrClient(config); break; case 'prowlarr': clients.prowlarr = new ProwlarrClient(config); break; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aplaceforallmystuff/mcp-arr'

If you have feedback or need assistance with the MCP directory API, please join our Discord server