Skip to main content
Glama

audit

Detect stale, duplicated, orphaned, or conflicting memories and check taxonomy health across five modes to keep your knowledge base consistent.

Instructions

Inspect the health of knowledge in a domain across five modes. Omitting domain scans the entire workspace.

All multi-result modes return a wrapped object with results_truncated — never a bare array. When results_truncated is true, raise limit to retrieve more.

mode=stale: Returns {candidates, results_truncated, placeholders, placeholders_truncated}. Drift candidates — stale, contradicted, or duplicated memories — plus a separate placeholders section: connected live memories whose label or node_kind signals an unresolved placeholder (TBD, TODO, open question, stale goal/issue). Empty result is {candidates: [], results_truncated: false, placeholders: [], placeholders_truncated: false}. Present each to the user; never archive autonomously. Check placeholders_truncated and raise limit when true. Default limit 10 (max 500).

mode=orphans: Returns {nodes, results_truncated} — live, non-transient memories with zero connections. Empty result is {nodes: [], results_truncated: false}. Default limit 50 (max 500).

mode=archived: Returns {nodes, results_truncated}. Empty result is {nodes: [], results_truncated: false}. Capped at 25 by default — this is not a complete archive listing. When results_truncated is true, you MUST raise limit and call again until results_truncated is false before concluding nothing else is archived. Use when search returns nothing but you expect content to exist.

mode=conflicts: Returns {candidates, results_truncated}. Empty result is {candidates: [], results_truncated: false}. Semantically adjacent pairs that may warrant contradiction review — candidates only, not confirmed conflicts. Default limit 10 (max 100). Pairs already linked by contradicts, resolved, resolved_by, or supersedes are excluded; other edge types do not suppress. After resolving, connect with relationship=resolved (or resolved_by / supersedes) — additive; do not disconnect the contradicts edge.

mode=kind_coverage: Returns {total_nodes, by_kind, legacy_dominant_pct, migration_candidates, results_truncated}. Taxonomy health signal — per-kind counts, legacy decision/standing dominance percentage, and lean migration_candidates (id, label, truncated why_matters only). Candidates are: (a) decision nodes whose label or description text suggests a different node_kind (e.g. contains 'finding', 'issue', 'question'), and (b) any node with a label exceeding 120 chars (the lean output budget) — a node that received label_nudge at filing time is a candidate. Candidate-surfacing only; never auto-revise; use recall(id) for full content. Default limit 50 (max 500) on migration_candidates.

digest=true collapses to {lines, results_truncated, placeholder_lines, placeholders_truncated} for stale; {lines, results_truncated} for orphans.

Supply tags to scope to a workstream. Supply memory_id (mode=stale only) to scope to a memory's neighbourhood.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "mode": "<mode>"
    },
    "name": "audit"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesRequired: stale (drift candidates), orphans (isolated memories), archived (list archived memories), conflicts (semantic contradiction candidates), or kind_coverage (taxonomy health / migration readiness)
