lidarr_get_root_folders
Retrieve root folder locations and storage information from Lidarr music management. View paths, available space, and unmapped folders for media organization.
Instructions
Get root folders and storage info from Lidarr (Music). Shows paths, free space, and unmapped folders.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:856-880 (handler)Tool handler in main switch statement: parses tool name to get LidarrClient, calls getRootFoldersDetailed(), formats and returns JSON response with folder details including free space.case "sonarr_get_root_folders": case "radarr_get_root_folders": case "lidarr_get_root_folders": case "readarr_get_root_folders": { const serviceName = name.split('_')[0] as keyof typeof clients; const client = clients[serviceName]; if (!client) throw new Error(`${serviceName} not configured`); const folders = await client.getRootFoldersDetailed(); return { content: [{ type: "text", text: JSON.stringify({ count: folders.length, folders: folders.map(f => ({ id: f.id, path: f.path, accessible: f.accessible, freeSpace: formatBytes(f.freeSpace), freeSpaceBytes: f.freeSpace, unmappedFolders: f.unmappedFolders?.length || 0, })), }, null, 2), }], }; }
- src/arr-client.ts:578-580 (handler)Core handler method in ArrClient (inherited by LidarrClient): makes API request to /rootfolder endpoint to fetch detailed root folder information.async getRootFoldersDetailed(): Promise<RootFolder[]> { return this.request<RootFolder[]>('/rootfolder'); }
- src/index.ts:177-177 (registration)Registers the lidarr_get_root_folders tool (among config tools) by calling addConfigTools when Lidarr client is configured.if (clients.lidarr) addConfigTools('lidarr', 'Lidarr (Music)');
- src/index.ts:127-133 (schema)Tool schema definition: name 'lidarr_get_root_folders', description, and empty input schema (no parameters required).name: `${serviceName}_get_root_folders`, description: `Get root folders and storage info from ${displayName}. Shows paths, free space, and unmapped folders.`, inputSchema: { type: "object" as const, properties: {}, required: [], },
- src/index.ts:76-78 (registration)Creates LidarrClient instance from environment config, enabling lidarr tools including get_root_folders.case 'lidarr': clients.lidarr = new LidarrClient(config); break;