Skip to main content
Glama

kilo_verify_worktree

Runs lint, test, and build checks in a working directory or worktree, then returns a compact pass/fail verdict with git state and output tails for failed checks to save context.

Instructions

Run a structured verification gate on a working directory or worktree.

Executes a sequence of verification commands (lint, test, build) and returns a compact structured verdict with git head/dirty state and output tails for failed checks only, minimizing context window waste.

SECURITY NOTE: This tool executes arbitrary shell commands provided by the caller or read from project configuration.

Commands are taken from the explicit commands list, or, when omitted, from the [verify] table in a project-local kilo-mcp.toml or .kilo-mcp.toml at the root of working_directory (e.g. commands = ["pytest", "ruff check ."]). If neither is found, returns an error explaining both options.

Each command runs sequentially with cwd=working_directory via the shell. If a command exceeds timeout_seconds, its entire process group is killed. All commands are run regardless of individual failures.

Returns a JSON string: { "ok": bool, "working_directory": str, "head": str | null, "dirty": bool, "checks": [ { "command": str, "exit_code": int | null, "passed": bool, "duration_s": float, "timed_out": bool, "output_tail": str } ] }

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": {
      "working_directory": "<working_directory>"
    },
    "name": "kilo_verify_worktree"
  }
}

Input Schema

NameRequiredDescriptionDefault
commandsNoOptional list of shell commands to execute sequentially. If omitted, commands are read from the [verify] table in kilo-mcp.toml or .kilo-mcp.toml at the root of working_directory.
tail_linesNoNumber of output tail lines to capture for failed checks (1..500, default 40).
timeout_secondsNoMaximum execution time in seconds per command (1..3600, default 600).
working_directoryYesPath to the repository or worktree to verify.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior5/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 so: it flags arbitrary shell execution as a security concern, specifies cwd, per-command timeout with process-group kill, sequential execution, that all commands run regardless of individual failures, and that only failed checks' output tails are returned. These are exactly the operational traits an agent needs before invoking an executing tool.

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

Conciseness3/5

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

The opening two sentences are well front-loaded and the security note is prominent, but the full return-value JSON block duplicates the output schema that already exists, adding length without new information. The config-file explanation is worth its space; the schema echo is not.

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 an arbitrary-code-execution tool, the definition covers sourcing, cwd, timeouts, failure aggregation, and context-window optimization. The one structural shortfall is that it re-documents the return shape despite an output schema existing, while omitting explicit contrast with sibling command-running tools.

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

Parameters4/5

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

Schema coverage is already 100%, so the baseline is 3; the description still adds value by explaining the config-file fallback for `commands` (with a concrete example), the error outcome when neither source exists, and the process-group kill semantics behind `timeout_seconds`. Minor gap: `tail_lines` bounds (1..500) live only in the schema, not the prose.

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?

States a specific verb and resource: 'Run a structured verification gate on a working directory or worktree', then clarifies it executes lint/test/build sequences and returns a compact verdict. This implies a meaningful difference from a single-command runner sibling, but no sibling (e.g. kilo_run_command) is named to make the boundary explicit.

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 description explains the command-sourcing decision tree (explicit `commands` list vs `[verify]` table in kilo-mcp.toml vs an error), which is genuine usage context. It never says when to prefer this over kilo_run_command or other verification approaches, and gives no when-not guidance.

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