Image Tiler for LLM Vision
tilerSplit large images or web page captures into optimally sized tiles for LLM vision analysis, reducing token costs by fetching only non-blank, relevant tiles.
Instructions
Split images into optimally-sized tiles for LLM vision analysis, or capture web page screenshots and tile them.
MANDATORY two-phase workflow — DO NOT skip Phase 1:
Phase 1 (REQUIRED first): Provide ONLY the image source (filePath, sourceUrl, url, etc). DO NOT include preset, tileSize, or outputDir. Returns a model comparison table with token estimates and an outputDir. You MUST present this table to the user and ask which preset they prefer. DO NOT select a preset yourself — the user decides. If you must auto-select, always use the cheapest option.
Phase 2: Call again with the user's chosen preset + the outputDir from Phase 1. Re-include your original image source (filePath, sourceUrl, etc.). For captures, use screenshotPath from Phase 1 instead of url. Returns tile summary with metadata and content hints (no tile images). Use tilesDir + start/end to fetch only the tiles you need.
Stop after Phase 1 if you only need the screenshot (capture mode) or comparison data.
4 tiling presets available:
"claude": 1092px tiles, ~1590 tokens/tile
"openai": 768px tiles, ~765 tokens/tile
"gemini3": 1536px tiles, ~1120 tokens/tile
"gemini": 768px tiles, ~258 tokens/tile
Supports: local files (filePath), remote images (sourceUrl), data URLs, base64, and web page capture (url — Chrome required). Tiles saved as WebP (default) or PNG. Auto-downscales images over 10000px by default.
TOKEN COST NOTE: The get-tiles mode returns image tiles as inline base64, consuming significantly more tokens than typical text-only MCP tools. Each tile costs ~258-1590 tokens depending on preset. Use the Phase 2 summary and tile hints to fetch only non-blank, relevant tiles.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | End tile index (0-based, inclusive). Defaults to start + 4. Max 5 tiles per batch to stay within MCP response limits. | |
| url | No | URL of the web page to capture. Requires Chrome/Chromium installed. | |
| page | No | Tile page to return (0 = first 5, 1 = next 5, etc.). Default: 0 | |
| delay | No | Additional delay in ms after the page is loaded, before capturing (default: 3000) | |
| model | No | Deprecated: use "preset" instead. Accepted for backward compatibility. Available: "claude" (1092px tiles, ~1590 tokens/tile), "openai" (768px tiles, ~765 tokens/tile), "gemini3" (1536px tiles, ~1120 tokens/tile), "gemini" (768px tiles, ~258 tokens/tile). | |
| start | No | Start tile index (0-based, inclusive). Used with tilesDir for pagination. | |
| format | No | Output format for tiles: "webp" (smaller, default) or "png" (lossless) | webp |
| mobile | No | Whether to emulate a mobile device. When true, defaults viewportWidth to 390, deviceScaleFactor to 2, and sets a mobile user agent if not explicitly provided. | |
| preset | No | DO NOT provide on Phase 1 (first call). Only specify on Phase 2 after the user has chosen from the comparison table. Available: "claude" (1092px tiles, ~1590 tokens/tile), "openai" (768px tiles, ~765 tokens/tile), "gemini3" (1536px tiles, ~1120 tokens/tile), "gemini" (768px tiles, ~258 tokens/tile). Auto-selects cheapest when omitted on Phase 2. | |
| dataUrl | No | Data URL with base64-encoded image (e.g. "data:image/png;base64,...") | |
| filePath | No | Absolute or relative path to the image file | |
| tileSize | No | Tile size in pixels. If omitted, uses the model's optimal default (Claude: 1092, OpenAI: 768, Gemini 3: 1536, Gemini: 768). Values outside the model's supported range are automatically clamped with a warning. | |
| tilesDir | No | Path to the tiles directory (returned as outputDir from a previous tiling call). When provided, returns tiles as base64 images for pagination. | |
| outputDir | No | Directory to save tiles. Defaults to tiles/{name}_vN/ next to source for filePath; {base}/tiles/tiled_{ts}_{hex}/ for URL/base64 sources; {base}/tiles/capture_{ts}_{hex}/ for captures. | |
| sourceUrl | No | URL to download the image from (max 50MB, 30s timeout). SSRF filtering active on https:. Set TILER_DENY_HTTP_PRIVATE=1 to block private IPs on http: | |
| userAgent | No | Custom user agent string | |
| waitUntil | No | When to consider the page loaded: "load" (default), "networkidle", or "domcontentloaded" | load |
| imageBase64 | No | Raw base64-encoded image data (no data URL prefix) | |
| maxDimension | No | Max dimension in px (0 to disable, or 256-65536). When set, the image is resized so its longest side fits within this value before tiling. Reduces token consumption for large images. Defaults to 10000px. Set to 0 to disable auto-downscaling. | |
| viewportWidth | No | Browser viewport width in pixels. Defaults to 1280 for desktop, 390 when mobile is true. | |
| screenshotPath | No | Path to a previously captured screenshot. When provided and accessible, skips URL capture. | |
| skipBlankTiles | No | Skip blank tiles in get-tiles mode, returning text annotations instead of images. Set to false to include all tiles. Default: true. | |
| includeMetadata | No | Analyze each tile and return content hints (blank, low-detail, mixed, high-detail) and brightness stats. Enabled by default; set to false to skip. | |
| deviceScaleFactor | No | Device pixel ratio (e.g., 2 for retina). Defaults to 1 for desktop, 2 when mobile is true. |