analyze_image
Analyze RPG Maker project images with AI vision for detailed analysis, or offline for grid dimensions and quadrant colors.
Instructions
Analyze images related to the project. mode "ai" sends a project image file (tileset, character sheet, map screenshot, battler) to an external OpenAI-compatible Vision API and returns {analysis, model, tokens_used} — NETWORK SIDE EFFECT: the resized JPEG leaves your machine to the endpoint configured via VISION_API_URL / VISION_API_KEY / VISION_MODEL env vars; fails if the path escapes the project, the file is missing, or the API is unreachable/times out (120 s). mode "grid" measures a base64 PNG tileset offline and returns its 48px grid {cols, rows, totalTiles}. mode "colors" returns the average RGB of a base64 PNG's four quadrants offline (a crude what-is-on-screen check). For precise offline map layout, query_map view "ascii" is usually better than any image analysis.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ai = Vision API on a project file; grid/colors = offline analysis of a provided base64 PNG. Default "ai" | |
| prompt | No | mode "ai": custom analysis question (default: thorough RPG-Maker-specific analysis) | |
| base64PNG | No | modes "grid"/"colors": raw base64 PNG data (no data: URL prefix) | |
| imagePath | No | mode "ai": image path RELATIVE to the project root, e.g. "img/tilesets/Outside.png"; paths outside the project are rejected | |
| resizeMax | No | mode "ai": max width in px before upload (default 1024; lower = fewer tokens) |