watch_ci
Monitor GitHub Actions workflow runs and receive real-time status change notifications for CI/CD pipeline visibility.
Instructions
Watch a GitHub Actions workflow run and emit events on status changes
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | GitHub repo owner | |
| repo | Yes | GitHub repo name | |
| branch | No | Branch to watch (optional) | |
| run_id | No | Specific run ID to watch (optional) | |
| action_id | No | ID to associate events with an agent action |
Implementation Reference
- src/server.ts:250-283 (handler)The handler implementation for the 'watch_ci' tool, which registers a new GitHub CI watcher.
private async handleWatchCi(args: Record<string, unknown>) { const schema = z.object({ owner: z.string(), repo: z.string(), branch: z.string().optional(), run_id: z.number().optional(), action_id: z.string().optional(), }); const parsed = schema.parse(args); const id = uuidv4(); const now = new Date().toISOString(); const config: GithubCiConfig = { kind: 'github_ci', ...parsed }; const watch: WatchRecord = { id, kind: 'github_ci', config, action_id: parsed.action_id ?? null, created_at: now, active: true, last_poll_at: null, }; insertWatch(watch); const watcher = new GithubCiWatcher(id, parsed.action_id ?? null, this.registry.getNotifyFn(), config); this.registry.register(watcher); return { content: [{ type: 'text' as const, text: JSON.stringify({ watch_id: id, status: 'watching', repo: `${parsed.owner}/${parsed.repo}` }), }], }; } - src/server.ts:56-70 (registration)Registration and schema definition of the 'watch_ci' tool.
{ name: 'watch_ci', description: 'Watch a GitHub Actions workflow run and emit events on status changes', inputSchema: { type: 'object', properties: { owner: { type: 'string', description: 'GitHub repo owner' }, repo: { type: 'string', description: 'GitHub repo name' }, branch: { type: 'string', description: 'Branch to watch (optional)' }, run_id: { type: 'number', description: 'Specific run ID to watch (optional)' }, action_id: { type: 'string', description: 'ID to associate events with an agent action' }, }, required: ['owner', 'repo'], }, },