Skip to main content
Glama

av_guard

Verify code structure integrity against Git HEAD or an auto-created baseline, returning a concise verdict before you claim task completion.

Instructions

日常结构验收(跨 Cursor / Claude / DeepSeek Harness 等):无基线时自动 ensure,有 git 对照 HEAD,返回 ≤3 行 verdict。宣称完成前优先调这个。HTML 详情可选。必须显式传当前工作区绝对路径 repo。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYes必填。当前工作区根目录的绝对路径。
editDirNo可选。正在改代码的目录;与 repo 冲突时中止。
confirmRepoNo可选。确认检查 repo(当 cwd 是另一个 Git 根时)。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.2-rc.3

TDQS

A3.9/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 disclose meaningful behavior: it auto-runs 'ensure' when no baseline exists, compares against git HEAD otherwise, caps output at a ≤3-line verdict, and offers optional HTML detail. It does not state whether the auto-ensure step mutates the workspace or what permissions are needed, which is a notable gap for a check that can create baselines.

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?

It is front-loaded with the core purpose and packed into a few dense clauses with no filler. The trade-off is density – several distinct facts (baseline logic, HEAD comparison, output format, path requirement) are compressed into a single run-on span.

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 three-parameter check tool with no output schema, it covers the essentials: what it does, when to call it, how baselines are handled, and the shape of the return (≤3-line verdict). Missing only the side-effect/permission posture of the automatic ensure step.

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 all three parameters already have documentation, making 3 the baseline. The description only reiterates the required 'repo' absolute-path constraint already stated in the schema, adding no new syntax or behavioral nuance for editDir or confirmRepo.

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 names a specific capability – a daily structural acceptance check ('日常结构验收') that returns a short verdict, and notes cross-harness support (Cursor/Claude/DeepSeek). The verb+resource are identifiable, though the jargon term 'structural acceptance' is abstract enough that it doesn't cleanly separate this from siblings like av_check_layering or av_status without context.

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 clear timing guidance – 'prefer calling this before claiming completion' ('宣称完成前优先调这个') – which establishes a concrete trigger. However, it never names an alternative tool or a when-not condition, so the agent must still infer how it differs from the many av_* siblings.

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