query_decisions
Find recorded architecture decisions by type, subproject, code symbol, file path, tag, or time to answer why a design was chosen. Includes review status, staleness verification, and compact output options.
Instructions
Query the decision knowledge graph. Filter by type, subproject, code symbol, file path, tag, or time — answers "why was this architecture chosen?" with the actual decision record. Use service_name to scope to a subproject. Defaults to auto+human-approved decisions; use include_pending or review_status for other tiers. Rows carry cluster_ids when part of a topical cluster (see clusters_summary). Read-only. Returns JSON: { decisions: [{ id, title, type, content, tags, review_status, cluster_ids? }], clusters_summary?, total_results }. Supports output_format: "toon". Capped by memory.recall.timeoutMs (default 5000ms); on timeout returns { decisions: [], total_results: 0, degraded: true }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | Yes | Filter by tag | |
| type | No | Filter by decision type | |
| as_of | Yes | Only decisions active at this ISO timestamp | |
| limit | No | Max results (default: 50) | |
| search | No | Full-text search query (FTS5 with porter stemming) | |
| verify | No | Staleness verification (default true). Checks each `symbol_id`-linked decision against the live index + git history; deleted/renamed/materially-changed code is flagged `verification` + `stale: true`. false skips the check. | |
| order_by | No | Result ordering: "recency" (default, valid_from DESC), "created_at" DESC, or "heat" (time-decay favoring frequently-recalled + fresh; degrades to recency if disabled in config). | |
| file_path | Yes | Filter by linked file path | |
| symbol_id | Yes | Filter by linked symbol FQN | |
| git_branch | No | Branch filter: "current" (default) = current branch + branch-agnostic; "all" = every branch; any other value = that branch + branch-agnostic. | |
| index_only | No | Progressive disclosure (default false). true omits full `content` — just id, title, type, anchors, tags, ~1-line `summary`. Pick ids cheaply, then pull full content with `get_decision`. | |
| service_name | No | Filter by subproject name (e.g., "auth-api") | |
| verification | No | Filter by verification verdict (implies verify=true). "stale" = any flagged row; "ok" = verified-fresh only. Omit to return all rows annotated in place. | |
| output_format | No | Output format. "json" (default) returns JSON, "markdown" returns LLM-friendly fenced markdown (tool-specific), "toon" returns Token-Oriented Object Notation — 30-60% fewer tokens on tabular data, fully lossless. | |
| review_status | No | Restrict to a single review tier (overrides default + include_pending). Use "pending" to fetch the review queue. | |
| include_pending | No | Also return decisions in the review queue (review_status="pending"). Default: false — only auto-approved and approved rows are returned. | |
| include_invalidated | No | Include invalidated decisions (default: false) |