structural_query
Run structural audits to identify undocumented exports, long functions, and unused context parameters, supporting code review and refactor preparation.
Instructions
Run a curated structural check over the topology index — find symbols by SHAPE, not name. Complements topology_search (find by name) and search_in_files (find by text) with audits useful for review and refactor prep. Named queries (no raw tree-sitter queries are exposed): "undocumented-exports" (exported functions/methods/types/constants with no doc comment), "long-functions" (functions over min_lines, default 80), "unused-context" (Go functions taking context.Context whose body never references it). Results are approximate (source=topology) and confidence-labelled where the check is heuristic. Returns a clear message when the index is disabled or empty.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of findings to return. Default 50. | |
| query | No | Which structural check to run: "undocumented-exports", "long-functions", or "unused-context". | |
| language | No | Optional filter by language (e.g. 'go', 'python'). unused-context is Go-only regardless. | |
| min_lines | No | For long-functions: minimum line span to flag. Default 80. |