Skip to main content
Glama

readarr_get_root_folders

Retrieve root folder paths, storage availability, and unmapped folders from Readarr to manage book library organization and storage allocation.

Instructions

Get root folders and storage info from Readarr (Books). Shows paths, free space, and unmapped folders.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for readarr_get_root_folders tool: extracts service name, retrieves ReadarrClient instance, calls getRootFoldersDetailed(), formats and returns root folder details including free space and unmapped folder count.
    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/index.ts:127-134 (registration)
    Registers the readarr_get_root_folders tool in the TOOLS array via dynamic template in addConfigTools function (called for readarr service). Defines name, description, and empty input schema.
      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: [],
      },
    },
  • Input schema for readarr_get_root_folders tool: empty object (no parameters required).
    inputSchema: {
      type: "object" as const,
      properties: {},
      required: [],
  • Core helper method getRootFoldersDetailed() in ArrClient (extended by ReadarrClient) that performs the actual API request to fetch detailed root folder information from /rootfolder endpoint.
    async getRootFoldersDetailed(): Promise<RootFolder[]> {
      return this.request<RootFolder[]>('/rootfolder');
    }
  • Type definition for RootFolder interface used in getRootFoldersDetailed() response, including unmappedFolders for detailed storage info.
    export interface RootFolder {
      id: number;
      path: string;
      accessible: boolean;
      freeSpace: number;
      unmappedFolders?: Array<{ name: string; path: string }>;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions what information is returned but fails to describe critical traits like whether this is a read-only operation (implied by 'Get' but not explicit), authentication requirements, rate limits, error conditions, or response format. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that front-loads the core purpose ('Get root folders and storage info') followed by specific details about what's included. Every word earns its place with zero fluff or repetition, making it highly efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema), the description provides adequate context for basic understanding. However, with no annotations and no output schema, it should ideally mention the read-only nature and typical response structure to be fully complete. It's minimally viable but leaves behavioral aspects uncovered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage (empty schema). The description appropriately adds no parameter information since none exist, which is correct and avoids redundancy. It earns a 4 because it doesn't waste space on non-existent parameters while maintaining clarity about the tool's purpose.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get'), resource ('root folders and storage info'), and domain ('from Readarr (Books)'), with explicit details on what information is returned ('paths, free space, and unmapped folders'). It distinguishes from siblings like 'readarr_get_authors' or 'readarr_get_books' by focusing on storage infrastructure rather than media content.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for retrieving storage-related information in Readarr, but provides no explicit guidance on when to use this tool versus alternatives (e.g., no comparison to similar 'get_root_folders' tools in Lidarr, Radarr, or Sonarr). It lacks context about prerequisites or exclusions, leaving usage somewhat open to interpretation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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