Skip to main content
Glama

watchdog

Destructive

Reviews agent sessions and environments, ranks findings by severity, and applies approved fixes via dry-run with reversible quarantine.

Instructions

Session review + environment optimization. action='dig' analyzes a session, a window of sessions, or the machine environment and returns severity-ranked findings with evidence and proposals (digests for agent reasoning, persisted to the vault as watchdog notes). action='fix' applies approved repairs — dry-run by default; file reclamation is quarantined and reversible. action='status' lists past digs and pending findings.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>"
    },
    "name": "watchdog"
  }
}

Input Schema

NameRequiredDescriptionDefault
toolNoRestrict to a harness: opencode | claude-code | codex
applyNoaction=fix: actually perform changes (default false = dry-run)
countNoMax sessions in window (default 20)
scopeNodig scope (default session)
sinceNoWindow start for scope=window: 7d, 24h, or ISO date
actionYeswatchdog action
confirmNoExplicit user authorization for all_projects (default false)
dismissNoaction=fix: mark dismissed instead of applied
persistNoPersist the dig report to the vault (default true)
projectNoProject slug (auto-detected when omitted)
categoriesNoFinding categories for action=fix; include 'leaked-tmp' to reclaim leaked .tmp files
session_idNoSession id, optionally tool:id (default: latest session in this project)
finding_idsNoFinding ids for action=fix
report_pathNoaction=fix: target a specific stored report path
all_projectsNoIgnore the current project filter; review sessions across all projects
workspace_pathNoAbsolute thread workspace directory; must map to this project. Omit only when the server cwd is the thread workspace.
include_promptsNoInclude private prompt text in digests only with user authorization (default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.15.1
    • addedInput schema / properties / confirm
      Added value: +{
      +  "description": "Explicit user authorization for all_projects (default false)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / include_prompts
      Added value: +{
      +  "default": false,
      +  "description": "Include private prompt text in digests only with user authorization (default false)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / workspace_path
      Added value: +{
      +  "description": "Absolute thread workspace directory; must map to this project. Omit only when the server cwd is the thread workspace.",
      +  "type": "string"
      +}
  2. Addedv0.13.0

TDQS

A3.7/5.0
Behavior4/5

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

Beyond the single destructiveHint=true annotation, the description adds substantial behavioral context: fix is dry-run by default, file reclamation is quarantined and reversible, digests are persisted to the vault, and prompt inclusion requires authorization. This meaningfully lowers risk perception for the fix path. It does not, however, state permission/auth requirements or any rate limits.

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?

Front-loads the tool's domain in a short phrase, then devotes one sentence per action with no visible filler. Slightly dense with parentheticals, but every sentence carries actionable information.

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?

For a 17-parameter, no-output-schema tool, the description covers the primary actions and key behavioral guarantees (dry-run, reversibility, persistence). Some specifics (what status returns, how findings are paginated or windowed) are left to the schema, but the agent has enough to invoke correctly.

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 description coverage is 100%, so the schema already documents all 17 parameters, setting the baseline at 3. The description reinforces the action parameter's semantics (dry-run default, reversible reclamation) and mention of vault persistence, but adds little syntax or value beyond what the schema already contains.

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

Purpose4/5

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

The description states a specific verb+resource ('Session review + environment optimization') and then enumerates the three distinct actions (dig, fix, status) with what each produces. It is clear what the tool does, though it never names or contrasts a sibling (e.g., hygiene_report, doctor) to help distinguish this from other diagnostic tools.

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

Usage Guidelines3/5

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

The three action modes imply usage (dig to analyze, fix to repair, status to list past work), but there is no explicit when-to-use-this-vs-alternative guidance despite a crowded sibling set containing hygiene_report, doctor, and stats. Usage must be inferred from the action semantics.

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