Skip to main content
Glama
w1ne
by w1ne

extract_previews

Extract auto-rotated JPEG previews from raw files (NEF/CR2/ARW/DNG) to enable vision-based rating. Generates standard and thumbnail images with EXIF metadata, preserving directory structure.

Instructions

Extract auto-rotated JPEG previews from a directory of raw files (NEF/CR2/ARW/DNG/etc) for vision-based rating. Each preview is rotated upright via EXIF orientation and resized to max_dim (default 1024). A smaller thumb_dim (default 384) is also written for token-efficient first-pass culling. Returns a list of items with preview paths plus an EXIF summary (ISO, shutter, focal, aperture, datetime) per file. The scan is recursive, and the output tree mirrors the source tree, so raws with the same filename in different subdirectories get distinct previews. Read the preview path from each item rather than assuming /.jpg.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_dimNoLongest-edge for the standard preview
overwriteNoRe-extract even if preview exists
thumb_dimNoThumb longest-edge; 0 to skip
output_dirNoWhere to write JPEGs. Default: <source_dir>/.previews/
source_dirYesDirectory containing raw files
max_workersNoParallel decode workers. Default: min(8, cpu_count). Lower it if the machine is memory-constrained.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so thoroughly: it discloses EXIF-based auto-rotation, resizing to max_dim and thumb_dim, recursive scanning, mirrored output tree, handling of duplicate filenames, and the instruction not to assume output paths. This gives the agent a reliable mental model of what will happen.

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 several sentences long but each sentence adds a useful detail about behavior, output, or path resolution. It is front-loaded with the core purpose and avoids filler, though it slightly repeats default values already present in the schema.

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

Completeness4/5

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

Given no annotations and no output schema, the description covers the essential return information: a list of items with preview paths and per-file EXIF summaries. It could be more explicit about the exact output item field names or error conditions, but an agent has enough context to invoke the tool and consume its results correctly.

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 description coverage is 100%, so the schema already documents every parameter. The description adds some operational context, such as thumbnails being 'for token-efficient first-pass culling' and the mirroring behavior, but it does not materially enrich parameter semantics beyond what the schema provides.

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 states a specific action on a specific resource: 'Extract auto-rotated JPEG previews from a directory of raw files'. It also clarifies the downstream purpose ('for vision-based rating') and distinguishes itself from siblings like view_photos, rate_photos, and export_images by focusing on preview generation rather than viewing, rating, or exporting.

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?

The description gives clear context for when to use the tool: when raw files need upright JPEG previews for rating workflows. It does not explicitly name alternatives or state when not to use this tool, but the use case is specific enough that an agent can infer appropriate selection among the listed siblings.

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

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/w1ne/darktable-mcp'

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