scan_codebase
Scan and analyze a codebase using tree-sitter AST analysis to produce a structured context payload. Enables deep codebase understanding for code review, refactoring, and planning.
Instructions
Scan and analyze a codebase with tree-sitter, producing a structured context payload.
Performs AST analysis, change detection, and caching. Writes the analysis payload to disk and returns instructions to retrieve it via read_payload_chunk. The payload contains pure architectural data — no AGENTS.md writing instructions.
Use this tool when you need deep codebase understanding for any task (code review, refactoring, planning, Q&A). To generate or update AGENTS.md specifically, use generate_agents_md instead — it orchestrates the full workflow automatically.
Supported languages: Python, C#, TypeScript, JavaScript, Go.
Args: params (ScanCodebaseInput): Input parameters containing: - project_path (str): Path to the project root (default: ".") - force_full_scan (bool): Ignore cache and rescan everything (default: True). Set to False only when called as part of an incremental update workflow.
Returns: str: JSON with total_chunks and instructions to call read_payload_chunk.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |