Skip to main content
Glama

create_folder

Create a new folder for test cases, cycles, or plans in a Jira project. Requires project ID, folder name, folder type, and parent folder ID (use 0 for root). Returns the created folder ID.

Instructions

Create a new folder under an existing parent folder. Use parentId=0 for root-level. folderName is required. Returns the created folder with its id. Use list_folders first to find valid parentId values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesJira project numeric ID (e.g. 10011)
folderNameYesFolder name
folderTypeYesFolder type
parentIdYesParent folder ID (use 0 for root)
descriptionNoFolder description

Implementation Reference

  • src/index.ts:172-184 (registration)
    The 'tool' helper function that wraps server.registerTool to register an MCP tool with its name, description, input schema, and callback handler.
    const tool = <Shape extends z.ZodRawShape>(
      name: string,
      description: string,
      inputSchema: Shape,
      // eslint-disable-next-line @typescript-eslint/no-explicit-any
      callback: (args: z.infer<z.ZodObject<Shape>>) => Promise<any>
    ) =>
      server.registerTool(
        name,
        { description, inputSchema },
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        callback as any
      );
  • Handler for create_folder tool: maps folderType to API segment, POSTs to /projects/{projectId}/{typeSegment} with folderName, parentId, description.
    async ({ projectId, folderType, folderName, parentId, description }) => {
      const folderSegments: Record<string, string> = {
        TESTCASE: "testcase-folders",
        TESTCYCLE: "testcycle-folders",
        TESTPLAN: "testplan-folders",
      };
      const typeSegment = folderSegments[folderType];
      return ok(
        await qtmFetch(`/projects/${projectId}/${typeSegment}`, {
          method: "POST",
          body: JSON.stringify({ folderName, parentId, description }),
        })
      );
    }
  • Input schema for create_folder: projectId, folderName (required), folderType (TESTCASE|TESTCYCLE|TESTPLAN), parentId, and optional description.
    {
      projectId: z.union([z.string(), z.number()]).describe("Jira project numeric ID (e.g. 10011)"),
      folderName: z.string().describe("Folder name"),
      folderType: z.enum(["TESTCASE", "TESTCYCLE", "TESTPLAN"]).describe("Folder type"),
      parentId: z.number().int().describe("Parent folder ID (use 0 for root)"),
      description: z.string().optional().describe("Folder description"),
Behavior4/5

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

Describes return value ('Returns the created folder with its id') and implies creation behavior. No annotation provided, so description carries full burden; lacks error condition details but adequate for a creation tool.

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?

Two sentences, front-loaded with verb and resource. Every sentence adds value; no redundancy.

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?

Given 5 parameters, no output schema, and sibling tools, the description covers purpose, parameter usage, return, and prerequisite tool. Thorough and actionable.

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

Parameters5/5

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

Adds meaning beyond schema: clarifies parentId=0 for root and pre-requisite of list_folders. Schema coverage is 100% but description adds actionable context.

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?

Clearly states action ('Create a new folder') and resource ('under an existing parent folder'). Distinguishes from sibling 'list_folders' by recommending it as a precursor.

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

Usage Guidelines5/5

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

Explicitly guides on using parentId=0 for root, requiring folderName, and advising to use list_folders first to find valid parentId values.

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/salehrifai42/qmetrymcp'

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