Skip to main content
Glama

Sanity-check a finished M4B

audiobook_verify_output
Read-onlyIdempotent

Verify an .m4b audiobook by checking chapter count, total duration, first/last titles, and cover art, optionally cross-checking against the source file.

Instructions

Run the same checks the skill recommends before handing a result back: chapter count, total duration (optionally cross-checked against the original source file), first/last chapter titles, and whether a cover-art video stream is present.

Args: params (VerifyOutputInput): - m4b_path (str): the file to verify. - source_audio_path (Optional[str]): original mp3/m4a, for a duration cross-check. - expected_chapter_count (Optional[int]): compare against this.

Returns: str: JSON with schema: { "duration_seconds": float, "chapter_count": int, "first_chapter_title": str, "last_chapter_title": str, "has_cover_art": bool, "source_duration_seconds": float | absent, "duration_difference_seconds": float | absent, "issues": [str, ...] # empty list means everything checked out } or {"error": ...} if m4b_path can't be probed by ffprobe.

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

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

Annotations already cover read-only, idempotent, non-destructive behavior. The description adds useful behavioral detail: it runs ffprobe-based checks, optionally cross-checks source duration, and returns an error object when the file cannot be probed. This goes beyond the annotations without contradicting them.

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 front-loaded with purpose, then cleanly structured into Args and Returns sections. The inline return JSON is somewhat redundant given an output schema exists, but the overall structure is easy to parse and each section serves a clear navigational role.

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 simple verification tool with strong annotations and an output schema, this is complete: it explains what is checked, the role of each parameter, the return shape, and the error behavior. An agent has everything needed to call and interpret this tool correctly.

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?

Although the context signal reports 0% schema description coverage, the description itself documents all three parameters with meaningful explanations: m4b_path is the file to verify, source_audio_path enables duration cross-checking, and expected_chapter_count is the comparison target. This compensates well for the reported coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'sanity-check a finished M4B' and lists the exact checks performed (chapter count, duration, titles, cover art). It clearly conveys verification/QA rather than status or conversion, though it does not explicitly name or differentiate sibling tools.

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 says to run this 'before handing a result back', giving a clear temporal and workflow context for when to call it. It does not name alternatives or state when not to use it, but the purpose is specific enough that usage is well implied.

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