list_workflow_rules
Retrieve automation rules for projects or globally to manage workflow configurations and enable rule filtering by project or status.
Instructions
List all automation rules for a project or globally
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | No | Project ID to filter rules (optional) | |
| enabled_only | No | Only return enabled rules |
Implementation Reference
- src/tools/workflow-automation.ts:140-155 (handler)The main execution handler for the list_workflow_rules tool. Parses input with Zod schema, queries Supabase for workflow rules filtered by project_id and enabled_only, and returns the list with summary counts.export const listWorkflowRules = requireAuth(async (args: any) => { const { project_id, enabled_only } = ListWorkflowRulesSchema.parse(args) logger.info('Listing workflow rules', { project_id, enabled_only }) const rules = await supabaseService.getWorkflowRules({ project_id, enabled: enabled_only ? true : undefined }) return { rules, total_rules: rules.length, active_rules: rules.filter(r => r.enabled).length } })
- Zod schema used for input validation in the list_workflow_rules handler.const ListWorkflowRulesSchema = z.object({ project_id: z.string().optional(), enabled_only: z.boolean().default(true) })
- src/tools/workflow-automation.ts:116-133 (registration)MCPTool registration object defining the tool name, description, and JSON input schema.export const listWorkflowRulesTool: MCPTool = { name: 'list_workflow_rules', description: 'List all automation rules for a project or globally', inputSchema: { type: 'object', properties: { project_id: { type: 'string', description: 'Project ID to filter rules (optional)' }, enabled_only: { type: 'boolean', default: true, description: 'Only return enabled rules' } } } }
- src/tools/workflow-automation.ts:602-608 (registration)Export of handler map including list_workflow_rules, likely used for central handler registration.export const workflowAutomationHandlers = { create_workflow_rule: createWorkflowRule, list_workflow_rules: listWorkflowRules, execute_workflow_rule: executeWorkflowRule, create_trigger_automation: createTriggerAutomation, get_automation_analytics: getAutomationAnalytics }