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
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Jira project numeric ID (e.g. 10011) | |
| folderName | Yes | Folder name | |
| folderType | Yes | Folder type | |
| parentId | Yes | Parent folder ID (use 0 for root) | |
| description | No | Folder 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 ); - src/index.ts:667-680 (handler)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 }), }) ); } - src/index.ts:660-665 (schema)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"),