You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add screenshot optimization — scale + color reduction (up to 95% smaller)
New parameters `scale` (0.1-1.0) and `colors` (2/4/16/256) for aidex_screenshot.
Reduces file size dramatically for LLM context (e.g., 108 KB → 5 KB with scale=0.5, colors=2).
Cross-platform post-processing: Windows (System.Drawing), macOS (sips), Linux (ImageMagick).
Tool description includes iterative strategy for AI assistants to auto-optimize.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+57-17Lines changed: 57 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ AiDex is an MCP server that gives AI coding assistants instant access to your en
29
29
|**Global Search**|`global_init`, `global_query`, `global_signatures`, `global_status`, `global_refresh`| Search across ALL your projects at once — "Have I ever written X?" |
30
30
|**Sessions**|`session`, `note`| Track sessions, detect external changes, leave notes for next session (with searchable history) |
31
31
|**Task Backlog**|`task`, `tasks`| Built-in task management with priorities, tags, and auto-logged history |
32
-
|**Screenshots**|`screenshot`, `windows`| Cross-platform screen capture (fullscreen, window, region) — no index needed|
32
+
|**Screenshots**|`screenshot`, `windows`| Cross-platform screen capture with LLM optimization — scale + color reduction saves up to 95% tokens|
33
33
|**Viewer**|`viewer`| Interactive browser UI with file tree, signatures, tasks, and live reload |
| Global Search | `aidex_global_init`, `aidex_global_query`, `aidex_global_signatures`, `aidex_global_status`, `aidex_global_refresh` | Search across ALL projects |
|`aidex_viewer`| Open interactive project tree in browser |
393
401
|`aidex_task`| Create, read, update, delete tasks with priority and tags |
394
402
|`aidex_tasks`| List and filter tasks by status, priority, or tag |
395
-
|`aidex_screenshot`| Take a screenshot (fullscreen, window, region) |
403
+
|`aidex_screenshot`| Take a screenshot (fullscreen, window, region) with optional scale + color reduction |
396
404
|`aidex_windows`| List open windows for screenshot targeting |
397
405
|`aidex_global_init`| Scan directory tree, register all indexed projects in global DB |
398
406
|`aidex_global_status`| List all registered projects with stats |
@@ -521,31 +529,63 @@ aidex_global_status({ sort: "recent" }) # Most re
521
529
aidex_global_refresh() # Update stats, remove stale
522
530
```
523
531
524
-
## Screenshots
532
+
## Screenshots — LLM-Optimized
533
+
534
+
Take screenshots and **reduce them up to 95%** for LLM context. A typical screenshot goes from ~100 KB to ~5 KB — that's thousands of tokens saved per image.
535
+
536
+
### Why this matters
537
+
538
+
|| Raw Screenshot | Optimized (scale=0.5, colors=2) |
539
+
|---|---|---|
540
+
|**File size**|~100-500 KB |~5-15 KB |
541
+
|**Tokens consumed**|~5,000-25,000 |~250-750 |
542
+
|**Text readable?**| Yes | Yes |
543
+
|**Colors**| 16M (24-bit) | 2 (black & white) |
525
544
526
-
Take cross-platform screenshots directly from your AI assistant - no manual file paths needed:
545
+
Most screenshots in AI context are for reading text — error messages, logs, UI labels. You don't need 16 million colors for that.
546
+
547
+
### Usage
527
548
528
549
```
529
-
aidex_screenshot() # Full screen
530
-
aidex_screenshot({ mode: "active_window" }) # Active window
550
+
aidex_screenshot() # Full screen (full quality)
551
+
aidex_screenshot({ mode: "active_window" }) # Active window
531
552
aidex_screenshot({ mode: "window", window_title: "VS Code" }) # Specific window
2.**If unreadable**: retry with `colors: 16` (adds shading for UI elements)
574
+
3.**If still unclear**: try `scale: 0.75` or full color
575
+
4.**Remember**: cache what works per window/app for the rest of the session
576
+
577
+
This way the AI learns the right settings per app without wasting tokens on oversized images.
578
+
579
+
### Features
580
+
538
581
-**5 capture modes**: Fullscreen, active window, specific window (by title), interactive region selection, coordinate-based rectangle
539
-
-**Cross-platform**: Windows (PowerShell), macOS (screencapture), Linux (maim/scrot)
582
+
-**Cross-platform**: Windows (PowerShell + System.Drawing), macOS (sips + ImageMagick), Linux (ImageMagick)
540
583
-**Multi-monitor**: Select which monitor to capture
541
584
-**Delay**: Wait N seconds before capturing (e.g., to open a menu first)
542
-
-**Auto-path**: Default saves to temp directory with fixed filename - your AI reads it immediately
585
+
-**Size reporting**: Shows original → optimized size and percentage saved
586
+
-**Auto-path**: Default saves to temp directory with fixed filename
543
587
-**No index required**: Works standalone, no `.aidex/` needed
544
588
545
-
Use `aidex_windows` to find the exact window title, then `aidex_screenshot` with `mode: "window"` to capture it.
546
-
547
-
**Future:** Screenshots will be storable in the AiDex database - attach them to tasks for bug documentation, capture before/after states for refactoring, or persist GUI evidence across sessions.
548
-
549
589
## Interactive Viewer
550
590
551
591
Explore your indexed project visually in the browser:
0 commit comments