v1.3.0 - Batch Taxonomy Analysis Tool
New Feature: Batch Taxonomy Usage Analysis
Added get_all_taxonomy_usage() tool for analyzing all terms in a vocabulary with one optimized query instead of hundreds of individual calls.
Key Benefits
- 96% token savings for large vocabularies (562 terms: 5K vs 129K tokens)
- Processes hundreds of terms in single drush call
- Code scanning for hardcoded term IDs/names in custom modules
- Config file scanning for term references
- Complete safe-to-delete analysis per term
- Returns JSON for flexible formatting (CSV, tables, etc.)
Performance
- Optimized SQL queries with field map pre-loading
- 120-second timeout for large vocabularies
- Efficient grep-based code scanning
- Sample node limiting to control response size
Use Cases
- Taxonomy cleanup audits
- Finding unused terms across entire vocabulary
- Detecting hardcoded term references before deletion
- Generating term usage reports
Usage
# Analyze all terms in vocabulary with code scanning
get_all_taxonomy_usage(vocabulary="topics")
# Skip code scanning for faster results
get_all_taxonomy_usage(vocabulary="topics", check_code=False)
# Get more sample nodes per term
get_all_taxonomy_usage(vocabulary="topics", max_sample_nodes=10)Testing
- Tested with real Drupal site
- All 31 tests passing
- Verified with vocabularies of various sizes
Breaking Changes
None - fully backward compatible