Skip to main content
Glama

list_automation_rules

Retrieve all configured automation rules for a GitHub project to manage workflows and processes.

Instructions

List all automation rules for a GitHub project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYes

Implementation Reference

  • Main handler function that executes the list_automation_rules tool. Verifies the project exists and fetches all automation rules for the given project ID from the automation repository, summarizing each rule with counts of triggers and actions.
    async listAutomationRules(data: { projectId: string }): Promise<{ rules: Array<{ id: string; name: string; description?: string; enabled: boolean; triggersCount: number; actionsCount: number; }>; }> { try { // Verify project exists const project = await this.projectRepo.findById(data.projectId); if (!project) { throw new ResourceNotFoundError(ResourceType.PROJECT, data.projectId); } const rules = await this.automationRepo.findByProject(data.projectId); return { rules: rules.map(rule => ({ id: rule.id, name: rule.name, description: rule.description, enabled: rule.enabled, triggersCount: rule.triggers.length, actionsCount: rule.actions.length })) }; } catch (error) { throw this.mapErrorToMCPError(error); } }
  • Zod schema definition for list_automation_rules tool input (requires projectId) and the complete ToolDefinition object including schema reference, description, and example usage.
    export const listAutomationRulesSchema = z.object({ projectId: z.string().min(1, "Project ID is required") }); export type ListAutomationRulesArgs = z.infer<typeof listAutomationRulesSchema>; // Schema for enable_automation_rule tool export const enableAutomationRuleSchema = z.object({ ruleId: z.string().min(1, "Rule ID is required") }); export type EnableAutomationRuleArgs = z.infer<typeof enableAutomationRuleSchema>; // Schema for disable_automation_rule tool export const disableAutomationRuleSchema = z.object({ ruleId: z.string().min(1, "Rule ID is required") }); export type DisableAutomationRuleArgs = z.infer<typeof disableAutomationRuleSchema>; // ============================================================================ // Iteration Management Tools // ============================================================================ // Schema for get_iteration_configuration tool export const getIterationConfigurationSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), fieldName: z.string().optional() }); export type GetIterationConfigurationArgs = z.infer<typeof getIterationConfigurationSchema>; // Schema for get_current_iteration tool export const getCurrentIterationSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), fieldName: z.string().optional() }); export type GetCurrentIterationArgs = z.infer<typeof getCurrentIterationSchema>; // Schema for get_iteration_items tool export const getIterationItemsSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), iterationId: z.string().min(1, "Iteration ID is required"), limit: z.number().int().positive().default(50).optional() }); export type GetIterationItemsArgs = z.infer<typeof getIterationItemsSchema>; // Schema for get_iteration_by_date tool export const getIterationByDateSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), date: z.string().datetime("Date must be a valid ISO date string"), fieldName: z.string().optional() }); export type GetIterationByDateArgs = z.infer<typeof getIterationByDateSchema>; // Schema for assign_items_to_iteration tool export const assignItemsToIterationSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), itemIds: z.array(z.string()).min(1, "At least one item ID is required"), iterationId: z.string().min(1, "Iteration ID is required"), fieldName: z.string().optional() }); export type AssignItemsToIterationArgs = z.infer<typeof assignItemsToIterationSchema>; // ============================================================================ // AI-Powered Automation Tools // ============================================================================ // Schema for generate_roadmap tool export const generateRoadmapSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), projectTitle: z.string().min(1, "Project title is required"), projectDescription: z.string().optional(), sprintDurationWeeks: z.number().int().positive().default(2).optional(), targetMilestones: z.number().int().positive().default(4).optional(), autoCreate: z.boolean().default(false).optional() }); export type GenerateRoadmapArgs = z.infer<typeof generateRoadmapSchema>; // Schema for enrich_issue tool export const enrichIssueSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), issueId: z.string().min(1, "Issue ID is required"), issueNumber: z.number().int().positive(), issueTitle: z.string().min(1, "Issue title is required"), issueDescription: z.string().optional(), projectContext: z.string().optional(), autoApply: z.boolean().default(false).optional() }); export type EnrichIssueArgs = z.infer<typeof enrichIssueSchema>; // Schema for enrich_issues_bulk tool export const enrichIssuesBulkSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), issueIds: z.array(z.string()).optional(), projectContext: z.string().optional(), autoApply: z.boolean().default(false).optional() }); export type EnrichIssuesBulkArgs = z.infer<typeof enrichIssuesBulkSchema>; // Schema for triage_issue tool export const triageIssueSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), issueId: z.string().min(1, "Issue ID is required"), issueNumber: z.number().int().positive(), issueTitle: z.string().min(1, "Issue title is required"), issueDescription: z.string().optional(), projectContext: z.string().optional(), autoApply: z.boolean().default(false).optional() }); export type TriageIssueArgs = z.infer<typeof triageIssueSchema>; // Schema for triage_all_issues tool export const triageAllIssuesSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), onlyUntriaged: z.boolean().default(true).optional(), autoApply: z.boolean().default(false).optional(), projectContext: z.string().optional() }); export type TriageAllIssuesArgs = z.infer<typeof triageAllIssuesSchema>; // Schema for schedule_triaging tool export const scheduleTriagingSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), schedule: z.enum(['hourly', 'daily', 'weekly']), autoApply: z.boolean().default(false) }); export type ScheduleTriagingArgs = z.infer<typeof scheduleTriagingSchema>; // Project tools export const updateProjectTool: ToolDefinition<UpdateProjectArgs> = { name: "update_project", description: "Update an existing GitHub project", schema: updateProjectSchema as unknown as ToolSchema<UpdateProjectArgs>, examples: [ { name: "Update project title and visibility", description: "Change a project's title and make it public", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", title: "Updated API Development", visibility: "public" } }, { name: "Close a project", description: "Mark a project as closed", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", status: "closed" } } ] }; export const deleteProjectTool: ToolDefinition<DeleteProjectArgs> = { name: "delete_project", description: "Delete a GitHub project", schema: deleteProjectSchema as unknown as ToolSchema<DeleteProjectArgs>, examples: [ { name: "Delete project", description: "Delete a GitHub project by ID", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH" } } ] }; export const getProjectReadmeTool: ToolDefinition<GetProjectReadmeArgs> = { name: "get_project_readme", description: "Get the README content of a GitHub project", schema: getProjectReadmeSchema as unknown as ToolSchema<GetProjectReadmeArgs>, examples: [ { name: "Get project README", description: "Retrieve the README for a project", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH" } } ] }; export const updateProjectReadmeTool: ToolDefinition<UpdateProjectReadmeArgs> = { name: "update_project_readme", description: "Update the README content of a GitHub project", schema: updateProjectReadmeSchema as unknown as ToolSchema<UpdateProjectReadmeArgs>, examples: [ { name: "Set project README", description: "Update the project README with documentation", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", readme: "# Project Overview\n\nThis project tracks our development roadmap..." } } ] }; export const listProjectFieldsTool: ToolDefinition<ListProjectFieldsArgs> = { name: "list_project_fields", description: "List all fields in a GitHub project", schema: listProjectFieldsSchema as unknown as ToolSchema<ListProjectFieldsArgs>, examples: [ { name: "List project fields", description: "Get all fields for a specific project", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH" } } ] }; export const updateProjectFieldTool: ToolDefinition<UpdateProjectFieldArgs> = { name: "update_project_field", description: "Update a custom field in a GitHub project", schema: updateProjectFieldSchema as unknown as ToolSchema<UpdateProjectFieldArgs>, examples: [ { name: "Update field options", description: "Update options for a single-select field", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI1", name: "Updated Status", options: [ { name: "Not Started", color: "red" }, { name: "In Progress", color: "yellow" }, { name: "Review", color: "blue" }, { name: "Complete", color: "green" } ] } } ] }; export const addProjectItemTool: ToolDefinition<AddProjectItemArgs> = { name: "add_project_item", description: "Add an item to a GitHub project", schema: addProjectItemSchema as unknown as ToolSchema<AddProjectItemArgs>, examples: [ { name: "Add issue to project", description: "Add an existing issue to a project", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", contentId: "I_kwDOJrIzLs5eGXAT", contentType: "issue" } } ] }; export const removeProjectItemTool: ToolDefinition<RemoveProjectItemArgs> = { name: "remove_project_item", description: "Remove an item from a GitHub project", schema: removeProjectItemSchema as unknown as ToolSchema<RemoveProjectItemArgs>, examples: [ { name: "Remove item from project", description: "Remove an item from a project", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7" } } ] }; export const listProjectItemsTool: ToolDefinition<ListProjectItemsArgs> = { name: "list_project_items", description: "List all items in a GitHub project", schema: listProjectItemsSchema as unknown as ToolSchema<ListProjectItemsArgs>, examples: [ { name: "List project items", description: "Get all items in a project with limit", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", limit: 20 } } ] }; export const archiveProjectItemTool: ToolDefinition<ArchiveProjectItemArgs> = { name: "archive_project_item", description: "Archive an item in a GitHub project. Archived items are hidden from views but not deleted.", schema: archiveProjectItemSchema as unknown as ToolSchema<ArchiveProjectItemArgs>, examples: [ { name: "Archive completed task", description: "Archive a project item that is complete", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7" } } ] }; export const unarchiveProjectItemTool: ToolDefinition<UnarchiveProjectItemArgs> = { name: "unarchive_project_item", description: "Unarchive an item in a GitHub project. Brings back a previously archived item.", schema: unarchiveProjectItemSchema as unknown as ToolSchema<UnarchiveProjectItemArgs>, examples: [ { name: "Unarchive task", description: "Restore an archived project item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7" } } ] }; export const setFieldValueTool: ToolDefinition<SetFieldValueArgs> = { name: "set_field_value", description: "Set a field value for a GitHub project item. Supports all field types: TEXT, NUMBER, DATE, SINGLE_SELECT, ITERATION, MILESTONE, ASSIGNEES, LABELS", schema: setFieldValueSchema as unknown as ToolSchema<SetFieldValueArgs>, examples: [ { name: "Set text field value", description: "Set a text field value for a project item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI1", value: "Updated task description" } }, { name: "Set number field value", description: "Set a number field (e.g., story points) for a project item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI2", value: 8 } }, { name: "Set date field value", description: "Set a date field for a project item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI3", value: "2025-06-15" } }, { name: "Set single select field value", description: "Set status field value for a project item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI4", value: "In Progress" } }, { name: "Set iteration field value", description: "Assign a project item to a specific iteration/sprint", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI5", value: "PVTI_kwDOLhQ7gc4AOEbHzM4AOAIter1" } }, { name: "Set milestone field value", description: "Assign a project item to a specific milestone", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI6", value: "MI_kwDOLhQ7gc4AOEbHzM4AOAMile1" } }, { name: "Set assignees field value", description: "Assign multiple users to a project item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI7", value: ["MDQ6VXNlcjEyMzQ1Njc4", "MDQ6VXNlcjg3NjU0MzIx"] } }, { name: "Set single assignee field value", description: "Assign a single user to a project item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI7", value: "MDQ6VXNlcjEyMzQ1Njc4" } }, { name: "Set labels field value", description: "Assign multiple labels to a project item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI8", value: ["LA_kwDOLhQ7gc4AOEbHzM4AOAL1", "LA_kwDOLhQ7gc4AOEbHzM4AOAL2"] } }, { name: "Set single label field value", description: "Assign a single label to a project item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI8", value: "LA_kwDOLhQ7gc4AOEbHzM4AOAL1" } } ] }; export const getFieldValueTool: ToolDefinition<GetFieldValueArgs> = { name: "get_field_value", description: "Get a field value for a GitHub project item. Supports reading all field types: TEXT, NUMBER, DATE, SINGLE_SELECT, ITERATION, MILESTONE, ASSIGNEES, LABELS", schema: getFieldValueSchema as unknown as ToolSchema<GetFieldValueArgs>, examples: [ { name: "Get text field value", description: "Get the current text value for an item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI1" } }, { name: "Get status field value", description: "Get the current status (single select) value for an item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI2" } }, { name: "Get iteration field value", description: "Get the current iteration/sprint assignment for an item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI3" } }, { name: "Get milestone field value", description: "Get the current milestone assignment for an item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI4" } }, { name: "Get assignees field value", description: "Get the current assignees for an item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI5" } }, { name: "Get labels field value", description: "Get the current labels for an item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI6" } } ] }; export const clearFieldValueTool: ToolDefinition<ClearFieldValueArgs> = { name: "clear_field_value", description: "Clear a field value for a GitHub project item. This removes/clears the value for any field type.", schema: clearFieldValueSchema as unknown as ToolSchema<ClearFieldValueArgs>, examples: [ { name: "Clear status field", description: "Clear the status field for an item", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI1" } }, { name: "Clear iteration assignment", description: "Remove an item from its current iteration/sprint", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", itemId: "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", fieldId: "PVTF_lADOLhQ7gc4AOEbHzM4AOAI2" } } ] }; export const listProjectViewsTool: ToolDefinition<ListProjectViewsArgs> = { name: "list_project_views", description: "List all views in a GitHub project", schema: listProjectViewsSchema as unknown as ToolSchema<ListProjectViewsArgs>, examples: [ { name: "List project views", description: "Get all views for a specific project", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH" } } ] }; export const updateProjectViewTool: ToolDefinition<UpdateProjectViewArgs> = { name: "update_project_view", description: "Update a view in a GitHub project", schema: updateProjectViewSchema as unknown as ToolSchema<UpdateProjectViewArgs>, examples: [ { name: "Update view to timeline", description: "Change a view's name and layout to timeline", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", viewId: "PVV_lADOLhQ7gc4AOEbHzM4AOAL9", name: "Development Timeline", layout: "timeline" } } ] }; export const deleteProjectViewTool: ToolDefinition<DeleteProjectViewArgs> = { name: "delete_project_view", description: "Delete a view from a GitHub project", schema: deleteProjectViewSchema as unknown as ToolSchema<DeleteProjectViewArgs>, examples: [ { name: "Delete project view", description: "Delete a specific view from a project", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", viewId: "PVV_lADOLhQ7gc4AOEbHzM4AOAL9" } } ] }; export const updateMilestoneTool: ToolDefinition<UpdateMilestoneArgs> = { name: "update_milestone", description: "Update a GitHub milestone", schema: updateMilestoneSchema as unknown as ToolSchema<UpdateMilestoneArgs>, examples: [ { name: "Update milestone due date", description: "Change a milestone's title and due date", args: { milestoneId: "42", title: "Updated Release", dueDate: "2025-08-15T00:00:00Z" } }, { name: "Close milestone", description: "Mark a milestone as closed", args: { milestoneId: "42", state: "closed" } } ] }; export const deleteMilestoneTool: ToolDefinition<DeleteMilestoneArgs> = { name: "delete_milestone", description: "Delete a GitHub milestone", schema: deleteMilestoneSchema as unknown as ToolSchema<DeleteMilestoneArgs>, examples: [ { name: "Delete milestone", description: "Delete a milestone by ID", args: { milestoneId: "42" } } ] }; export const updateSprintTool: ToolDefinition<UpdateSprintArgs> = { name: "update_sprint", description: "Update a development sprint", schema: updateSprintSchema as unknown as ToolSchema<UpdateSprintArgs>, examples: [ { name: "Update sprint dates", description: "Update sprint dates and status", args: { sprintId: "sprint_1", startDate: "2025-07-01T00:00:00Z", endDate: "2025-07-15T00:00:00Z", status: "active" } } ] }; export const addIssuesToSprintTool: ToolDefinition<AddIssuesToSprintArgs> = { name: "add_issues_to_sprint", description: "Add issues to an existing sprint", schema: addIssuesToSprintSchema as unknown as ToolSchema<AddIssuesToSprintArgs>, examples: [ { name: "Add issues to sprint", description: "Add multiple issues to an existing sprint", args: { sprintId: "sprint_1", issueIds: ["123", "124", "125"] } } ] }; export const removeIssuesFromSprintTool: ToolDefinition<RemoveIssuesFromSprintArgs> = { name: "remove_issues_from_sprint", description: "Remove issues from a sprint", schema: removeIssuesFromSprintSchema as unknown as ToolSchema<RemoveIssuesFromSprintArgs>, examples: [ { name: "Remove issues from sprint", description: "Remove issues that are no longer in scope for the sprint", args: { sprintId: "sprint_1", issueIds: ["124", "125"] } } ] }; export const createLabelTool: ToolDefinition<CreateLabelArgs> = { name: "create_label", description: "Create a new GitHub label", schema: createLabelSchema as unknown as ToolSchema<CreateLabelArgs>, examples: [ { name: "Create bug label", description: "Create a red bug label", args: { name: "bug", color: "ff0000", description: "Something isn't working" } } ] }; export const listLabelsTool: ToolDefinition<ListLabelsArgs> = { name: "list_labels", description: "List all GitHub labels", schema: listLabelsSchema as unknown as ToolSchema<ListLabelsArgs>, examples: [ { name: "List all labels", description: "Get all repository labels", args: { limit: 50 } } ] }; // Event management schemas export const subscribeToEventsSchema = z.object({ clientId: z.string().min(1, "Client ID is required"), filters: z.array( z.object({ resourceType: z.enum(["PROJECT", "MILESTONE", "ISSUE", "SPRINT"]).optional(), eventType: z.enum(["created", "updated", "deleted", "closed", "reopened"]).optional(), resourceId: z.string().optional(), source: z.enum(["github", "api"]).optional(), tags: z.array(z.string()).optional(), }) ).default([]), transport: z.enum(["sse", "webhook", "internal"]).default("sse"), endpoint: z.string().optional(), expiresAt: z.string().datetime().optional(), }); export type SubscribeToEventsArgs = z.infer<typeof subscribeToEventsSchema>; export const getRecentEventsSchema = z.object({ resourceType: z.enum(["PROJECT", "MILESTONE", "ISSUE", "SPRINT"]).optional(), resourceId: z.string().optional(), eventType: z.enum(["created", "updated", "deleted", "closed", "reopened"]).optional(), limit: z.number().int().positive().default(100).optional(), }); export type GetRecentEventsArgs = z.infer<typeof getRecentEventsSchema>; export const replayEventsSchema = z.object({ fromTimestamp: z.string().datetime("From timestamp must be a valid ISO date string"), toTimestamp: z.string().datetime().optional(), resourceType: z.enum(["PROJECT", "MILESTONE", "ISSUE", "SPRINT"]).optional(), resourceId: z.string().optional(), limit: z.number().int().positive().default(1000).optional(), }); export type ReplayEventsArgs = z.infer<typeof replayEventsSchema>; // Event management tool definitions export const subscribeToEventsTool: ToolDefinition<SubscribeToEventsArgs> = { name: "subscribe_to_events", description: "Subscribe to real-time events for GitHub resources", schema: subscribeToEventsSchema as unknown as ToolSchema<SubscribeToEventsArgs>, examples: [ { name: "Subscribe to all project events", description: "Subscribe to all events for projects", args: { clientId: "my-client", filters: [{ resourceType: "PROJECT" }], transport: "sse" } }, { name: "Subscribe to issue updates", description: "Subscribe to update events for a specific issue", args: { clientId: "my-client", filters: [{ resourceType: "ISSUE", eventType: "updated", resourceId: "123" }], transport: "sse" } } ] }; export const getRecentEventsTool: ToolDefinition<GetRecentEventsArgs> = { name: "get_recent_events", description: "Get recent events for GitHub resources", schema: getRecentEventsSchema as unknown as ToolSchema<GetRecentEventsArgs>, examples: [ { name: "Get recent project events", description: "Get the last 50 events for projects", args: { resourceType: "PROJECT", limit: 50 } }, { name: "Get recent events for specific issue", description: "Get recent events for a specific issue", args: { resourceType: "ISSUE", resourceId: "123", limit: 20 } } ] }; export const replayEventsTool: ToolDefinition<ReplayEventsArgs> = { name: "replay_events", description: "Replay events from a specific timestamp", schema: replayEventsSchema as unknown as ToolSchema<ReplayEventsArgs>, examples: [ { name: "Replay events from yesterday", description: "Replay all events from yesterday", args: { fromTimestamp: "2025-01-01T00:00:00Z", limit: 500 } }, { name: "Replay project events from specific time", description: "Replay project events from a specific timestamp", args: { fromTimestamp: "2025-01-01T12:00:00Z", resourceType: "PROJECT", limit: 100 } } ] }; // ============================================================================ // Automation Service Tool Definitions // ============================================================================ export const createAutomationRuleTool: ToolDefinition<CreateAutomationRuleArgs> = { name: "create_automation_rule", description: "Create a new automation rule for a GitHub project", schema: createAutomationRuleSchema as unknown as ToolSchema<CreateAutomationRuleArgs>, examples: [ { name: "Auto-label PRs", description: "Automatically add 'needs-review' label when PR is opened", args: { name: "Auto-label new PRs", projectId: "PVT_kwDOLhQ7gc4AOEbH", enabled: true, triggers: [{ type: "pr_opened" }], actions: [{ type: "add_label", parameters: { labelName: "needs-review" } }] } }, { name: "Auto-assign issues", description: "Automatically assign issues with 'bug' label to maintainer", args: { name: "Auto-assign bugs", projectId: "PVT_kwDOLhQ7gc4AOEbH", enabled: true, triggers: [{ type: "issue_labeled", conditions: [{ field: "label", operator: "equals", value: "bug" }] }], actions: [{ type: "assign_user", parameters: { username: "maintainer" } }] } } ] }; export const updateAutomationRuleTool: ToolDefinition<UpdateAutomationRuleArgs> = { name: "update_automation_rule", description: "Update an existing automation rule", schema: updateAutomationRuleSchema as unknown as ToolSchema<UpdateAutomationRuleArgs>, examples: [ { name: "Update rule name", description: "Change the name of an automation rule", args: { ruleId: "AR_kwDOLhQ7gc4AOEbH", name: "Updated rule name" } }, { name: "Disable rule temporarily", description: "Disable an automation rule without deleting it", args: { ruleId: "AR_kwDOLhQ7gc4AOEbH", enabled: false } } ] }; export const deleteAutomationRuleTool: ToolDefinition<DeleteAutomationRuleArgs> = { name: "delete_automation_rule", description: "Delete an automation rule from a project", schema: deleteAutomationRuleSchema as unknown as ToolSchema<DeleteAutomationRuleArgs>, examples: [ { name: "Delete rule", description: "Remove an automation rule from a project", args: { ruleId: "AR_kwDOLhQ7gc4AOEbH" } } ] }; export const getAutomationRuleTool: ToolDefinition<GetAutomationRuleArgs> = { name: "get_automation_rule", description: "Get details of a specific automation rule", schema: getAutomationRuleSchema as unknown as ToolSchema<GetAutomationRuleArgs>, examples: [ { name: "Get rule details", description: "Retrieve details of an automation rule", args: { ruleId: "AR_kwDOLhQ7gc4AOEbH" } } ] }; export const listAutomationRulesTool: ToolDefinition<ListAutomationRulesArgs> = { name: "list_automation_rules", description: "List all automation rules for a GitHub project", schema: listAutomationRulesSchema as unknown as ToolSchema<ListAutomationRulesArgs>, examples: [ { name: "List project rules", description: "Get all automation rules for a project", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH" } } ] };
  • Registration of listAutomationRulesTool (imported from ToolSchemas.ts) along with other automation tools in the central ToolRegistry during initialization of built-in tools.
    // Register automation service tools this.registerTool(createAutomationRuleTool); this.registerTool(updateAutomationRuleTool); this.registerTool(deleteAutomationRuleTool); this.registerTool(getAutomationRuleTool); this.registerTool(listAutomationRulesTool); this.registerTool(enableAutomationRuleTool); this.registerTool(disableAutomationRuleTool);
  • src/index.ts:478-479 (registration)
    Dispatch handler in main MCP server that routes list_automation_rules tool calls to the ProjectManagementService.listAutomationRules method.
    case "list_automation_rules": return await this.service.listAutomationRules(args);

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/kunwarVivek/mcp-github-project-manager'

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