Skip to main content
Glama
PhononX

Carbon Voice

by PhononX

get_root_folders

Read-only

Retrieve root folder listings for voice memo or prerecorded content in a Carbon Voice workspace, providing names, IDs, and basic structure information.

Instructions

Lists all root folders for a given workspace, including their names, IDs, and basic structure, but does not provide aggregate counts.(Required to inform message type:voicememo,prerecorded)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesFolder Type
include_all_treeNoReturn all folders tree
workspace_idNoWorkspace ID
sort_directionNoSort order directionASC
sort_byNoField to sort byname

Implementation Reference

  • The MCP tool registration includes the inline handler function for 'get_root_folders'. The handler takes args and authInfo, calls simplifiedApi.getAllRootFolders with authentication header, formats the response, and handles errors.
    server.registerTool(
      'get_root_folders',
      {
        description:
          'Lists all root folders for a given workspace, including their names, IDs, and basic structure, ' +
          'but does not provide aggregate counts.(Required to inform message type:voicememo,prerecorded)',
        inputSchema: getAllRootFoldersQueryParams.shape,
        annotations: {
          readOnlyHint: true,
          destructiveHint: false,
        },
      },
      async (
        args: GetAllRootFoldersParams,
        { authInfo },
      ): Promise<McpToolResponse> => {
        try {
          return formatToMCPToolResponse(
            await simplifiedApi.getAllRootFolders(
              args,
              setCarbonVoiceAuthHeader(authInfo?.token),
            ),
          );
        } catch (error) {
          logger.error('Error listing root folders:', { error });
          return formatToMCPToolResponse(error);
        }
      },
    );
  • Zod schema definition for input parameters to getAllRootFolders, used as inputSchema in the tool registration. Defines required 'type' and optional fields for filtering and sorting root folders.
    export const getAllRootFoldersQueryParams = zod.object({
      "type": zod.enum(['voicememo', 'prerecorded']).describe('Folder Type'),
      "include_all_tree": zod.boolean().optional().describe('Return all folders tree'),
      "workspace_id": zod.string().optional().describe('Workspace ID'),
      "sort_direction": zod.enum(['ASC', 'DESC']).default(getAllRootFoldersQuerySortDirectionDefault).describe('Sort order direction'),
      "sort_by": zod.enum(['created_at', 'last_updated_at', 'name']).default(getAllRootFoldersQuerySortByDefault).describe('Field to sort by')
    })
  • Generated API helper function that performs the HTTP GET request to '/simplified/folders' with query params to fetch root folders, called by the MCP tool handler.
    const getAllRootFolders = (
      params: GetAllRootFoldersParams,
      options?: SecondParameter<typeof mutator>,
    ) => {
      return mutator<ListFoldersResponse>(
        { url: `/simplified/folders`, method: 'GET', params },
        options,
      );
    };
  • TypeScript type definition for GetAllRootFoldersParams, used in the handler signature and API function.
    export type GetAllRootFoldersParams = {
      /**
       * Folder Type
       */
      type: GetAllRootFoldersType;
      /**
       * Return all folders tree
       */
      include_all_tree?: boolean;
      /**
       * Workspace ID
       */
      workspace_id?: string;
      /**
       * Sort order direction
       */
      sort_direction?: GetAllRootFoldersSortDirection;
      /**
       * Field to sort by
       */
      sort_by?: GetAllRootFoldersSortBy;
    };
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the agent knows this is a safe read operation. The description adds useful context about what is included (names, IDs, basic structure) and excluded (aggregate counts), but doesn't mention pagination, rate limits, or authentication requirements beyond what annotations provide.

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

Conciseness3/5

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

The description is reasonably concise with two sentences, but the second sentence ('Required to inform message type...') is awkwardly phrased and could be integrated more smoothly. The structure is front-loaded with the core purpose, but the parenthetical feels tacked on rather than flowing naturally.

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 moderate complexity (5 parameters, no output schema), the description is adequate but has gaps. It covers the basic purpose and some behavioral context, but doesn't explain return format, error conditions, or how it differs from similar folder-related tools. With annotations covering safety, it's minimally viable but not comprehensive.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema fully documents all 5 parameters. The description adds minimal value beyond the schema by implying the 'type' parameter is required and hinting at its purpose ('Required to inform message type'), but doesn't provide additional semantic context for parameters like 'include_all_tree' or sorting options.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Lists all root folders for a given workspace, including their names, IDs, and basic structure.' It specifies the resource (root folders) and verb (lists), but doesn't explicitly differentiate from sibling tools like 'get_folder' or 'get_folder_with_messages' in terms of scope or depth.

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?

The description provides no guidance on when to use this tool versus alternatives like 'get_folder' or 'get_folder_with_messages'. It mentions a required parameter constraint ('Required to inform message type:voicememo,prerecorded'), but this is more about parameter usage than tool selection context.

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/PhononX/cv-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server