Skip to main content
Glama

Analyse images

analyze_images
Read-only

Scan files, folders, or globs to report image format, size, dimensions, transparency, and animation, and optionally classify images and preview optimization plans.

Instructions

Scan files, folders or globs and report what is there: format, size, dimensions, transparency, animation. With deep: true, also classify each image (photo, screenshot, graphic, icon, animated) and show the plan optimize_images would follow (candidate formats, sizes, quality target, output path). Read-only. Paged: use offset/nextOffset. Allowed directories: (none configured).

Input Schema

NameRequiredDescriptionDefault
cropNoExact output shape (e.g. 400x400 thumbnails). attention keeps faces/salient areas; entropy keeps the busiest area.
deepNoDecode and classify each image (photo/screenshot/graphic/icon/animated) and show the plan. Slower; at most 50 per call.
limitNo
pathsYesFiles, folders or globs (e.g. "site/public/**/*.png") inside the allowed directories.
offsetNo
policyNoauto (default): WebP (lossy, lossless or palette, whichever is smallest at the target); works in every current browser. avif: AVIF or WebP, whichever is smaller (often 20–30% smaller photos; AVIF needs Safari 16.4+). keep: same format as the source. picture: AVIF/WebP plus a JPEG/PNG fallback for <picture>.
resizeNoFit inside this box, keeping the aspect ratio. Never upscales.
targetNoVisual-quality target (SSIMULACRA 2). Presets for photos: small=65, balanced=75 (default), high=85, lossless-look=90; screenshots, graphics and icons get +10 (faint UI lines need it). Or an exact number 30–100 for every image.
widthsNoResponsive widths for srcset. "auto" = 640/960/1280/1920/2560 up to the image's own width. Files get a -<w>w suffix.
metadataNostrip (default): remove EXIF/GPS/XMP after auto-rotating. all: keep metadata.
priorityNoMarkup only: above-the-fold image (loading="eager", fetchpriority="high").
recursiveNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

"Read-only" is consistent with readOnlyHint=true, and the description adds context the annotations do not: paged results via offset/nextOffset, and the critical operational note that allowed directories are "(none configured)", which tells an agent calls may fail or be scoped to nothing. The depth/slowness tradeoff is stated but partly duplicates the deep param's schema text.

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?

Front-loaded with the primary output, then the deep mode, then the safety/paging constraints. Dense but every clause carries information; the parenthetical "(candidate formats, sizes, quality target, output path)" is the only slightly verbose stretch.

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

Completeness3/5

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

With 12 parameters, nested objects and no output schema, the description does the minimum: it names the reported fields and the plan contents, but never describes the result envelope (per-file entries, nextOffset, error behavior for disallowed paths). The biggest gap is failing to say that policy/target/widths/resize/crop only affect the displayed plan, leaving an agent to guess.

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

Parameters3/5

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

Schema coverage is 75%, so the baseline is 3. The description explains deep, paths and offset/nextOffset paging, but ignores the nine output-shaping parameters (crop, resize, widths, target, policy, metadata, priority, limit) — an agent reading only the description would not know these merely annotate the deep plan rather than change the scan.

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?

States a specific verb (scan/report) and resource (image files, folders, globs) plus exactly what is reported: format, size, dimensions, transparency, animation. It also distinguishes its two modes (shallow vs deep) and names the sibling whose plan it previews, so an agent can separate it from optimize_images without opening a schema.

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

Usage Guidelines4/5

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

Gives a clear trigger for the expensive mode ("With deep: true, also classify...") and implicitly routes the agent to optimize_images when it wants to act on the reported plan. It does not state when to prefer compare_images or when not to use this tool, so it stops short of explicit alternatives.

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