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'],
      },
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. Mentions 'emit events on status changes' but lacks crucial behavioral details: whether this blocks indefinitely, how long it persists, event delivery mechanism, rate limits, or how to terminate the watch (relevant given cancel_watch exists).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single 11-word sentence with zero waste. Front-loaded with action ('Watch') and resource ('GitHub Actions workflow run'), followed by behavioral consequence ('emit events'). Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate for basic identification given 100% schema coverage, but incomplete for a long-running subscription tool. Missing lifecycle context (creates persistent watch), event format expectations, and connection to sibling management tools (cancel_watch, list_watches) necessary for proper agent operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, establishing baseline 3. The phrase 'GitHub Actions workflow run' contextualizes owner/repo as GitHub coordinates, but description provides no additional semantics beyond schema (e.g., that run_id targets a specific execution, or how action_id correlates events).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb 'Watch' and resource 'GitHub Actions workflow run' clearly identified. Explicitly distinguishes from generic siblings (watch_file, watch_process) by specifying the CI domain, and from poll_events by implying continuous monitoring vs polling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this versus poll_events or checking run status manually. Does not mention prerequisites (existing workflow run) or relationship to cancel_watch for cleanup. Agent must infer usage context from the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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