Skip to main content
Glama

validate_vault

Read-only

Validate every document in the ontology vault to get a whole-vault health view, surfacing per-document and per-code issues before 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, definition-missing, boundary-missing, epistemic-exclusion, uncertainty-missing, slug-outside-kind-folder, folder-only-evidence, dependency-unwitnessed, dependency-unjudged, starter-example-node, kind-under-sources. Returns { scanned, problems: [{slug, issues: [{code, severity, message}]}], problemsPagination, summary: { problemFiles, errorFiles, warningFiles, byCode: { code: { severity, count, files } } } }. problems is one page, files with errors first and then by slug: offset (default 0) and limit (default 100, max 500) choose it, a page left at the default limit stops sooner when its text would pass 128 KiB, and problemsPagination.nextOffset resumes it, so follow pages until hasMore is false before calling the vault clean. summary always counts the whole vault; each byCode entry names at most 20 files and says how many more in filesOmitted. 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. Also returns evidenceDrift: one Git walk dates every cited path and every concept document, and each concept is current (cited code unchanged since the document), stale (a cited file changed after the document — read it before trusting the recorded meaning), missing (cited path gone) or unknown (nothing cited, no commit in the window, or only a folder-level path moved — listed under folderOnly, because a folder changes on almost any commit). checked: false names why nothing was dated; it never means nothing moved. 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
limitNoProblem files per page. Defaults 100.
offsetNoZero-based index of the first problem file to return, in the order errors first and then slug. Resume with `problemsPagination.nextOffset`. Defaults 0.
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.
problemsHintNoPresent when the vault has more than one page: which files this page shows and the call for the next one.
evidenceDriftNoWhether each concept still stands on the code it cites, dated by one Git walk: current / stale / missing / unknown per concept, with the stale and missing rows named (bounded to 50 each).
summaryFreshnessYes
problemsPaginationNoThe page `problems` holds: `total` problem files, and `nextOffset` for the next page until `hasMore` is false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv1.4.0
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Problem files per page. Defaults 100.",
      +  "maximum": 500,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "Zero-based index of the first problem file to return, in the order errors first and then slug. Resume with `problemsPagination.nextOffset`. Defaults 0.",
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedOutput schema / properties / problems / items / properties / issues / items / properties / code / enum
      Previous value: -[
      -  "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",
      -  "definition-missing",
      -  "boundary-missing",
      -  "epistemic-exclusion",
      -  "uncertainty-missing",
      -  "slug-outside-kind-folder",
      -  "folder-only-evidence",
      -  "dependency-unwitnessed",
      -  "starter-example-node"
      -]New value: +[
      +  "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",
      +  "definition-missing",
      +  "boundary-missing",
      +  "epistemic-exclusion",
      +  "uncertainty-missing",
      +  "slug-outside-kind-folder",
      +  "folder-only-evidence",
      +  "dependency-unwitnessed",
      +  "dependency-unjudged",
      +  "starter-example-node",
      +  "kind-under-sources"
      +]
    • addedOutput schema / properties / problemsHint
      Added value: +{
      +  "description": "Present when the vault has more than one page: which files this page shows and the call for the next one.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / problemsPagination
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "The page `problems` holds: `total` problem files, and `nextOffset` for the next page until `hasMore` is false.",
      +  "properties": {
      +    "hasMore": {
      +      "type": "boolean"
      +    },
      +    "limit": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "nextOffset": {
      +      "minimum": 0,
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "offset": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "returned": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "total": {
      +      "minimum": 0,
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "offset",
      +    "limit",
      +    "total",
      +    "returned",
      +    "hasMore",
      +    "nextOffset"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / summary / properties / byCode / additionalProperties / properties / files / description
      Added value: +"At most 20 of the `count` files with this code, in page order."
    • addedOutput schema / properties / summary / properties / byCode / additionalProperties / properties / filesOmitted
      Added value: +{
      +  "description": "Present when `files` names fewer than `count`: how many more. Page through `problems` for them.",
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedOutput schema / properties / summary / properties / byCode / propertyNames / enum
      Previous value: -[
      -  "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",
      -  "definition-missing",
      -  "boundary-missing",
      -  "epistemic-exclusion",
      -  "uncertainty-missing",
      -  "slug-outside-kind-folder",
      -  "folder-only-evidence",
      -  "dependency-unwitnessed",
      -  "starter-example-node"
      -]New value: +[
      +  "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",
      +  "definition-missing",
      +  "boundary-missing",
      +  "epistemic-exclusion",
      +  "uncertainty-missing",
      +  "slug-outside-kind-folder",
      +  "folder-only-evidence",
      +  "dependency-unwitnessed",
      +  "dependency-unjudged",
      +  "starter-example-node",
      +  "kind-under-sources"
      +]
  2. Changed3 schema fields changedv1.3.0
    • addedOutput schema / properties / evidenceDrift
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Whether each concept still stands on the code it cites, dated by one Git walk: current / stale / missing / unknown per concept, with the stale and missing rows named (bounded to 50 each).",
      +  "properties": {
      +    "checked": {
      +      "type": "boolean"
      +    },
      +    "counts": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "current": {
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "folderOnly": {
      +          "description": "Unknown rows whose only moved evidence is a folder path.",
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "missing": {
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "stale": {
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "unknown": {
      +          "minimum": 0,
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "current",
      +        "stale",
      +        "missing",
      +        "unknown",
      +        "folderOnly"
      +      ],
      +      "type": "object"
      +    },
      +    "folderOnly": {
      +      "description": "Concepts whose only evidence that moved is a folder: something under it changed, which is not yet a verdict on the meaning.",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "docChangedAt": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "folders": {
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "changedAt": {
      +                  "type": "string"
      +                },
      +                "path": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "path",
      +                "changedAt"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "kind": {
      +            "type": "string"
      +          },
      +          "slug": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "slug",
      +          "kind",
      +          "docChangedAt",
      +          "folders"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "hint": {
      +      "type": "string"
      +    },
      +    "missing": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "gone": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "kind": {
      +            "type": "string"
      +          },
      +          "slug": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "slug",
      +          "kind",
      +          "gone"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "reason": {
      +      "description": "Why nothing was dated, when `checked` is false.",
      +      "type": "string"
      +    },
      +    "repoRoot": {
      +      "minLength": 1,
      +      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +      "type": "string"
      +    },
      +    "stale": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "docChangedAt": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "kind": {
      +            "type": "string"
      +          },
      +          "moved": {
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "changedAt": {
      +                  "type": "string"
      +                },
      +                "path": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "path",
      +                "changedAt"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "slug": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "slug",
      +          "kind",
      +          "docChangedAt",
      +          "moved"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "checked",
      +    "counts",
      +    "stale",
      +    "missing",
      +    "folderOnly",
      +    "hint"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / properties / problems / items / properties / issues / items / properties / code / enum
      Previous value: -[
      -  "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"
      -]New value: +[
      +  "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",
      +  "definition-missing",
      +  "boundary-missing",
      +  "epistemic-exclusion",
      +  "uncertainty-missing",
      +  "slug-outside-kind-folder",
      +  "folder-only-evidence",
      +  "dependency-unwitnessed",
      +  "starter-example-node"
      +]
    • changedOutput schema / properties / summary / properties / byCode / propertyNames / enum
      Previous value: -[
      -  "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"
      -]New value: +[
      +  "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",
      +  "definition-missing",
      +  "boundary-missing",
      +  "epistemic-exclusion",
      +  "uncertainty-missing",
      +  "slug-outside-kind-folder",
      +  "folder-only-evidence",
      +  "dependency-unwitnessed",
      +  "starter-example-node"
      +]
  3. Changed2 schema fields changedv1.2.5
    • addedOutput schema / properties / summaryFreshness
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "checked": {
      +      "type": "boolean"
      +    },
      +    "hint": {
      +      "type": "string"
      +    },
      +    "stale": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "behindByMs": {
      +            "minimum": 0,
      +            "type": "number"
      +          },
      +          "bodyChangedAt": {
      +            "format": "date-time",
      +            "type": "string"
      +          },
      +          "childCount": {
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "hint": {
      +            "minLength": 1,
      +            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +            "type": "string"
      +          },
      +          "kind": {
      +            "enum": [
      +              "project",
      +              "domain"
      +            ],
      +            "type": "string"
      +          },
      +          "membershipChangedAt": {
      +            "format": "date-time",
      +            "type": "string"
      +          },
      +          "reasonCode": {
      +            "type": "string"
      +          },
      +          "score": {
      +            "maximum": 1,
      +            "minimum": 0,
      +            "type": "number"
      +          },
      +          "slug": {
      +            "minLength": 1,
      +            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "slug",
      +          "kind",
      +          "childCount",
      +          "score",
      +          "hint"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "summaryNodes": {
      +      "minimum": 0,
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "checked",
      +    "summaryNodes",
      +    "stale",
      +    "hint"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "scanned",
      -  "problems",
      -  "summary",
      -  "pathDrift"
      -]New value: +[
      +  "scanned",
      +  "problems",
      +  "summary",
      +  "summaryFreshness",
      +  "pathDrift"
      +]
  4. First observedv0.13.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint and destructiveHint=false, yet the description adds substantial behavior beyond them: the 128 KiB page truncation, the requirement to follow pages until hasMore is false before calling the vault clean, the meaning of checked:false ('never means nothing moved'), 'side effect 0', and the pathDrift/evidenceDrift semantics. This is rich disclosure well past the annotation baseline.

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?

Front-loaded with purpose and usage, but bloated: it enumerates roughly 30 issue codes and dumps the full return shape even though an output schema exists, and it misstates the count as '8 issue codes'. That redundant and internally inconsistent bulk dilutes the otherwise efficient opening.

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 complex whole-vault validator with an output schema and read-only annotations, the description covers purpose, usage, pagination, drift checks, and failure semantics without leaving an agent short of what it needs to call the tool correctly.

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 100%, so the baseline is 3, but the description adds real meaning: the error-first-then-slug ordering that offset indexes into, resumption via problemsPagination.nextOffset, the limit default (matching schema), and repoRoot defaulting to the active resolved repository root from connection_info. That is helpful semantics beyond the schema text.

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+resource ('validate every doc in the vault') plus the returned granularity ('per-doc + per-code aggregate'). It also distinguishes itself from siblings by naming the pattern it replaces ('list_concepts' then per-doc 'get_concept') and by scoping to the whole vault, so an agent can separate it from validate_wiki and the per-doc getters.

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?

Gives explicit when-to-use contexts: first-contact before writes, before/after a batch write, or surfacing issues to the user. It frames the alternative it supersedes (the K-round-trip list_concepts/get_concept pattern), but does not explicitly state when NOT to use it versus the sibling validate_wiki, so it stops short of a 5.

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