Skip to main content
Glama

build_and_publish_book

Compile a children's picture book into a self-contained HTML file and multi-file web reader, then serve it locally over Wi-Fi or publish it to your web host.

Instructions

Step 4: Compile the book into:

  1. A self-contained single-file HTML book (<slug>.html with all CSS, JS, and images embedded) that can be opened directly in any browser or AirDropped/shared to a phone or tablet.

  2. A multi-file web reader (index.html, styles.css, script.js, assets/).

  3. By default (serve_local=True), hosts the book immediately on the local device at http://localhost:<port>/<slug>/ and http://<lan-ip>:<port>/<slug>/ for phones on Wi-Fi.

  4. Optionally copies to PUBLISH_WEB_ROOT if the user configured custom self-hosting in .env.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNo
slugYes
serve_localNo
deploy_staticNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose meaningful behavior: it writes files to disk, embeds assets, starts a local HTTP server on a port reachable via LAN IP, and optionally copies to PUBLISH_WEB_ROOT. It omits whether an existing build is overwritten and whether serving blocks or runs in the background, so it stops short of full disclosure.

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?

Front-loaded with the core verb and organized as a numbered list of outputs, so an agent can scan the deliverables quickly. Slightly verbose with parenthetical detail, but every line conveys a concrete behavior rather than filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained. For a build-and-publish tool the description covers the artifacts, hosting endpoints, and optional deploy path well; the only real gap is the unexplained deploy_static parameter.

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?

Schema coverage is 0%, so the description must compensate. It explains slug (via <slug> filenames/paths), port (localhost:<port> and LAN-IP URLs), and serve_local (default true, hosts immediately), but the fourth parameter, deploy_static, is never mentioned anywhere. Partial compensation for the 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?

States a specific action (compile the book) and enumerates the concrete artifacts produced: a single-file HTML book, a multi-file web reader, local hosting, and optional publishing. The 'Step 4' framing places it in the pipeline, though it never names or contrasts with any sibling tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'Step 4' prefix implies it comes after project creation, storyboard saving, and image ingestion, and the serve_local default hints at typical usage. But there is no explicit when-to-use/when-not statement and no mention of the sibling alternatives it should be chosen over.

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