Tools and prompts
The Figma MCP server provides the following tools:
add_code_connect_map: Adds a mapping between a Figma node ID and its corresponding code component in your codebasecreate_new_file(remote only): Creates a new blank Figma Design, FigJam, or Figma Slides file in the authenticated user's draftsdownload_assets(remote only): Downloads rendered exports and original source images from a Figma filegenerate_diagram(remote only): Generates a FigJam diagram from Mermaid syntaxgenerate_figma_design(specific clients only, remote only): Generates design layers from interfacesget_code_connect_map: Retrieves a mapping between Figma node IDs and their corresponding code components in your codebaseget_code_connect_suggestions: A Figma-prompted tool call to find suggestions for mapping Figma node IDs to their corresponding code components in your codebase using Code Connectget_context_for_code_connect(remote only): A Figma-prompted tool call to get context for generating Code Connect templatesget_design_context: Get the design context for a layer or selectionget_figjam: Converts FigJam diagrams (such as app architecture workflows) to XMLget_libraries(remote only): Returns the libraries currently added to the file (subscribed) and libraries available to add (community UI kits and org libraries)get_metadata: Returns a sparse XML representation of your selection that contains basic properties such as layer IDs, names, types, position and sizesget_screenshot: Allows the agent to take a screenshot of your selectionget_shader_effect: Retrieves a shader effect and its source filesget_shader_fill: Retrieves a shader fill and its source filesget_variable_defs: Returns the variables and styles used in your Figma selectionlist_shader_effects: Lists shader effects in your authenticated account librarylist_shader_fills: Lists shader fills in your authenticated account librarysearch_design_system(remote only): Searches design libraries for components, variables, and styles matching a text querysend_code_connect_mappings: A Figma-prompted tool used after callingget_code_connect_suggestionsto confirm the suggested Code Connect mappingsupload_assets(remote only): Uploads supported assets (PNG, JPG, GIF, and WebP) to a Figma fileuse_figma(remote only): The general-purpose tool for creating, editing, or inspecting any object in a Figma filewhoami(remote only): Returns the identity of the user that's authenticated to Figma
add_code_connect_map
Supported file types: Figma Design
Adds a mapping between a Figma node ID and its corresponding code component in your codebase. Setting up these mappings will improve the output quality of design-to-code worksflows and help you identify and use the exact component in your project.
create_new_file (remote only)
Supported file types: No file context required
Creates a new blank Figma Design, FigJam, or Figma Slides file in your drafts folder. If you belong to multiple plans, you'll be asked which team or organization to create the file in.
You can ask it to:
- Create a new design file
create a new Figma file called "Homepage Redesign"
- Create a new FigJam file
create a new FigJam board for our project planning session
- Create a new Figma Slides file
create a new Figma Slides deck for our Q3 review
download_assets (remote only)
Supported file types: Figma Design, FigJam, Figma Slides
Downloads assets from a Figma file. Returns temporary URLs that must be fetched to retrieve file contents.
Each call returns two types of output for the given node(s) — you get both, not one or the other:
- Export render: The node rendered as an image. If the node has export settings configured in Figma, those are used; otherwise it falls back to the defaultFormat and defaultScale parameters (0.01–4x). Without export settings at scale 1, renders are capped at ~4096px on the longest edge. Supports PNG, JPG, SVG, and PDF.
- Raw source images: The original uploaded files (JPEG, PNG, GIF, or WebP) placed as fills anywhere in the node's subtree, returned without re-rendering. Capped at 20 per call (rawImagesTruncated: true when there are more. Try passing a more specific child node). Useful for cross-file transfer with
upload_assets.
Up to 20 nodes can be passed per call.
When to use download_assets vs get_screenshot
Use get_screenshot when the agent needs to see what a design looks like. Use download_assets when the agent needs to deliver an asset to the user, export in a specific format, or transfer images between files.
| get_screenshot | download_assets | |
|---|---|---|
| Use when | You need to visually inspect a design | You need to save, deliver, or transfer an asset |
| Output | PNG, inline base64 or URL | URLs only (PNG, JPG, SVG, PDF, or original source) |
| Nodes | Single | Up to 20 |
| Format control | Always PNG | PNG, JPG, SVG, PDF (export); original format (raw) |
| Original source files | No — always re-renders | Yes — raw mode returns the exact uploaded binary |
| Inline base64 | Yes, via enableBase64Response | No |
Suggested prompts
- Export assets in a specific format
- export these icons from my Figma file as SVGs
- download the hero image from this frame as a JPG
- export this component as a PDF
- Extract original source images
- grab the original photos from this mockup
- extract the source images from this frame so I can transfer them to another file
- Cross-file image transfer
- copy the images from this file into my other Figma file (agent uses download_assets raw mode, then upload_assets)
generate_diagram (remote only)
Note: We're quickly improving how Figma supports AI agents. This will eventually be a usage-based paid feature, but is currently available for free during the beta period.
Supported file types: No file context required
Generates a FigJam diagram from Mermaid syntax or natural language descriptions. The generate_diagram tool converts structured or inferred diagram definitions into interactive FigJam diagrams that can be edited and shared.
You do not have to provide Mermaid syntax yourself. You can describe the diagram you want in natural language, and the agent will generate the appropriate Mermaid syntax and call the generate_diagram tool automatically.
Diagrams can be created in a new FigJam file or added to an existing FigJam file.
To ensure that the agent uses the Figma MCP generate_diagram tool, you can include the directive "Use the Figma MCP generate_diagram tool" in your prompt. In most cases, the agent will invoke the tool automatically when a diagram is needed.
Supported diagram types:
- Flowchart
- Gantt chart
- State diagram
- Sequence diagram
- Architecture diagram
- Entity Relationship Diagram (ERD)
Suggested prompts:
- Generate a diagram from a description
create a flowchart for the user authentication flow using the Figma MCP generate_diagram toolgenerate a gantt chart for the project timeline using the Figma MCP generate_diagram toolgenerate a sequence diagram for the payment processing system using the Figma MCP generate_diagram toolgenerate an ERD for a blog database with users, posts, and comments using the Figma MCP generate_diagram toolgenerate an architecture diagram for a real-time chat system using the Figma MCP generate_diagram tool
- Convert existing Mermaid syntax
create a diagram from this mermaid syntax: ...