Skip to main content
Glama

render_canvas

Opens a live canvas of the whole project with page sidebar, per-page zoom/pan, and real-time reflection of source and annotations via a local URL.

Instructions

打开整站画布:确保本地预览服务在跑,返回它的 http://127.0.0.1 url(浏览器工具打不开 file://,别拿路径自己拼)。画布把项目所有页面和画板汇进一份自包含文档——左侧侧边栏切页面(文档内显隐、无跳转),每页独立的可缩放可平移画布(滚轮平移,Ctrl/Cmd+滚轮或触控板捏合缩放,拖拽平移,一键适应窗口),画板按各自 canvasWidth 真实像素宽度显示、高度随内容自撑。画布是项目 source.jsx / annotations / 结构的实时投影:加删/改名页面画板、改源码、改标注、git 撤回后,刷新已打开的画布标签即最新,不写盘、不需要重复调用本工具

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

The description discloses several important behaviors: it requires the local preview service to be running, it returns a URL (not a file path), the canvas is self-contained, navigation is in-document (no page jumps), zoom/pan interactions are specified, artboards display at real pixel width, and it is a live projection that does not write to disk. Since no annotations are provided, the description carries the full burden, and it does so thoroughly. It could add a bit more about failure modes (e.g., what happens if the preview service isn't running), but the disclosed behaviors are rich and useful.

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 a single dense paragraph that front-loads the core purpose (open canvas, return URL) and then provides necessary behavioral details. It is long but every sentence adds useful information about how the canvas behaves and when to use it. The structure could be improved with separation of concerns (purpose vs. behavior vs. usage), but it is not bloated or repetitive.

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 tool with 2 parameters, no output schema, and no annotations, the description covers the essential context: what it does, how the returned URL should be used, how the canvas behaves, and how it stays in sync with project changes. It does not describe the exact response format (e.g., JSON shape of the returned URL), but since there is no output schema, a bit more detail on the return value could help. However, the description is largely complete for an agent to invoke it correctly.

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 description coverage is 100%, so the schema already documents both parameters (dir and projectId). The description adds context about dir's default resolution (PROTOFLOW_HOME or cwd) and projectId being the folder name, but this is largely restating the schema. The description does not add much beyond the schema, so baseline 3 is appropriate.

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 the tool's purpose: open the whole-site canvas and return its http://127.0.0.1 URL. It specifies the resource (整站画布), the action (打开/返回 URL), and distinguishes it from browser tools that cannot open file:// URLs. The description also explains what the canvas contains (all pages and artboards in a self-contained document) and how it behaves, making it distinct from sibling tools like render_preview or export_canvas.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool: when you need the whole-site canvas, and it warns against using browser tools with file:// paths. It also explains that the canvas is a live projection of the project's source/annotations/structure, so after changes you just refresh the opened tab rather than re-calling the tool. This gives clear usage context and implicitly distinguishes it from render_preview (which likely renders a single preview) and export_canvas (which exports rather than opens an interactive canvas).

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