read_context
Analyze and filter code files efficiently by ignoring common artifact directories, chunking large files for manageable processing, and supporting recursive directory reading with customizable file types.
Instructions
Read and analyze code files with advanced filtering and chunking. The server automatically ignores common artifact directories and files:
- Version Control: .git/
- Python: .venv/, pycache/, *.pyc, etc.
- JavaScript/Node.js: node_modules/, bower_components/, .next/, dist/, etc.
- IDE/Editor: .idea/, .vscode/, .env, etc.
For large files or directories, use get_chunk_count first to determine total chunks, then request specific chunks using chunkNumber parameter.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
chunkNumber | No | Which chunk to return (0-based). Use with get_chunk_count to handle large files/directories. | |
encoding | No | File encoding (e.g., utf8, ascii, latin1) | utf8 |
fileTypes | No | File extension(s) to include WITHOUT dots (e.g. ["ts", "js", "py"] or just "ts"). Empty/undefined means all files. | |
maxSize | No | Maximum file size in bytes. Files larger than this will be chunked. | |
path | Yes | Path to file or directory to read | |
recursive | No | Whether to read directories recursively (includes subdirectories) |