Skip to main content
Glama

analyze_image

Read-onlyIdempotent

Analyze project images using AI vision, offline tile grid measurement, or quadrant color averaging to get analysis, grid dimensions, or color data.

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

TableJSON Schema
NameRequiredDescriptionDefault
modeNoai = Vision API on a project file; grid/colors = offline analysis of a provided base64 PNG. Default "ai"
imagePathNomode "ai": image path RELATIVE to the project root, e.g. "img/tilesets/Outside.png"; paths outside the project are rejected
promptNomode "ai": custom analysis question (default: thorough RPG-Maker-specific analysis)
resizeMaxNomode "ai": max width in px before upload (default 1024; lower = fewer tokens)
base64PNGNomodes "grid"/"colors": raw base64 PNG data (no data: URL prefix)
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses network side effects (image sent to external API), required env vars, and failure modes. Annotations already state readOnly, safe, idempotent, open-world; description adds critical behavioral context without contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is fairly long but well-structured with clear mode breakdowns. Every sentence provides necessary info; minor verbosity in the 'ai' mode explanation but overall earns its space.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with three modes, network side effects, and offline analysis, the description covers all important aspects: return values, failure modes, environment dependencies, and alternatives. No output schema but return format is described per mode.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema descriptions cover all 5 parameters, but the description adds significant value by explaining mode-specific usage, defaults (resizeMax=1024), and constraints (base64PNG must be raw). This goes beyond the schema's basic descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool analyzes images with three distinct modes (ai, grid, colors), each with specific functionality. It distinguishes itself from sibling tool query_map by noting that query_map's 'ascii' view is better for precise map layout.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit when-to-use guidance for each mode, including failure conditions (path escapes, missing file, API timeout) and a clear alternative (query_map for map layout). This helps the agent decide correctly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DiegoLopez0208/RpgMakerMVUltimate-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server