$npx -y skills add figma/mcp-server-guide --skill figma-create-new-fileMANDATORY prerequisite — you MUST invoke this skill BEFORE every create_new_file tool call. NEVER call create_new_file directly without loading this skill first. Trigger whenever the user wants a new blank Figma file — a new design, FigJam, or Slides file — or when you ne
| 1 | # create_new_file — Create a New Figma File |
| 2 | |
| 3 | **MANDATORY: load this skill before every `create_new_file` tool call.** It encodes the plan-resolution decision tree, the editor-type contract, and the post-creation handoff to `use_figma`. |
| 4 | |
| 5 | Use the `create_new_file` MCP tool to create a new blank Figma file in the user's drafts folder. This is typically used before `use_figma` when you need a fresh file to work with. |
| 6 | |
| 7 | ## Skill Arguments |
| 8 | |
| 9 | This skill accepts optional arguments: `/figma-create-new-file [editorType] [fileName]` |
| 10 | |
| 11 | - **editorType**: `design` (default), `figjam`, or `slides` |
| 12 | - **fileName**: Name for the new file (defaults to "Untitled") |
| 13 | |
| 14 | Examples: |
| 15 | - `/figma-create-new-file` — creates a design file named "Untitled" |
| 16 | - `/figma-create-new-file figjam My Whiteboard` — creates a FigJam file named "My Whiteboard" |
| 17 | - `/figma-create-new-file design My New Design` — creates a design file named "My New Design" |
| 18 | - `/figma-create-new-file slides Q3 Review` — creates a Slides presentation named "Q3 Review" |
| 19 | |
| 20 | Parse the arguments from the skill invocation. If editorType is not provided, default to `"design"`. If fileName is not provided, default to `"Untitled"`. |
| 21 | |
| 22 | ## Workflow |
| 23 | |
| 24 | ### Step 1: Resolve the planKey |
| 25 | |
| 26 | The `create_new_file` tool requires a `planKey` parameter. Follow this decision tree: |
| 27 | |
| 28 | 1. **User already provided a planKey** (e.g. from a previous `whoami` call or in their prompt) → use it directly, skip to Step 2. |
| 29 | |
| 30 | 2. **No planKey available** → call the `whoami` tool. The response contains a `plans` array. Each plan has a `key`, `name`, `seat`, and `tier`. |
| 31 | |
| 32 | - **Single plan**: use its `key` field automatically. |
| 33 | - **Multiple plans**: ask the user which team or organization they want to create the file in, then use the corresponding plan's `key`. |
| 34 | |
| 35 | ### Step 2: Call create_new_file |
| 36 | |
| 37 | Call the `create_new_file` tool with: |
| 38 | |
| 39 | | Parameter | Required | Description | |
| 40 | |-------------|----------|-------------| |
| 41 | | `planKey` | Yes | The plan key from Step 1 | |
| 42 | | `fileName` | Yes | Name for the new file | |
| 43 | | `editorType`| Yes | `"design"`, `"figjam"`, or `"slides"` | |
| 44 | |
| 45 | Example: |
| 46 | ```json |
| 47 | { |
| 48 | "planKey": "team:123456", |
| 49 | "fileName": "My New Design", |
| 50 | "editorType": "design" |
| 51 | } |
| 52 | ``` |
| 53 | |
| 54 | ### Step 3: Use the result |
| 55 | |
| 56 | The tool returns: |
| 57 | - `file_key` — the key of the newly created file |
| 58 | - `file_url` — a direct URL to open the file in Figma |
| 59 | |
| 60 | Use the `file_key` for subsequent tool calls like `use_figma`. |
| 61 | |
| 62 | ## Important Notes |
| 63 | |
| 64 | - The file is created in the user's **drafts folder** for the selected plan. |
| 65 | - Supported editor types are `"design"`, `"figjam"`, and `"slides"`. |
| 66 | - If `use_figma` is your next step, load the `figma-use` skill before calling it. |
| 67 | |
| 68 | ## Editor-specific notes |
| 69 | |
| 70 | ### Slides — newly created files have an empty grid |
| 71 | |
| 72 | A `slides` file produced by this tool starts with **zero rows and zero slides** — `figma.getSlideGrid()` returns `[]`, not a default first slide. The page's only child is the `SLIDE_GRID` node itself, which is empty until you create content. The first call to `figma.createSlide()` implicitly creates row 0 and inserts the new slide there. |
| 73 | |
| 74 | If your follow-up `use_figma` script assumes at least one slide exists (e.g. to read theme tokens off it), guard for the empty case or call `createSlide()` first. See [figma-use-slides → slide-grid](../figma-use-slides/references/slide-grid.md) for full details. |