analyze_file
Read a file and answer a specific question about it with structured analysis. Choose from security, bug, performance, or architecture focus.
Instructions
Read ONE file and answer a question about it using a local or cloud LLM — Claude never sees the file contents, only the structured findings the LLM returns (~90% token savings). Use when you have one specific file and a specific question (security check, bug hunt, architectural concern). For the same question across many files (glob patterns), use batch_analyze. For a natural-language search across the codebase with no specific file in mind, use explore. Pure line-range questions like 'show me lines 437–490' short-circuit the LLM entirely and return the requested lines verbatim at zero token cost. Read-only: reads filePath, optionally reads includeContext files, makes one LLM call. Returns: {success, filePath, fileSize, lineCount, language, analysisType, question, summary, findings:[strings], confidence (0-1), suggestedActions:[strings], backend_used, processing_time, tokens_saved}. Verbatim short-circuit returns the same shape with analysisType:'verbatim', backend_used:'direct_extraction', and the requested lines in summary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to the file to analyze | |
| question | Yes | Question about the file (e.g., "What are the security vulnerabilities?") | |
| options | No |