Skip to main content
Glama

Download a cover image URL to disk

audiobook_fetch_cover_image

Downloads a cover image from a URL, saves it as a sanitized title-author JPG in the target folder, and reports the real pixel dimensions and file size.

Instructions

Download a specific cover image URL (typically one from audiobook_lookup_book_metadata's covers array -- pick by measured width/height, not source order or URL) to out_dir, and report its real decoded pixel dimensions. Saved as "_.jpg" (or without the author suffix if none given), matching the source skill's naming convention.

Args: params (FetchCoverImageInput): - cover_url (str): the image URL to download. - out_dir (str): destination directory (created if missing). - title/author (str): used to build the filename. - overwrite (bool): default False errors instead of clobbering an existing file with the same name.

Returns: str: JSON {"path": str, "width": int|null, "height": int|null, "bytes": int} or {"error": ...} on failure.

Error Handling: - Errors (not overwrites) if a file with the computed name already exists and overwrite=False. - Network failures surface with the underlying reason.

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.6/5.0
Behavior4/5

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

Annotations indicate readOnlyHint=false, destructiveHint=false, and idempotentHint=false. The description goes beyond to explain overwrite behavior (errors by default, matching source skill's 'ask before overwriting'). It also discloses that out_dir is created if missing and that network failures surface the reason. This is rich context beyond the annotations. However, the description doesn't explicitly state that the file is written to disk in a non-idempotent way (repeated calls error unless overwrite=true), but that's already implied by fetch and overwrite semantics.

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 two paragraphs plus structured sections, but it is front-loaded with the most critical information (picking by dimensions, naming convention). It's compact and each sentence earns its place. Slight redundancy: the 'overwrite' behavior is mentioned in the args list and Error Handling, but that's minor.

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?

Given the output schema exists, the description needn't list return fields, but it does anyway. It covers error scenarios (network failures, existing file without overwrite). It also explains naming convention fully. For a simple download tool, nothing is missing: how to call, what happens, and what to expect on output.

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?

The schema description coverage is 0%, so the description must compensate. It does: each parameter's purpose is described (cover_url for download, out_dir for destination, title/author for filename, overwrite for conflict handling). The description also adds that title/author are sanitized for the filename, a detail beyond the schema. However, it doesn't explain the film name pattern in detail beyond the example, but the example is enough.

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 verb ('Download'), the resource ('a specific cover image URL'), and the key distinction from siblings: it picks by measured width/height, not source order. It clearly differentiates from audiobook_lookup_book_metadata, which returns the covers array, and audiobook_embed_cover_metadata, which embeds metadata, avoiding confusion.

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 explicitly says to use URLs from audiobook_lookup_book_metadata's covers array and warns to pick by measured dimensions. It also clarifies 'when not to use': selecting by source order or URL is incorrect. It implies when to use it (after metadata lookup, before embedding) without naming alternatives, which is sufficient for a downloader.

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