Skip to main content
Glama

upsert_artboard

Create a new artboard on a page or update an existing one by id, including name, description, and canvas width. Returns the artboard id.

Instructions

无 id 在页面下创建画板,有 id 更新名称/描述。可选 canvasWidth(画布中该画板的真实像素宽度,即 Figma 式 Frame 宽度,默认 1440;移动端画板可传 375/414 等)。返回画板 id。画布实时投影项目结构——刷新已打开的画布标签即可看到新/改名画板,无需重新调用 render_canvas

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/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 behavioral burden. It discloses upsert semantics, the returned artboard id, canvasWidth default and semantics, and the live canvas projection behavior. It omits edge cases such as behavior with a non-existent id or prerequisite project/page existence, but is otherwise substantive.

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?

Three front-loaded sentences with zero filler: behavior first, key parameter parenthetical second, then return value and rendering note. Each sentence earns its place and no word is wasted.

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 7-parameter upsert with no annotations and no output schema, the description is largely complete: it covers create/update, return value, and post-call rendering. It lacks failure-mode and precondition details, but these are not essential for basic correct invocation.

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?

Schema coverage is only 29%, but the description compensates by explaining the id create/update behavior, name/description as update fields, and canvasWidth in detail (default 1440, mobile values). PageId is implicitly clarified as the parent page from the opening sentence, and dir/projectId are already documented in the schema.

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 opens with a precise behavioral statement: no id creates an artboard under a page, while an id updates name/description. This clearly identifies the resource (artboard), the action (upsert), and differentiates it from sibling tools like upsert_page (page-level) and render_canvas (rendering).

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 implicitly defines when to use the tool (create/update artboards) and explicitly tells the agent not to call render_canvas afterward because the canvas updates in real time. However, it does not explicitly compare against page-level or other artboard manipulation alternatives.

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