Skip to main content
Glama

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
NameRequiredDescriptionDefault
ownerYesGitHub repo owner
repoYesGitHub repo name
branchNoBranch to watch (optional)
run_idNoSpecific run ID to watch (optional)
action_idNoID to associate events with an agent action

Implementation Reference

  • 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'],
      },
    },

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/jarvisassistantux/loopsense'

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