read_context_data - vision & file context dumper
read_context_dataConvert images, files, or zip archives into an ordered, LLM-ready text dump with OCR and file tree, skipping irrelevant and sensitive data.
Instructions
Extracts readable code/text from images, single files, or zip archives and returns a strictly-ordered, LLM-ready text dump with a file tree for archives. Images are analyzed sequentially; each one is wrapped in --- [Image Index X] Visual Analysis ---. When OPENAI_API_KEY (GPT-4o-mini) or GEMINI_API_KEY is set, images are resized with sharp to max 1024px and sent with detail: "low" (costs ~$0.001/image); on any API failure it silently falls back to local tesseract.js OCR. Pass an ordered items array; each entry is a local path string (file, directory, or .zip), a bare image name/filename, or an in-memory { name, base64 } object. If a referenced image path does not exist on disk, the freshest images from the system temp/clipboard/upload folders are auto-detected, so chat-attached screenshots work out of the box. Single files are line-truncated with a notice; archives get a directory Tree plus every code/text entry. Non-code folders (node_modules, .git, dist, build, .next, coverage, vendor, bin, obj), binary/media files, oversized entries, and sensitive files (.env, id_rsa, .pem, secrets., tokens) are skipped automatically. Output is capped at maxOutputChars characters; a summary footer reports truncation, errors, skipped counts, and estimated token usage. items ordering is always preserved.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| skipBinary | No | ||
| concurrency | No | ||
| ocrLanguages | No | eng+ben | |
| fileLineLimit | No | ||
| skipSensitive | No | ||
| maxOutputChars | No | ||
| includeFileTree | No | ||
| ocrArchiveImages | No | ||
| preProcessImages | No |