Skip to main content
Glama

guard_preflight

Idempotent

Verifies configured tool presence and versions, and whether the current directory is a Git worktree, to diagnose unexpected tool failures before blaming code.

Instructions

Check configured tool presence and versions, and whether this directory is a git worktree.

Use it when a tool fails in a surprising way, before blaming the code. It takes no parameters. The tool list is preflight_tools from config (default git, python3, pip, node, npm, rg, pytest). At most 20 entries are probed; extras are counted as omitted. Each present tool is run as <tool> --version with a 2 second cap, a 15 second overall deadline, and at most 4 KiB of output. It returns PC preflight, git yes/no, present and missing tools, any incomplete version probes, and a Nudge. Side effects: creates .agent-guard/ and seeds config.json if needed, and executes those version probes. It does not install tools and does not append the journal or the evidence ledger.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "guard_preflight"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations it discloses the actual side effects: creating `.agent-guard/` and seeding `config.json`, and executing `<tool> --version` probes. It also quantifies the runtime envelope, a 2 second per-probe cap, a 15 second overall deadline, a 4 KiB output ceiling, and a 20-entry probe limit, plus an explicit non-action, no tool installation.

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?

The lead sentence carries purpose, the second carries the trigger, and the remainder is dense but each clause, caps, side effects, non-actions, earns its place. The return-value enumeration is slightly redundant given an output schema exists, but it does not obscure the front-loaded essentials.

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

Completeness5/5

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

For a zero-parameter diagnostic with full annotations and an output schema, everything an agent needs is present: trigger, scope limits, runtime caps, filesystem side effects, and what is deliberately not touched. Nothing material is left to inference.

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?

There are zero parameters, so the baseline is 4, and the description confirms this directly with 'It takes no parameters.' It adds useful context about where the probed list comes from, the `preflight_tools` config key with its defaults, which explains behavior even though no arguments exist.

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 concrete verb-and-resource pair: checking configured tool presence and versions plus whether the directory is a git worktree. The scope is unmistakable, but it never names a sibling such as guard_status or guard_orientation to draw a boundary, so an agent must infer where this diagnostic ends and the others begin.

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?

It gives an explicit trigger, 'when a tool fails in a surprising way, before blaming the code', which is a real decision rule. It also states two exclusions, no tool installation and no journal or evidence-ledger writes, but offers no guidance on when to reach for a different guard_* tool instead.

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