Skip to main content
Glama

codebase_watch

Watch a project directory for file changes and automatically refresh the index, running an incremental catch-up update first. Start, stop, or check watcher status.

Instructions

Start/stop watching a project directory for file changes and automatically update the index. When starting, first runs an incremental update to catch up, then watches for changes. SOCRATICODE_WATCHER=manual allows explicit starts only; off and git reject file-watcher starts. In git mode, status reports Git refresh state and stop does not disable Git checks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesstart/stop watching, or get status of watchers.
projectPathNoAbsolute path to the project directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.8.2
  2. Removedv1.8.1
  3. Addedv1.7.2

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that start runs an incremental update before watching, that mode env vars gate start behavior, and that in git mode stop does not disable Git checks. It omits return/polling cadence details but the mutation and gating semantics are clearly conveyed.

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

Conciseness4/5

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

Three front-loaded sentences, each carrying new information about behavior rather than restating the name. Slightly dense with env-mode detail but no wasted filler.

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

Completeness4/5

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

No output schema and no annotations, so the description must stand alone; it covers start/stop side effects and mode-dependent gating well. What is missing is a note on how status output is surfaced and any alternative to watching for a one-off refresh.

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% and the enum values are already documented in the schema, so the baseline is 3. The description adds behavioral meaning to each action (start catches up then watches, status reports Git refresh state) but says nothing extra about projectPath.

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?

States specific verbs (start/stop watching) plus the resource (project directory) and the side effect (automatically update the index). An agent can distinguish this long-running watcher from one-shot siblings like codebase_update or codebase_status without opening a schema.

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

Usage Guidelines4/5

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

Gives explicit operating conditions: SOCRATICODE_WATCHER=manual permits explicit starts only, while off and git reject file-watcher starts. It does not name a sibling alternative (e.g., codebase_update for manual catch-up), so it stops short of full when-to-use routing.

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