axiom_graph_drift_query¶
- axiom_graph.mcp.server.axiom_graph_drift_query(project_root, filter=None, location_glob=None, group_by=None, format=None, page=0, limit=100, include_frozen=False)¶
Filtered/grouped/paginated projection over the persisted staleness inventory.
This is the read-only companion to
axiom_graph_check.checkanswers “how much drift is there?” in one summary line; this answers “what are the specific drifted nodes (or distribution / IDs)?” with pagination so large drift volumes don’t overflow the tool-result cap.- Parameters:
- project_root str
Absolute path to the indexed project.
- filter str | None
Status filter.
None(all own + link problem statuses),"staleness"(own + LINKED_STALE only),"links"(LINKED_STALE + BROKEN_LINK),"all"(every own + link problem status), or any individual status name (CONTENT_UPDATED,DESC_UPDATED,RENAMED,NOT_FOUND,LINKED_STALE,BROKEN_LINK). TheDOC_SECTION_LONGadvisory is not addressable here – it lives on a different table and is summarised byaxiom_graph_check.- location_glob str | None
fnmatch-style path glob (
**for recursive) applied tonodes.level_3_location(falling back tolocation). E.g."axiom_graph/viz/**". Filters BEFORE grouping; grouped counts reflect the post-filter slice.- group_by str | None
Optional grouping axis. One of:
None– flat row list (paginated)."status"– group byown/linkstatus pair."location_prefix"– group by 2-component path prefix (axiom_graph/viz,axiom_graph/index, …)."feature"– group by inbounddocuments-edge feature ancestor (docs.features.{X}in the doc tree). Nodes with no inbounddocumentsedge bucket as(undocumented); never silently dropped.
- format str | None
Projection.
None(the default) resolves to"full"when ungrouped and"counts"whengroup_byis set – so an aggregate call returns a compact distribution rather than dumping every full row. Explicit values:"full"–id, own_status, link_status, location, via."ids"– newline-delimited IDs (or{group, ids}per group whengroup_byis set)."counts"–{group, count}per group. Only valid withgroup_by.
- page int
Zero-indexed page number (
page * limit-> OFFSET). Applies tofullandidson both the flat and grouped paths; grouped pagination is over the flat (pre-group) row set ordered by id, then re-grouped within the page, so groups may span page boundaries.countsis a bounded distribution and is never paginated.- limit int
Page size (default 100).
- include_frozen bool
When
False(the default), rows under docs tagged inconfig.staleness.frozen_tagsare excluded from output, except BROKEN_LINK rows which are retained with a[frozen-source]postfix onformat='full'. WhenTrueall rows are returned, with a[frozen]postfix on frozen rows informat='full'. Markers never appear onformat='ids'orformat='counts'.
- Returns:
Newline-delimited textual representation of the projection. The
fullandidsprojections are prefixed with a[N of M drifted nodes]count header (with a(pass page=<next> for next page)hint when more rows remain), matching the sibling paginated tools. Shapes:flat full: count header,
#column header, thenid own/link location via=...per line.flat ids: count header, then bare node IDs.
grouped counts:
group countper line (no header; unpaginated).grouped ids: count header, then
[group]+ indented IDs.grouped full: count header,
#column header, then[group]+ indented full rows.
Returns
"(no matches)"when the post-filter slice is empty, and"(page out of range)"whenpagepaginates past the end of an otherwise non-empty slice (both the flat and groupedfull/idspaths).- Raises:
ValueError – invalid
filter,group_by,format, orformat='counts'withoutgroup_by.- Return type:
str