Embed a metadata record into a cover image's EXIF/XMP/IPTC tags
audiobook_embed_cover_metadataEmbed 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
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |