radarr_get_root_folders
Retrieve root folder paths, free space, and unmapped folders from Radarr for movie storage management.
Instructions
Get root folders and storage info from Radarr (Movies). Shows paths, free space, and unmapped folders.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:152-160 (registration)The tool 'radarr_get_root_folders' is registered in the TOOLS array via the addConfigTools() function. It's created dynamically with the name `${serviceName}_get_root_folders` where serviceName is 'radarr' (line 202). The description states it returns root folders and storage info with paths, free space, and unmapped folders.
{ 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:155-159 (schema)The input schema for 'radarr_get_root_folders' is an empty object with no required properties (type: object, properties: {}, required: []), meaning it takes no arguments.
inputSchema: { type: "object" as const, properties: {}, required: [], }, - src/index.ts:1246-1268 (handler)The handler for 'radarr_get_root_folders' is in the CallToolRequestSchema switch statement at case 'radarr_get_root_folders' (line 1246). It delegates to the service name extracted from the tool name, calls the client's getRootFoldersDetailed() method, and returns formatted JSON with count, folders (id, path, accessible, freeSpace formatted as human-readable, freeSpaceBytes, unmappedFolders count).
case "radarr_get_root_folders": case "lidarr_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:520-523 (helper)The getRootFoldersDetailed() method on ArrClient is the underlying API call. It makes a GET request to '/rootfolder' and returns an array of RootFolder objects (id, path, accessible, freeSpace, unmappedFolders).
*/ async getRootFoldersDetailed(): Promise<RootFolder[]> { return this.request<RootFolder[]>('/rootfolder'); } - src/arr-client.ts:343-349 (helper)The RootFolder interface defines the shape of data returned from the API: id, path, accessible, freeSpace, and optional unmappedFolders array.
export interface RootFolder { id: number; path: string; accessible: boolean; freeSpace: number; unmappedFolders?: Array<{ name: string; path: string }>; }