Skip to main content
Glama

validate_vault

Read-only

Scans every document in the vault and returns per-doc and aggregate issue reports, including path drift, to reveal the whole-vault health before or after writes.

Instructions

R+ (cycle 46) — validate every doc in the vault, return per-doc + per-code aggregate. Replaces the K-round-trip pattern of list_concepts then per-doc get_concept (whose warnings: [...] is per-file). 8 issue codes — unclosed-frontmatter, parse-zero-keys, malformed-frontmatter-line, malformed-quoted-scalar, missing-kind, empty-kind, unknown-kind, missing-uid, invalid-uid, invalid-merged-uids, non-canonical-merged-uids, missing-expected-field, non-canonical-graph-array, dangling-graph-reference, duplicate-slug, duplicate-uid. Returns { scanned, problems: [{slug, issues: [{code, severity, message}]}], summary: { problemFiles, errorFiles, warningFiles, byCode: { code: { severity, count, files } } } }. Also returns pathDrift: frontmatter path: / elements: source paths that no longer exist on disk (vault→code drift), resolved against repoRoot (default: the active resolved repository root from connection_info). Ontology-slug references are never flagged. Fix via patch_concept or remove the stale entry. side effect 0. Use when an agent needs the whole-vault health view: first-contact before writes, before / after a batch write, or surfacing issues to the user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoRootNoRepository root that frontmatter source paths resolve against, for the pathDrift check. Defaults to the active resolved repository root from connection_info. Pass this if the vault lives apart from the code repo.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
scannedYesNumber of vault markdown files scanned.
summaryYes
problemsYes
pathDriftYesVault→code path drift: frontmatter source paths missing on disk, resolved against repoRoot.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.13.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, but the description adds value by specifying 'side effect 0' and detailing the output structure including pathDrift behavior. It also notes that ontology-slug references are never flagged, which is a useful behavioral nuance beyond the schema.

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 description is dense and information-rich, covering purpose, usage, output shape, and behavioral notes in a compact form. It is slightly long but every sentence earns its place. The main purpose and key contrast are front-loaded, though the list of issue codes adds bulk at the cost of some quick readability.

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?

Given the complexity of the tool (many issue codes, nested output structure), the description is thorough. It provides the output format, default parameter behavior, and actionable follow-up steps (patch_concept). With an output schema present, the description need not detail return values further, and it covers all essential aspects for an agent to call it 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 coverage is 100% and the only parameter, repoRoot, is well-documented in the schema. The description reinforces its purpose (pathDrift resolution) and provides the default behavior, but adds minimal new semantic information beyond what the schema already states.

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?

The description clearly states the tool validates every document in the vault and returns per-document and per-code aggregates. It distinguishes itself from siblings by explicitly contrasting with the 'K-round-trip pattern' of list_concepts and get_concept, and it is not confused with validate_wiki because it focuses on vault concepts.

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?

The description explicitly states when to use: 'when an agent needs the whole-vault health view' and gives concrete use cases: first-contact before writes, before/after batch writes, or surfacing issues to the user. It also indicates what to do about pathDrift (fix via patch_concept) and mentions it replaces an alternative pattern.

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