Skip to main content
Glama

list_folders

Retrieve folder structures in Jira projects to organize test management workflows, supporting pagination and subfolder navigation.

Instructions

List folders in a project or specific folder

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectKeyNoJira project key to filter folders
folderIdNoParent folder ID to list subfolders
maxResultsNoMaximum number of results to return (default: 50, max: 1000)
startAtNoStarting position for pagination (default: 0)

Implementation Reference

  • The main handler function for the 'list_folders' tool. It constructs parameters from args, calls ZephyrClient.getFolders, formats the response as JSON text content, and handles errors using formatError.
    async function listFolders(args) {
      try {
        const params = {
          projectKey: args.projectKey,
          folderId: args.folderId,
          maxResults: args.maxResults || config.defaultMaxResults,
          startAt: args.startAt || 0
        };
    
        const response = await client.getFolders(params);
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                folders: response.values || response,
                total: response.total || response.length,
                startAt: response.startAt || 0,
                maxResults: response.maxResults || params.maxResults
              }, null, 2)
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: formatError(error, 'fetching folders')
            }
          ],
          isError: true
        };
      }
    }
  • Input schema for the 'list_folders' tool, defining properties for projectKey, folderId, maxResults, and startAt with types, descriptions, patterns, and defaults.
    inputSchema: {
      type: 'object',
      properties: {
        projectKey: {
          type: 'string',
          description: 'Jira project key to filter folders',
          pattern: config.projectKeyPattern.source
        },
        folderId: {
          type: 'string',
          description: 'Parent folder ID to list subfolders',
          pattern: config.folderIdPattern.source
        },
        maxResults: {
          type: 'number',
          description: 'Maximum number of results to return (default: 50, max: 1000)',
          minimum: 1,
          maximum: config.maxMaxResults,
          default: config.defaultMaxResults
        },
        startAt: {
          type: 'number',
          description: 'Starting position for pagination (default: 0)',
          minimum: 0,
          default: 0
        }
      }
    },
  • The tool registration object for 'list_folders' exported as part of folderTools array, which is included in the main allTools array used by the MCP server for dynamic tool dispatching.
    {
      name: 'list_folders',
      description: 'List folders in a project or specific folder',
      inputSchema: {
        type: 'object',
        properties: {
          projectKey: {
            type: 'string',
            description: 'Jira project key to filter folders',
            pattern: config.projectKeyPattern.source
          },
          folderId: {
            type: 'string',
            description: 'Parent folder ID to list subfolders',
            pattern: config.folderIdPattern.source
          },
          maxResults: {
            type: 'number',
            description: 'Maximum number of results to return (default: 50, max: 1000)',
            minimum: 1,
            maximum: config.maxMaxResults,
            default: config.defaultMaxResults
          },
          startAt: {
            type: 'number',
            description: 'Starting position for pagination (default: 0)',
            minimum: 0,
            default: 0
          }
        }
      },
      handler: listFolders
    },
Behavior2/5

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

With no annotations provided, the description carries full burden but lacks behavioral details. It doesn't disclose that this is a read-only operation (implied by 'List'), pagination behavior (hinted by parameters but not explained), rate limits, authentication needs, or what happens if no folders exist (e.g., returns empty list). The description adds minimal context beyond the basic action.

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, efficient sentence with zero wasted words. It front-loads the core purpose ('List folders') and immediately specifies the scope, making it easy to parse. Every word earns its place.

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 (4 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks guidance on usage, behavioral traits, and output expectations. For a list operation with pagination parameters, more context on result format or error cases would improve completeness.

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%, providing full parameter documentation. The description adds marginal value by implying the relationship between 'projectKey' and 'folderId' (listing in a project OR specific folder), but doesn't clarify mutual exclusivity or default behavior when neither is provided. Baseline 3 is appropriate as the schema does the heavy lifting.

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 verb ('List') and resource ('folders'), specifying the scope ('in a project or specific folder'). It distinguishes from siblings like 'get_folder' (singular retrieval) and 'list_projects' (different resource), though it doesn't explicitly contrast with 'list_test_cases' or other list tools.

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. It doesn't mention prerequisites (e.g., needing project access), exclusions (e.g., cannot list all folders across projects), or comparisons to siblings like 'list_projects' for project-level navigation or 'get_folder' for single-folder details.

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/donyfs/mcp-zephyr'

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