Skip to main content
Glama

vicem_check_guard

Read-onlyIdempotent

Verifies code snippets or git diffs before commits, blocking skeleton placeholders, leaked secrets, and stale baton/HEAD drift so unsafe edits are caught early.

Instructions

Verifies a code snippet or git diff against three safety checks: (1) SkeletonWriteGuard (blocks "{ ... }", "/* ... */", "⋮", or stub "pass" placeholders written into code files), (2) SecretCommitGuard (blocks raw API keys/credentials, leaked "‹REDACTED:...›" tokens, and baton markers), and (3) StalenessDriftGuard (flags git HEAD drift from .vicem/baton.json). Use before committing or finalizing edits to skeletonized files; do not use to read baton state (vicem_read_baton) or restore elided code (vicem_rehydrate). Parameter semantics: pass diff_text to inspect a specific unified diff or code snippet; omitting diff_text falls back to inspecting staged and unstaged working tree changes (git diff HEAD). Non-mutating read-only check (no auth, rate limits, or file overwrites): returns "OK: All 3 Safety Guards passed." (isError=false) when clean, or isError=true with per-violation findings and self-healing remediation prompts when a guard trips.

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": "vicem_check_guard"
  }
}

Input Schema

NameRequiredDescriptionDefault
diff_textNoOptional unified git diff or raw code snippet to validate. When omitted, defaults to inspecting live working tree and staged changes against HEAD (git diff HEAD).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.1.6
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / diff_text / description
      Previous value: -"Optional diff or code text to inspect"New value: +"Optional unified git diff or raw code snippet to validate. When omitted, defaults to inspecting live working tree and staged changes against HEAD (git diff HEAD)."
  2. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive, but the description goes further: it confirms no auth, no rate limits, no file overwrites, and describes both return paths (OK string with isError=false, versus isError=true with per-violation findings and remediation prompts). That is materially beyond what the annotations convey.

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-loaded with the guard names and trigger patterns, then usage rules, then parameter and return behavior in a logical order. It is dense but every clause carries signal; only the triple enumeration of guard internals makes it longer than strictly necessary.

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 single-parameter, non-mutating check with no output schema, the description covers invocation fallback, success/failure semantics, and remediation behavior. Nothing an agent needs to call it correctly is missing.

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?

With one optional parameter and 100% schema description coverage, the baseline is 3. The description explains diff_text versus the fallback to git diff HEAD, but the schema already documents that same fallback almost verbatim, so it adds little beyond structured data.

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 a specific verb (Verifies) and resource (code snippet or git diff) and enumerates all three named checks with their trigger conditions. It explicitly distinguishes itself from siblings vicem_read_baton and vicem_rehydrate, so an agent can route correctly without opening any schema.

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

Usage Guidelines5/5

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

Explicitly states when to use ('before committing or finalizing edits to skeletonized files') and when not to use, naming the two sibling alternatives and the condition that selects each. This is exactly the when/when-not/alternatives pattern.

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