Skip to main content
Glama

audit

Identify knowledge health issues across five modes—stale memories, orphaned nodes, archived items, semantic conflicts, and taxonomy coverage—to guide maintenance and resolution.

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). 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.

Input Schema

TableJSON 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.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so exceptionally well. It discloses return shapes for every mode (wrapped objects, never a bare array), empty result conventions, truncation flags, per-mode default caps and max limits, the fact that archived is not a complete listing, conflict exclusions (pairs linked by contradicts, resolved, resolved_by, or supersedes), the additive nature of resolution connectors, and the candidate-only nature for conflicts and kind_coverage. It also warns against autonomous actions ('never auto-revise', 'present to user; never archive autonomously').

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 long and dense, but it is a complex five-mode tool and every section carries operational importance. It is front-loaded with the purpose and core return-shape rule, then organises details by mode. A slight credit deduction for the wall-of-text approach: bullet points or section headers would improve scannability in a high-temperature model, but the density is supportable and not repetitive.

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?

Though there is no output schema, the description enumerates every mode's return fields, empty-result shapes, and truncation flags, which fully compensates for the missing structured output definition. It also covers edge conditions (archived cap), policy constraints (never archive autonomously), and practical actions (raise limit, use recall for full content). For a tool of this complexity, an agent has everything needed to invoke it correctly and interpret the response.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already has 100% coverage with descriptions for all 7 parameters, but the tool description adds substantial meaning beyond the schema. It explains the depth-2 BFS neighbourhood scope of memory_id, clarifies that memory_id is ignored for non-stale modes, elaborates the archived cap semantics, explains the digest collapse behavior for each mode, gives per-mode default limits, and details the conflicts edge exclusions. These are not merely restated schema defaults — they enrich the agent's understanding of parameter behavior and interaction.

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 opens with a specific, actionable statement — 'Inspect the health of knowledge in a domain across five modes' — which clearly names the operation (inspect), the resource (knowledge), and the scope (domain). It then enumerates all five modes (stale, orphans, archived, conflicts, kind_coverage), each with a precise purpose, which distinguishes it from sibling tools like recall, search, and history. The clarity allows an agent to identify this as a scanning/health-audit tool rather than a retrieval or mutation tool.

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?

The description provides explicit guidance in several places: for archived it says 'Use when search returns nothing but you expect content to exist,' and it repeatedly commands 'when results_truncated is true, you MUST raise limit and call again' and 'never archive autonomously.' It gives contextual direction for each mode (e.g., scope to a domain for focused maintenance passes, supply tags to scope to a workstream). It does not name specific sibling alternatives for all modes, but the use case for each mode is clear enough that an agent can decide when to call audit versus other tools.

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