Skip to main content
Glama

render_preview

Check that an artboard has source code and the local preview server is running, then return the full-site canvas URL for live preview.

Instructions

确认某画板可以在整站画布里观察:校验它已有源码,确保本地预览服务在跑,返回整站画布的 http://127.0.0.1 url(不是画板单独地址——画布能看到项目全部内容,悬浮这块画板点右上角新标签图标即可单独打开它)。画布/画板 preview 是 source.jsx + annotations.md + 项目结构的实时投影:改了源文件(含通用 agent 直接改、编辑器 Undo、git checkout)刷新浏览器即最新,不写盘、不需要重复调用。曾用于生成落盘 preview.html——现在不再落盘

Input Schema

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

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?

With no annotations, the description carries the full burden and does so thoroughly: it discloses no disk writes ('不写盘'), no need to re-call ('不需要重复调用'), live projection of source/annotations/structure, refresh-to-update behavior, and the historical change away from writing preview.html.

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

Conciseness5/5

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

Four dense but purposeful sentences, front-loaded with the main action and URL, followed by behavioral details and a historical caveat. Every sentence adds information needed to call the tool correctly or avoid an outdated workflow.

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?

For a no-output-schema, no-annotation tool, it covers return value, side effects, update semantics, and how to access the alternate view. It does not describe failure behavior if source is missing or the preview service cannot be started, but these are minor gaps given the otherwise rich description.

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 covers projectId and dir; the description adds context that artboardId refers to a board within the project and clarifies the relationship between artboard and project. However, artboardId itself has no schema description and the description does not define its format or provenance, leaving one required parameter only implicitly specified.

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 names a specific action ('确认某画板可以在整站画布里观察'), a concrete resource (artboard in whole-site canvas), and a concrete return (http://127.0.0.1 URL). It explicitly distinguishes itself from an artboard-only address, which separates it from sibling preview/render 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?

It gives clear context: use this to verify an artboard is visible in the whole-site canvas and to get the whole-site URL. It explains how to get the artboard-only view (hover and open new tab) and states when repeated calls are unnecessary, though it does not explicitly name an alternative sibling tool.

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