Skip to main content
Glama

Embed a metadata record into a cover image's EXIF/XMP/IPTC tags

audiobook_embed_cover_metadata
DestructiveIdempotent

Embed a book's metadata (title, author, publisher, etc.) into a cover image's EXIF/XMP/IPTC tags via exiftool, preserving the full record as JSON in the JPEG comment. Use before converting to M4B to keep audiobook info with its cover.

Instructions

Write a book metadata record into an existing image file's EXIF/XMP/IPTC tags via exiftool (title, creator/artist, description, publisher, copyright, date, keywords, source URL, rating). Narrator and length have no standard EXIF equivalent, so the complete record is also stamped into the JPEG Comment field as JSON so nothing is lost. Overwrites image_path's own metadata in place -- the image's pixel data is untouched.

Requires exiftool on PATH; if it's missing this tool errors rather than silently skipping the embed (per the source skill's guardrail).

Args: params (EmbedCoverMetadataInput): - image_path (str): the image file to tag (typically the output of audiobook_fetch_cover_image). - metadata (BookMetadataInput): the record to embed, e.g. straight from audiobook_lookup_book_metadata's "record". - dry_run (bool): if true, return the exiftool command without writing anything.

Returns: str: JSON {"command": [str, ...], "output": str|null, "dry_run": bool} or {"error": ...} if image_path doesn't exist or exiftool fails/is missing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already signal destructive and idempotent behavior, and the description reinforces and expands on them by disclosing that metadata is overwritten in place while pixel data is untouched. It also reveals a key guardrail: missing exiftool produces an error rather than a silent skip, and that a JSON copy is stamped into the JPEG Comment so nothing is lost.

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

Conciseness5/5

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

The description is well organized into action, side effects, dependency, arguments, and return value sections, with no filler. Every sentence earns its place, especially the exiftool guardrail and the JSON Comment fallback explanation.

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 mutating tool with a nested input schema, the description covers prerequisites, failure modes, destructive behavior, dry-run semantics, and the exact return shape. Nothing an agent needs to call the tool safely and correctly is missing.

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

Parameters4/5

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

Even though top-level schema description coverage is 0%, the description compensates by explaining the role of each argument, including that dry_run returns the command without writing. It also connects image_path and metadata to sibling tool outputs, which the schema alone does not convey, though it does not enumerate every nested BookMetadataInput field.

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 and resource: writing a book metadata record into an existing image file's EXIF/XMP/IPTC tags via exiftool. It also distinguishes the tool from siblings by noting image_path typically comes from audiobook_fetch_cover_image and metadata from audiobook_lookup_book_metadata.

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 workflow context: image_path is typically the output of audiobook_fetch_cover_image and metadata is expected from audiobook_lookup_book_metadata's record. It also explains dry_run's purpose, though it does not explicitly name alternatives or state when not to use the tool.

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