Skip to main content
Glama

Preview an EPUB's chapters and metadata

audiobook_inspect_epub
Read-onlyIdempotent

Parse an EPUB to preview metadata, chapters, and cover art before conversion, enabling a quick sanity-check of chapter detection without touching audio files.

Instructions

Parse an EPUB and preview the book metadata, chapter list, and cover art the audiobook pipeline would use, WITHOUT touching any audio file or creating a conversion job. Use this before audiobook_start_conversion to sanity-check chapter detection (e.g. spot an EPUB with an unusual structure) or to answer questions like "how many chapters does this book have" without needing the MP3 yet.

Args: params (InspectEpubInput): - epub_path (str): Absolute path to the .epub file.

Returns: str: JSON with schema: { "title": str, "author": str, "series": str, "series_index": str, "year": str, "cover_found": bool, "chapter_count": int, "total_word_count": int, "first_chapters": [{"n": int, "title": str, "word_count": int}, ...], # up to 3 "last_chapters": [{"n": int, "title": str, "word_count": int}, ...] # up to 3 } or {"error": str, "error_type": str} on failure.

Error Handling: - "epub_extract_error" style errors if the file isn't a valid EPUB or no chapters could be located at all (e.g. no TOC and no spine items pass the front/back-matter filter).

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.4/5.0
Behavior5/5

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

Even with annotations declaring readOnlyHint, idempotentHint, and destructiveHint, the description adds concrete behavioral guarantees: no audio files are touched, no conversion job is created, and it documents both the exact JSON return shape and the 'epub_extract_error' style failure mode. This goes well beyond the annotations.

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 well-structured and front-loaded with purpose and usage context, followed by clear Args, Returns, and Error Handling sections. It is slightly long because the full return JSON schema is embedded even though an output schema exists, which costs it a point on conciseness.

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 single-parameter, read-only inspection tool, the description covers the purpose, when to use it, what it returns, and what errors to expect. The presence of an output schema further fills in return details, so nothing needed for correct invocation is missing.

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?

The description states that epub_path must be an absolute path to the .epub file, but this mostly repeats the input schema's property description, which already includes an example. With schema coverage listed at 0%, the description partially compensates by naming the requirement, but it adds no extra constraints such as file existence, valid EPUB requirement, or path format edge cases.

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 opens with a specific verb and resource: 'Parse an EPUB and preview the book metadata, chapter list, and cover art'. It also clearly differentiates this tool from conversion tools by stating it works 'WITHOUT touching any audio file or creating a conversion job', making its purpose unambiguous.

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 explicitly says to use this tool before audiobook_start_conversion to sanity-check chapter detection, and to answer questions like chapter counts without needing an MP3. It does not explicitly contrast itself with audiobook_inspect_chapter_boundary, so it stops short of fully enumerating alternatives.

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