Patch Penpot MCP: add create_file(project_id, name) #73
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#73
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User story
As the designer agent, I want a
create_fileMCP tool so that Ican bootstrap a fresh Penpot file from scratch instead of requiring
the operator to pre-seed one in the Penpot UI.
Carved out of #69 as a follow-up; PR #71 lands every other canvas
primitive but explicitly defers this because Penpot's
create-fileRPC has a richer param surface than the other writes (data migrations
list, feature flags) that needs a dedicated pass to get right.
Current state
create_page,create_frame,create_text—these all require a
file_idto exist already.UUID into the issue body / skill prompt.
design-implement.mdskill's "find-or-create the Penpot file"rule cannot be satisfied without this tool; designer always takes
the "reuse existing" branch.
Acceptance criteria
MCP — new tool
create_file(project_id, name, features?)inpenpot-mcp-server/src/penpot_mcp/tools/canvas.py—wraps the
create-fileRPC. Returns{file_id, name, revn}.featuresdefaults to Penpot's current baseline feature set:["components/v2", "layout/grid", "styles/v2", "design-tokens/v1", "fdata/path-data", "fdata/objects-map", "fdata/shape-data-type", "variants/v1", "plugins/runtime"].Pulled from
get-fileresponse of an existing well-formedfile (the
claude-hooks — dashboardfile'sfeaturesfieldis the reference).
api.commandand asserts the emitted RPCpayload shape (camelCase
projectId,name,features).pytest -m live): create a temp file in theexisting
Draftsproject, assertget_file_inforoundtripsthe name, delete via
delete-fileRPC infinally.Documentation
penpot-mcp-server/README.md: addcreate_fileto the canvastools table.
CHANGELOG.md: bump to 0.6.0.Out of scope
datafield Penpot emits whencreating a file includes a
migrationsarray of applied schemamigration ids. This is internal Penpot housekeeping —
create-filefills it with sensible defaults server-side; we don't pass it.
a template via a different RPC (
duplicate-filewith a templatesource). Separate tool, separate issue.
rename-file/move-filesare different RPCs.References
https://design.jacquin.app/api/rpc/command/create-file—probe response schema before coding.
curl … /api/rpc/command/get-file -d '{"id":"689d7fa4-…"}'andcopy the
featuresarray.Dependencies
it's ready to merge.
only "reuse existing" works).
mainafter #71 lands.create_file(project_id, name, features?)(#73) #89create_file(project_id, name, features?)(#73) #89