disable_automation_rule
Deactivate a GitHub Projects automation rule to pause its workflow while preserving its configuration for future use.
Instructions
Disable an automation rule without deleting it
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ruleId | Yes |
Implementation Reference
- The main handler function that disables the automation rule by calling the automation repository's disable method after verifying the rule exists.async disableAutomationRule(data: { ruleId: string }): Promise<{ id: string; name: string; enabled: boolean; }> { try { const rule = await this.automationRepo.findById(data.ruleId); if (!rule) { throw new ResourceNotFoundError(ResourceType.RELATIONSHIP, data.ruleId); } const updated = await this.automationRepo.disable(data.ruleId); return { id: updated.id, name: updated.name, enabled: updated.enabled }; } catch (error) { throw this.mapErrorToMCPError(error); } }
- Tool definition including input schema (ruleId: string) and description for the disable_automation_rule tool.export const disableAutomationRuleTool: ToolDefinition<DisableAutomationRuleArgs> = { name: "disable_automation_rule", description: "Disable an automation rule without deleting it", schema: disableAutomationRuleSchema as unknown as ToolSchema<DisableAutomationRuleArgs>, examples: [ { name: "Disable rule", description: "Temporarily disable an automation rule", args: { ruleId: "AR_kwDOLhQ7gc4AOEbH" } } ] };
- src/infrastructure/tools/ToolRegistry.ts:285-285 (registration)Registers the disableAutomationRuleTool in the central tool registry during initialization.this.registerTool(disableAutomationRuleTool);
- src/index.ts:484-485 (handler)MCP tool dispatcher that routes call_tool requests for disable_automation_rule to the ProjectManagementService handler.case "disable_automation_rule": return await this.service.disableAutomationRule(args);