tagsNoComma-separated tags. Only surfaces candidates carrying at least one of the supplied tags. OR semantics. Applies to all four modes.
limitNoMax results. Defaults: stale=10, orphans=50, archived=25, conflicts=10. When results_truncated is true, raise limit to retrieve more. archived max 500; stale/orphans max 500; conflicts max 100.
digestNoWhen true, stale and orphans return {lines, results_truncated} instead of full objects. Default false.
domainNoOptional domain to scope the audit. Omit to scan the entire workspace. Use for cross-domain drift review; scope to a domain for focused maintenance passes.
memory_idNoAnchor memory ID. Scopes stale candidates to the depth-2 BFS neighbourhood of this memory. Applies to mode=stale only; ignored for orphans, archived, and conflicts.
node_kindNoOptional filter by node_kind. Space-separated for OR match. Applies to all four modes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.41.1
    • changedInput schema / properties / digest / description
      Previous value: -"When true, collapse multi-result lists to compact text lines (always a string array). Default false preserves current JSON shape."New value: +"When true, stale and orphans return {lines, results_truncated} instead of full objects. Default false."
    • changedInput schema / properties / limit / description
      Previous value: -"Max candidates to return (default 10, applies to stale and conflicts modes)"New value: +"Max results. Defaults: stale=10, orphans=50, archived=25, conflicts=10. When results_truncated is true, raise limit to retrieve more. archived max 500; stale/orphans max 500; conflicts max 100."
    • changedInput schema / properties / mode / description
      Previous value: -"Required: stale (drift candidates), orphans (isolated memories), archived (list archived memories), or conflicts (semantic contradiction candidates)"New value: +"Required: stale (drift candidates), orphans (isolated memories), archived (list archived memories), conflicts (semantic contradiction candidates), or kind_coverage (taxonomy health / migration readiness)"
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "stale",
      -  "orphans",
      -  "archived",
      -  "conflicts"
      -]New value: +[
      +  "stale",
      +  "orphans",
      +  "archived",
      +  "conflicts",
      +  "kind_coverage"
      +]
  2. Changed7 schema fields changedv1.34.1
    • changedInput schema / properties / domain / description
      Previous value: -"Optional domain to scope the audit"New value: +"Optional domain to scope the audit. Omit to scan the entire workspace. Use for cross-domain drift review; scope to a domain for focused maintenance passes."
    • changedInput schema / properties / limit / description
      Previous value: -"Max candidates to return (default 10, applies to stale mode)"New value: +"Max candidates to return (default 10, applies to stale and conflicts modes)"
    • changedInput schema / properties / memory_id / description
      Previous value: -"Anchor memory ID. Scopes stale candidates to the depth-2 BFS neighbourhood of this memory. Applies to mode=stale only; ignored for orphans and archived."New value: +"Anchor memory ID. Scopes stale candidates to the depth-2 BFS neighbourhood of this memory. Applies to mode=stale only; ignored for orphans, archived, and conflicts."
    • changedInput schema / properties / mode / description
      Previous value: -"Required: stale (drift candidates), orphans (isolated memories), or archived (list archived memories)"New value: +"Required: stale (drift candidates), orphans (isolated memories), archived (list archived memories), or conflicts (semantic contradiction candidates)"
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "stale",
      -  "orphans",
      -  "archived"
      -]New value: +[
      +  "stale",
      +  "orphans",
      +  "archived",
      +  "conflicts"
      +]
    • addedInput schema / properties / node_kind
      Added value: +{
      +  "description": "Optional filter by node_kind. Space-separated for OR match. Applies to all four modes.",
      +  "type": "string"
      +}
    • changedInput schema / properties / tags / description
      Previous value: -"Comma-separated tags. Only surfaces candidates carrying at least one of the supplied tags. OR semantics. Applies to all three modes."New value: +"Comma-separated tags. Only surfaces candidates carrying at least one of the supplied tags. OR semantics. Applies to all four modes."
  3. Changed1 schema field changedv1.34.0
    • addedInput schema / properties / digest
      Added value: +{
      +  "description": "When true, collapse multi-result lists to compact text lines (always a string array). Default false preserves current JSON shape.",
      +  "type": "boolean"
      +}
  4. Changed2 schema fields changedv1.29.0
    • addedInput schema / properties / memory_id
      Added value: +{
      +  "description": "Anchor memory ID. Scopes stale candidates to the depth-2 BFS neighbourhood of this memory. Applies to mode=stale only; ignored for orphans and archived.",
      +  "type": "string"
      +}
    • addedInput schema / properties / tags
      Added value: +{
      +  "description": "Comma-separated tags. Only surfaces candidates carrying at least one of the supplied tags. OR semantics. Applies to all three modes.",
      +  "type": "string"
      +}
  5. Addedv1.18.1
  6. Removedv1.13.0
  7. Addedv1.12.0

TDQS

A4.4/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 well: it declares read-only intent by proxy ('never archive autonomously', 'Candidate-surfacing only; never auto-revise'), discloses the archived cap of 25 as a non-complete listing, states truncation semantics per mode, and describes edge-type exclusions for conflicts. It never says outright that the tool mutates nothing or what permissions are needed, which keeps it below 5.

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 long, but the per-mode block structure is front-loaded and scannable, and each block justifies itself for a five-way multiplexed tool. Minor waste comes from restating empty-result literals in three modes and repeating the 'raise limit when truncated' instruction several times.

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?

This is a complex, seven-parameter, five-mode tool with no output schema, and the description documents the return shape of every mode plus every empty case and truncation flag. Nothing an agent needs to interpret results or paginate correctly is missing.

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 baseline is 3, and the description adds real value beyond it: per-mode default and max limits, the instruction to raise limit when results_truncated is true, and how digest reshapes output for stale vs orphans. It largely mirrors the schema's tag and memory_id descriptions rather than extending them.

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 opening sentence states a specific verb and resource ('Inspect the health of knowledge in a domain') and names the five modes with a one-line summary of each (stale=drift candidates, orphans=isolated memories, conflicts=semantic contradiction candidates, etc.). An agent can pick the right mode without opening any sibling schema.

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 concrete selection criteria, e.g. mode=archived is for when 'search returns nothing but you expect content to exist', and explains domain omission vs scoping. It stops short of explicitly contrasting audit with siblings like significance or orient, but the mode-level routing is clear enough to act on.

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