Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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), }], }; }
  • 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)');
  • 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;

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