Skip to main content
Glama

build_publish_pack

Build a three-stage screenshot pipeline for documentation: generate previews, capture full-page screenshots via headless browser, then seal them into doc assets with a manifest for markdown references.

Instructions

截图流水线三阶段(PRD/上线公告等用画布截图当上下文的类型的 sidecar)。previews:校验 docs//.build/captures.json 并渲染 .build/previews/.html,每个 capture 返回的 url(http://127.0.0.1)给浏览器工具打开、按 actions 操作后截图;capture:可选的自动化截图——无头浏览器(本机 Chrome,找不到才下载,不弹窗)按 actions 操作后按内容真实高度截图,写 .build/exported-images/.png;actions 表达不了的复杂交互可跳过这步手动截图放同一位置。seal:核对图片清单,把截图落进 docs//assets/.png + 写 .build/captures-manifest.json(doc.md 用 引用)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dirNo覆盖默认工作目录(项目所在父目录);相对路径按当前工作目录解析;缺省用 PROTOFLOW_HOME 或启动时的 cwd
modeYes
docIdYes
projectIdYes项目 id(同时也是项目文件夹名)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses several behaviors: it uses headless Chrome, downloads Chrome only if not found (no popup), operates on specific file paths, writes output files, and may skip steps for complex interactions. It doesn't disclose failure modes or side effects (e.g., what happens if captures.json is missing), but the provided detail is substantial and goes beyond what the schema offers. Not a 5 because it omits some edge cases.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single dense paragraph, front-loaded with the overall purpose, but it lacks structure. It uses semicolons and colons to separate modes, but the flow is hard to scan quickly. Each sentence carries technical detail, but it could be broken into bullet points for clarity. It's not verbose, but the density hurts readability and quick parsing for an agent.

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?

This is a complex multi-mode tool with no output schema, but the description covers the main steps: file inputs, rendering, browser interaction, and output files. It doesn't specify return values or success criteria, but the absence of an output schema and the focus on side effects (writing files) means the agent can infer the result from file existence. The main gap is lack of error handling and prerequisites, but given the complexity, the description is largely complete.

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 covers projectId and dir with descriptions, but docId is undocumented. The description adds meaning by explaining the file paths and the modes, which clarifies the parameters' roles. For instance, it explains that docId is used in paths like docs/<docId>/.build. It compensates for the 50% coverage by providing enough context to infer docId's purpose. Slight deduction because there is no explicit mapping of each parameter to its use, but the paths imply it.

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 clearly states what the tool does: it is a three-stage pipeline for taking canvas screenshots and publishing them as assets. It names the specific modes (previews, capture, seal) and the resources involved (docs/<docId>/.build, assets). This clearly distinguishes it from siblings like render_preview or export_canvas, which are likely single-stage operations. The action is specific and the scope is well-defined.

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 explains the three modes: previews for validation, capture for automated screenshots, and seal for finalizing. It mentions that capture is optional for complex interactions and that manual screenshots can be used instead. However, it does not explicitly state when to use this tool versus alternatives like render_preview or export_canvas, and it lacks explicit exclusions or conditions for when NOT to use it. The context is clear but the decision boundary is implicit.

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