Skip to main content
Glama

sonarr_get_root_folders

Retrieves root folder paths, free space, and unmapped folders from Sonarr for TV storage management.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:153-160 (registration)
    Tool 'sonarr_get_root_folders' is dynamically registered via addConfigTools('sonarr', ...). This generates the tool name, description, and inputSchema for sonarr_get_root_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: [],
      },
    },
  • The getRootFoldersDetailed() method on ArrClient (base class of SonarrClient) calls the /rootfolder API endpoint and returns RootFolder[] with full details (id, path, accessible, freeSpace, unmappedFolders).
     */
    async getRootFoldersDetailed(): Promise<RootFolder[]> {
      return this.request<RootFolder[]>('/rootfolder');
    }
  • The handler for sonarr_get_root_folders (alongside radarr_ and lidarr_ variants) resolves the service name, calls client.getRootFoldersDetailed(), and formats the response with folder details including formatted free space.
    case "sonarr_get_root_folders":
    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),
        }],
      };
    }
Behavior3/5

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

Annotations are missing, so description carries full burden. It lists the data returned (paths, free space, unmapped folders), implying a read-only operation. However, it does not explicitly state that it is non-destructive, requires no special permissions, or disclose any behavioral traits like rate limits or caching.

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?

Single sentence that is concise and front-loaded. Every word provides value, no fluff. Efficient structure.

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

Completeness5/5

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

For a parameterless tool with no output schema, the description adequately explains what the tool returns (paths, free space, unmapped folders). It covers the essential information needed to understand the tool's purpose and output.

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?

Input schema has zero parameters and 100% coverage, so no additional explanation needed. The description adds no parameter info but also does not need to. Baseline for 0 params is 4.

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 verb 'Get', the resource 'root folders and storage info', and specifies the context 'from Sonarr (TV)'. It distinguishes from sibling tools like lidarr_get_root_folders and radarr_get_root_folders by app name.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives. It does not mention prerequisites, typical scenarios, or when not to use it. Given many sibling tools, some usage context would help but is absent.

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