Skip to main content
Glama

lintDocuments

Run a read-only health check on a markdown vault to surface orphaned notes, dead wikilinks, contradictions, dangling edges, near-duplicates, and name collisions.

Instructions

Run a read-only health check over the markdown vault: orphans (no graph edges), deadLinks (unresolved [[wikilinks]]), contradictions (contradicts edges), danglingEdges (live link to a deleted doc), nearDuplicates (pairs of docs whose chunk embeddings exceed cosine 0.92, non-blocking lint signal only), and nameCollisions (documents whose title shadows a non-document entity of the same display name — wikilink resolution silently favours the entity). Takes no arguments; scans the whole vault.

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
orphansYesDocuments with no inbound or outbound graph edges (isolated notes).
deadLinksYesDocuments that still carry an unresolved [[wikilink]]; each entry's 'unresolved' array names the exact target strings that resolve to nothing.
danglingEdgesYesActive links from a live document to a DELETED document (a backlink left behind when deleteDocument tombstoned its target). Each entry carries the live 'subjectPath' and the deleted 'targetPath'/'targetTitle' it still points at, so the fix is 're-point or remove the link in subjectPath'.
contradictionsYesDocument pairs joined by an active contradicts edge.
nameCollisionsYesDocuments whose title (display name) shadows a non-document entity with the exact same name. Wikilink resolution silently favours the non-document entity in this case; use the vault path or a kind qualifier to disambiguate.
nearDuplicatesYesPairs of live documents whose chunk embeddings are suspiciously similar (cosine >= 0.92). Non-blocking lint signal only — does NOT prevent writes or imports. Each pair is reported once.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations present, the description carries the disclosure burden and does well: it declares the operation read-only, notes that it scans the entire vault (a cost signal), and flags `nearDuplicates` as "non-blocking lint signal only" so the agent won't treat it as an error. It does not quantify scan cost or note whether results stream or are returned in one payload, which keeps it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single dense sentence that front-loads the action, then lists categories with backticked names and tight parenthetical definitions. The final independent clause carries the scope/arity constraint. No sentence is redundant.

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?

An output schema exists, so return values need not be explained, and the read-only, whole-vault, no-argument contract is fully stated. The only material gap is the absence of any indication of runtime cost or result-volume expectations for a full-vault scan, which matters for an agent deciding when to invoke it.

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?

The tool takes zero parameters, so there is no schema semantics to add; the description correctly confirms "takes no arguments" and explains that scope is implicitly the whole vault. Baseline 4 applies for a 0-param tool.

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 and resource ("run a read-only health check over the markdown vault") and then enumerates all six check categories with a definition of each, including the precise thresholds (`cosine 0.92`). An agent knows exactly what this tool inspects and can distinguish it from `listInsights` or `listDupCandidates` at a glance.

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

Usage Guidelines3/5

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

Usage is implied by the tool's nature (a health check) and the scope note "takes no arguments; scans the whole vault" clarifies it is an all-in-one sweep. However, it never states when to prefer this over related siblings like `listDupCandidates` (overlapping with `nearDuplicates`) or `listInsights`, and offers no when-not guidance for large vaults.

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