run_automation_rules
Trigger an automation rule on a specific test cycle using the rule key, project ID, and cycle ID. Returns a background task object with taskId and progressUrl to monitor completion.
Instructions
Trigger an automation rule to run against a specific test cycle. testCycleId is the internal id string (from get_test_cycle). Returns a background task object with taskId and progressUrl to poll for completion.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| automationRuleKey | Yes | Automation rule key to run | |
| projectId | Yes | Jira project numeric ID (e.g. 10011) | |
| testCycleId | Yes | Internal test cycle ID (from search_test_cycles) |
Implementation Reference
- src/index.ts:727-734 (handler)The async handler function that executes the 'run_automation_rules' tool. It makes a POST request to /automation-rule/{automationRuleKey}/run with projectId and testCycleId, returning the background task result.
async ({ automationRuleKey, projectId, testCycleId }) => ok( await qtmFetch(`/automation-rule/${automationRuleKey}/run`, { method: "POST", body: JSON.stringify({ projectId, testCycleId }), }) ) ); - src/index.ts:722-726 (schema)The input schema for run_automation_rules: requires automationRuleKey (string), projectId (number), and testCycleId (string).
{ automationRuleKey: z.string().describe("Automation rule key to run"), projectId: z.number().int().describe("Jira project numeric ID (e.g. 10011)"), testCycleId: z.string().describe("Internal test cycle ID (from search_test_cycles)"), }, - src/index.ts:719-734 (registration)Tool registration via the 'tool()' wrapper which calls server.registerTool with name 'run_automation_rules', description, inputSchema, and the handler callback.
tool( "run_automation_rules", "Trigger an automation rule to run against a specific test cycle. testCycleId is the internal id string (from get_test_cycle). Returns a background task object with taskId and progressUrl to poll for completion.", { automationRuleKey: z.string().describe("Automation rule key to run"), projectId: z.number().int().describe("Jira project numeric ID (e.g. 10011)"), testCycleId: z.string().describe("Internal test cycle ID (from search_test_cycles)"), }, async ({ automationRuleKey, projectId, testCycleId }) => ok( await qtmFetch(`/automation-rule/${automationRuleKey}/run`, { method: "POST", body: JSON.stringify({ projectId, testCycleId }), }) ) );