Skip to main content
Glama
vvmahesh0

paper-cdp-mcp

by vvmahesh0

write_html

Insert or replace HTML nodes in Paper design files to create UI components incrementally. Supports inline styles and real-time visual feedback for autonomous design workflows.

Instructions

IMPORTANT: Write incrementally. The user sees you write on the canvas in real-time. Show them visual progress every few seconds. Each write_html call should create one visual item: a header, a single list row, a button bar, or a paragraph block. Even simple components should be incremental: a card = container/header, then each row, then the footer. IMPORTANT: Prefer cloning instead of remaking existing Paper nodes using <x-paper-clone node-id="A-01" style="..." />. For repeated elements: create the container first, then add each item as a separate write_html call into the container or use the duplicate tool on the first child.

HTML and CSS rules:

  • Always use inline styles (style="..")

  • Enforce consistency with design tokens as CSS variables if available

  • All Google Fonts and locally installed fonts are available in font-family

  • All CSS color formats are supported: hex, rgb(a), hsl(a), oklch, oklab etc

  • Use flex as the primary layout mode. Flexbox, padding, and gap are the core layout tools in Paper's interface

  • Absolute position is fully supported. Use it for decorative elements. Avoid covering the entire artboard with a single absolute element, it blocks cursor interaction underneath

  • Do NOT use: margin, display: inline, display: grid, HTML tables. Use padding and gap for spacing

  • display: block is acceptable for simple elements (text, decorative shapes) but not for layout containers

  • Assume border-box sizing everywhere

  • Use or white-space: pre for code blocks or indented text

  • Do NOT use emojis as icons. Use SVG icons or images

  • Rich text isn't supported in Paper; code snippets should be a single element with one text color and pre whitespace

  • Use the layer-name attribute to set names on elements in the Paper layer tree, e.g.

  • Local images MUST use absolute paths in an img starting with paper-asset:// e.g.

  • paper-gen:// URLs generate AI images. ONLY if the user asked; read the "image-generation" guide first

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
htmlYesHTML string to parse into design nodes. Supports standard HTML elements with inline CSS styles.
modeYes"insert-children" adds the HTML as children of the target node. "replace" removes the target node and puts the parsed HTML in its place.
fileIdNoOptional. The Paper file ID this call should act on. Pass it to reliably target a specific file when several are open at once (e.g. multiple agents from the same session working in parallel). Omit to use the most recently opened file in the session.
targetNodeIdYesThe ID of the target node. In "insert-children" mode, new nodes are added as children of this node. In "replace" mode, this node is removed and replaced by the parsed HTML.
Install Server

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and delivers extensively. It discloses real-time visual feedback, the one-item-per-call behavior, interaction constraints (e.g., avoid full-artboard absolute elements), unsupported features, and asset URL conventions. This richly compensates for missing annotations.

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 long but organized into clear sections with imperative rules, which is justified given the tool's complexity. It front-loads the most critical behavioral instructions with IMPORTANT. Some repetition occurs around incremental creation, but each rule earns its place because violations materially affect output quality.

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

Completeness5/5

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

For a complex, high-guidance tool with no annotations and no output schema, the description is exceptionally complete. It covers layout rules, styling constraints, fonts, colors, asset handling, layer naming, code blocks, and AI image generation caveats. An agent has enough context to call this tool correctly in a wide range of design scenarios.

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 100%, so the baseline is 3. The description adds substantial meaning to the html parameter by specifying valid HTML/CSS patterns, disallowed properties, and required inline-style conventions. It also clarifies expected output granularity, which helps agents form correct calls even though it does not add new detail to fileId, targetNodeId, or mode.

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 function: each write_html call creates one visual item (header, list row, button bar, paragraph block) on the canvas. It also specifies the intended granularity, distinguishing it from broader or bulk operations like batch_write_artboards. The purpose is concrete and actionable.

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 provides explicit usage instructions: write incrementally, create one visual item per call, prefer cloning over recreating nodes, and use the duplicate tool for repeated elements. It also explains how to structure repeated elements (container first, then children). This is strong, operational guidance beyond a simple when-to-use statement.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vvmahesh0/paper-cdp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server