Skip to main content

Documentation index: fetch the complete documentation index at /docs/llms.txt. Use this file to discover all available pages before exploring further.

MCP Server

MCP Tools Reference

Input schema, output shape, and examples for all 22 Flowstep MCP tools.

On success, every tool except get-screen-image returns its result twice: as structuredContent (validated against the tool’s published output schema) and as the same object serialized into a text block, { type: "text", text: "<json-string>" }, for clients that don’t read structured content. get-screen-image returns only an MCP image block: { type: "image", data: "<base64>", mimeType: "image/png" }.

On failure, isError: true is set and the text block contains a short error message. Errors you can act on — a name mismatch on delete, an invalid Figma link, an attachment problem, or a generation timeout — explain what to fix. Other failures return a generic message such as Failed to list files.

Pricing: the three AI design tools — ai-design-screens, ai-generate-screen-variant, and ai-edit-screen-variant — draw on the same message allowance as the Flowstep app. All other tools are free. See Usage limits.

Each tool also publishes MCP annotations so your client knows what it does. delete-file, delete-screen, delete-file-instructions, replace-screen-jsx, ai-design-screens, and ai-edit-screen-variant are marked destructive because they remove or overwrite existing content.


File tools

list-files

List metadata for your Flowstep files. Call this first to check whether a relevant file already exists. It returns no screen content — use get-screen-image or get-screen-jsx for that.

Input

ParameterTypeDefaultDescription
orderByCreationbooleantrueSort newest first by created_at (true) or by updated_at (false). Use false to find recently edited files
limitinteger (1–100)20Maximum files returned. A full page may mean more files exist
offsetinteger (≥0)0Files to skip. The next page is offset + limit

Output — { files }.

{
  "files": [
    {
      "id": "5c2170f0-5b09-4a5a-ba7a-4d5c2cfb07e0",
      "name": "Dashboard redesign",
      "created_at": "2026-04-30T15:02:13.120152+00:00",
      "updated_at": "2026-04-30T15:02:13.120152+00:00",
      "organisation_id": "0b7f3c9e-2d4a-4f1b-9a5e-6c8d7e1f2a3b",
      "shared_with_me": false,
      "owner": true,
      "url": "https://app.flowstep.ai/file?activeFileId=5c2170f0-5b09-4a5a-ba7a-4d5c2cfb07e0"
    }
  ]
}
  • owner — true if you created the file.
  • shared_with_me — true if the file was shared with you directly, not only through your organization.
  • url — opens the file in the Flowstep editor.

get-file

Get metadata for a single file. File content is intentionally omitted — use get-screen-image or get-screen-jsx to inspect screens, and get-file-instructions to retrieve the file’s instructions. If you have a pending invite to the file, calling get-file accepts it.

Input

ParameterTypeDescription
iduuidFile ID

Output — { file, user_access_level }.

{
  "file": {
    "id": "5c2170f0-5b09-4a5a-ba7a-4d5c2cfb07e0",
    "name": "Dashboard redesign",
    "created_at": "2026-04-30T15:02:13.120152+00:00",
    "updated_at": "2026-04-30T15:02:13.120152+00:00",
    "project_id": "81cb84d6-c69f-492c-a895-7421b60d1a6d",
    "access_level": "private",
    "visibility": "private",
    "owner": true,
    "url": "https://app.flowstep.ai/file?activeFileId=5c2170f0-5b09-4a5a-ba7a-4d5c2cfb07e0"
  },
  "user_access_level": "write"
}
  • access_level — private, read, or write.
  • visibility — private, member, or public.
  • user_access_level — your access to the file: read or write.

create-file

Create a blank Flowstep file with no screens. To create a file and generate screens in one step, call ai-design-screens without a fileId instead. Use create-file for code-first workflows, followed by add-screen-jsx.

Input

ParameterTypeDescription
namestring (min 1)Display name of the new file

Output — { file, user_access_level }, in the same shape as get-file. owner is always true and user_access_level is always write.

Use the returned file.id as fileId in subsequent tool calls.


update-file

Rename a file.

Input

ParameterTypeDescription
iduuidFile ID
namestring (min 1)New display name

Output — { file, user_access_level }, in the same shape as get-file.


delete-file

Permanently delete a file. The name you pass is checked against the file’s current display name before deletion — if it doesn’t match, the deletion is aborted. This prevents accidentally deleting the wrong file. Agents are instructed to confirm with you first.

Input

ParameterTypeDescription
iduuidFile ID
namestringCurrent display name of the file — must match or deletion is aborted

Output — { "deleted": true }

This is irreversible. All screens in the file are deleted.


Screen tools

list-screens

List the screens in a file, in canvas order. Call this after list-files to see what’s already in a file. Use the returned screenId values with the other screen tools and the AI design tools.

Input

ParameterTypeDescription
fileIduuidFile ID

Output — { screens }.

{
  "screens": [
    {
      "screenId": "3f9e6eb6-5525-4383-9375-67e0bd762dbe",
      "name": "Mobile login screen",
      "prompt": "Generate a simple mobile login screen with email and password fields and a sign in button",
      "fidelity": "ui"
    }
  ]
}
  • prompt — the last generation prompt for the screen, or an empty string if it was never generated (for example, a screen added with add-screen-jsx).
  • fidelity — lofi, hifi, or ui.

get-screen-image

Render a screen to PNG and return it as an inline image. Requires a client that supports image content blocks. Call it once for each screenId returned by an AI design tool, add-screen-jsx, replace-screen-jsx, or import-figma.

Input

ParameterTypeDescription
fileIduuidFile ID
screenIduuidA screenId from list-screens or from the screenIds array returned by a design tool

Output — MCP image content block (image/png). data is standard base64 of the PNG bytes, not a data URI. There’s no structuredContent for this tool.


get-screen-jsx

Get a screen as JSX, plus its metadata — so you can build from it in your codebase, or edit it and write it back with replace-screen-jsx. Use get-screen-image for a visual preview instead.

Input

ParameterTypeDefaultDescription
fileIduuid—File ID
screenIduuid—A screenId from list-screens or from the screenIds array returned by a design tool
includeIdsbooleanfalseInclude a data-id attribute on elements in jsx. Use it when you need element ids to pass as elementIds to ai-design-screens, either to edit in place or as visual reference

Output — { fileId, screenId, name, prompt, fidelity, screenType, colorTheme, jsx, fragments }.

{
  "fileId": "5c2170f0-5b09-4a5a-ba7a-4d5c2cfb07e0",
  "screenId": "c13d3707-0efe-49f5-b6cb-0ca5ac5223d0",
  "name": "World clock",
  "prompt": "A world clock screen with a city search and alert button",
  "fidelity": "ui",
  "screenType": "iphone-x-vertical",
  "colorTheme": "blue",
  "jsx": "<div className=\"bg-white text-zinc-950 w-full h-fit\">\n  <div className=\"flex p-6 flex-col gap-6\">\n    …\n  </div>\n</div>",
  "fragments": []
}
  • jsx — markup only. data-id attributes are included only when includeIds is true.
  • prompt — the last generation prompt, or an empty string if the screen was never generated.
  • fragments — shared chrome stored on the screen, such as a nav bar, header, or logo, as { purpose, markup } objects. Empty when there are none. Pass them back to replace-screen-jsx to keep or update them.

See Screen field values for the fidelity, screenType, and colorTheme values.


add-screen-jsx

Add a new screen to a file from JSX you’ve written. This is the code-first path and is free — use ai-design-screens when you want Flowstep’s AI to design the screen. add-screen-jsx always creates a new screen: to overwrite an existing one, use replace-screen-jsx.

To show an image you’ve uploaded, see Images in JSX.

When the new screen is based on an existing one, start from get-screen-jsx (without includeIds) for name, fidelity, screenType, colorTheme, and jsx, then change whatever should differ.

Input

ParameterTypeDefaultDescription
fileIduuid—File ID
namestring (1–100 chars)—Optional display name. Omit it to auto-name the screen Screen N
fidelitystring"ui"Screen fidelity
screenTypestring—Required — the device or viewport the screen is designed for
colorThemestring"default"Color theme
jsxstring—JSX markup only. Any data-id attributes are ignored — the new screen gets new element ids

Output — { fileId, screenId }. Call get-screen-image with screenId to view the result.

{
  "fileId": "5c2170f0-5b09-4a5a-ba7a-4d5c2cfb07e0",
  "screenId": "3f9e6eb6-5525-4383-9375-67e0bd762dbf"
}

replace-screen-jsx

Overwrite an existing screen with JSX you’ve written. The screen keeps its screenId and its position on the canvas; nested elements get new ids. This is the code-first path and is free — use ai-design-screens or ai-edit-screen-variant for AI changes, and add-screen-jsx to create a new screen instead.

Start from get-screen-jsx (without includeIds), then change whatever should differ. To show an image you’ve uploaded, see Images in JSX.

Input

ParameterTypeDescription
fileIduuidFile ID
screenIduuidThe screen to overwrite
jsxstringJSX markup only. Any data-id attributes are ignored
namestring (1–100 chars)Optional. Omit to keep the current name
fidelitystringOptional. Omit to keep the current fidelity
screenTypestringOptional. Omit to keep the current screen type
colorThemestringOptional. Omit to keep the current color theme
fragments{ purpose, markup }[]Optional shared chrome from get-screen-jsx. Omit to keep the current fragments, or pass [] to clear them

Output — { fileId, screenId }. Call get-screen-image with screenId to view the result.

This replaces the screen’s content in place.


rename-screen

Rename a screen’s canvas label — the name shown by list-screens and in the editor. This changes the label only, not the screen’s layout, size, or content — use ai-design-screens for those.

Input

ParameterTypeDescription
fileIduuidFile ID
screenIduuidThe screenId returned by list-screens
namestring (1–100 chars)New screen name. Leading and trailing whitespace is trimmed

Output — { screenId, name }.

{ "screenId": "3f9e6eb6-5525-4383-9375-67e0bd762dbe", "name": "Checkout — empty cart" }

delete-screen

Permanently delete a screen from a file. The name you pass is checked against the screen’s current display name — if it doesn’t match, the deletion is aborted. Agents are instructed to confirm with you first.

Input

ParameterTypeDescription
fileIduuidFile ID
screenIduuidThe screen to delete
namestringCurrent display name of the screen — must match or deletion is aborted

Output — { "deleted": true }


Images in JSX

add-screen-jsx and replace-screen-jsx accept images in an img src, or as a background in className with bg-[url(...)]. Write alt text, and size each image for its purpose.

To place an image of your own:

  1. Upload it with upload-attachment in Mode A (mimeType + fileName) and run the returned uploadCommand.
  2. If the response’s type is "image", paste its assetUrl exactly as returned into img src or bg-[url(assetUrl)].

Leave every other image URL exactly as get-screen-jsx returned it. Don’t put path, signedUrl, or uploadCommand in src.

<img src="ASSET_URL" alt="Team photo" className="w-full h-48 object-cover rounded-lg" />

Screen field values

get-screen-jsx returns, and add-screen-jsx and replace-screen-jsx accept, these values:

FieldValues
fidelitylofi, hifi, ui
screenTypeweb, desktop, desktop-large, desktop-medium, desktop-small, tablet, ipad-tablet-horizontal, ipad-tablet-vertical, android-tablet-horizontal, android-tablet-vertical, mobile_ios, mobile_android, iphone-vertical, iphone-horizontal, iphone-x-vertical, iphone-x-horizontal, android-vertical, android-horizontal, android-small-vertical, android-small-horizontal
colorThemedefault, defaultDark, blue, blueDark, ice, iceDark, grayscale, grayscaleDark, green, greenDark, orange, orangeDark, red, redDark, rose, roseDark, violet, violetDark, yellow, yellowDark

File instructions tools

File instructions are plain markdown stored on a file. When set, they’re sent as context with every AI generation and edit for that file. See File instructions.

get-file-instructions

Get the file instructions attached to a file.

Input

ParameterTypeDescription
fileIduuidFile ID

Output — { instructions }.

{
  "instructions": "Prices are always in euros.\nNavigation sits in a left sidebar, never a top bar."
}

instructions is null if none have been set.


update-file-instructions

Set or replace the file instructions for a file. Pass the instructions as a plain markdown string — not an object or JSON. If you’re reading from a file, pass that file’s text. Colors, rounding, and fonts come from the file’s theme; instructions that name them are applied through the theme’s tokens.

Input

ParameterTypeDescription
fileIduuidFile ID
instructionsstring (1–50,000 chars)Raw markdown text. Must be a plain string — not JSON-encoded

Output — { "updated": true }


delete-file-instructions

Clear the file instructions for a file. Deleting instructions that don’t exist is a no-op.

Input

ParameterTypeDescription
fileIduuidFile ID

Output — { "deleted": true }


Chat tools

get-chat-history

Get the design conversation associated with a file — the file’s Flowstep chat, not your MCP client’s conversation. Use it to resume earlier work on the file.

Input

ParameterTypeDescription
fileIduuidFile ID

Output — { messages }. messages is empty when you have no design conversation on the file. Each message has a type ("request" or "response"), an author ("human" or "ai"), and a content_type. Response messages use "text", "summary", or "followup".

{
  "messages": [
    {
      "id": "453f593d-2380-425b-ba29-127db08d6a8e",
      "type": "request",
      "status": "success",
      "content": "Generate a simple mobile login screen with email and password fields",
      "author": "human",
      "content_type": "text",
      "sequence": 1,
      "targets": [],
      "attachments": []
    },
    {
      "id": "d860186b-82d5-4bd1-8e8e-8ba5377a14bf",
      "type": "response",
      "status": "success",
      "content": "Generated a mobile login screen with email and password input fields, a sign in button, and a sign up link.",
      "author": "ai",
      "content_type": "summary",
      "sequence": 7,
      "request_message_id": "453f593d-2380-425b-ba29-127db08d6a8e",
      "targets": [{ "target_id": "3f9e6eb6-5525-4383-9375-67e0bd762dbe" }]
    }
  ]
}

Attachment tools

upload-attachment

Upload a reference file to use as an attachment in ai-design-screens, or an image to place in your own JSX with add-screen-jsx or replace-screen-jsx. ai-generate-screen-variant and ai-edit-screen-variant don’t take attachments. File bytes never pass through the model, and the server never fetches URLs on your behalf. To reference a webpage, include its URL in the message of ai-design-screens instead.

There are two modes — use exactly one, and don’t combine them.

Mode A — files and images (mimeType + fileName)

A required three-step flow for any image, PDF, or larger text file:

  1. Call upload-attachment with mimeType and fileName only (for example image/png and dog.png). The response is a prepared upload, not a stored file:

    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "path": "attachments/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "assetUrl": "https://…",
      "type": "image",
      "mimeType": "image/png",
      "signedUrl": "https://…",
      "uploadCommand": "curl -sS -f -X PUT '…' -H 'Content-Type: image/png' -H 'x-metadata: …' --data-binary @LOCAL_FILE_PATH",
      "nextStep": "…"
    }
  2. Replace LOCAL_FILE_PATH in uploadCommand with the absolute path to your file and run that exact command in your shell — it must exit 0. The token in signedUrl authorizes only this single upload. Skipping this step leaves storage empty and the design tool fails its preflight check.

  3. Pass only { id, path, type } into the attachments array of ai-design-screens — not signedUrl, uploadCommand, or nextStep. To place an image in your own JSX instead, put assetUrl in the img src or bg-[url(...)] of the JSX you pass to add-screen-jsx or replace-screen-jsx. See Images in JSX.

To attach a remote file, download it to a local path yourself first (for example with curl), then follow the same three steps. Never pass a URL to upload-attachment.

ParameterTypeDescription
mimeTypeenumFile MIME type. One of image/jpeg, image/png, image/webp, image/gif, application/pdf, text/markdown, text/plain, text/javascript. Use text/javascript for .jsx, .tsx, .js, .ts files
fileNamestring (min 1)Original filename with extension, for example cat.png or design.md

Mode B — short text (text + mimeType)

Upload text that’s already in context — no shell command needed. The response is ready to use directly:

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "path": "attachments/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "assetUrl": "https://…",
  "type": "document",
  "mimeType": "text/plain"
}
ParameterTypeDescription
textstring (max 64,000 chars)Raw text content. Text files only — don’t use for images or PDFs. Longer than 64,000 characters? Use Mode A instead
mimeTypeenumOne of text/markdown, text/plain, text/javascript

Pass the resulting { id, path, type } into the attachments array of ai-design-screens.

Images can be up to 20 MB; documents (PDF, text, and code files) up to 3 MB. PDFs are capped at 100 pages. A file over its limit fails the upload with HTTP 413 and isn’t stored.

Output — { id, path, assetUrl, type, mimeType, signedUrl?, uploadCommand?, nextStep? }.

  • type — "image" for image files and "document" for PDFs and text files.
  • assetUrl — the uploaded file’s URL, returned in both modes. Use it in JSX for add-screen-jsx or replace-screen-jsx only when type is "image", and only after the Mode A uploadCommand has run.
  • signedUrl, uploadCommand, nextStep — set only in Mode A. Don’t pass them into design tools.

Figma tools

import-figma

Import a Figma frame into a Flowstep file as editable elements on its canvas. Each import adds a new screen — importing the same frame twice gives you two screens, so delete the old one with delete-screen if you meant to replace it. The file’s organization must have Figma connected in Flowstep settings.

Input

ParameterTypeDescription
fileIduuidThe Flowstep file to import the frame into. This is not the Figma file key in figmaUrl
figmaUrlstringLink to a specific Figma frame, with a node-id. In Figma, right-click the frame and choose Copy/Paste as → Copy link to selection. A link to a page imports all top-level frames on that page (capped at 20 frames over MCP)

Output — { fileId, screenId, frameCount? }. screenId is the imported screen — pass it to get-screen-image to view the result. When a page URL imports multiple frames, screenId is null and frameCount is returned instead; call list-screens, then get-screen-image for each new screen.

{
  "fileId": "5c2170f0-5b09-4a5a-ba7a-4d5c2cfb07e0",
  "screenId": "3f9e6eb6-5525-4383-9375-67e0bd762dbe"
}

Plan and billing tools

get-plan-details

Get your organization’s Flowstep plan, subscription status, usage, and remaining quota. Takes no input — the organization is resolved from the signed-in user. Use it to check your allowance before calling the AI design tools.

Output — { plan, subscription, limits, usage, remaining }.

FieldDescription
plan{ name, code, type }. type is "free" or "paid"
subscription{ isPaid, isTrial, startDate, endDate, trialDaysRemaining }
limitsPer-feature limits, keyed by feature (for example messages). Each has optional daily and monthly objects with max and warn values, plus an unlimited flag
usagePer-feature usage so far, as { daily, monthly }
remainingPer-feature quota left, as { daily, monthly }. Omitted for unlimited features

Limits vary by plan — see Pricing and Usage limits.


AI design tools

These three tools design from a description or a preset — they never take or reuse JSX. Each call draws on the same message allowance as the Flowstep app, and blocks until generation completes or times out (180 seconds).

ToolUse it to
ai-design-screensGenerate new screens, change existing screens in place, or both, from a free-form description
ai-generate-screen-variantAdd a next-step, error or empty state, or platform variant of one existing screen
ai-edit-screen-variantApply an edit or redesign preset to one whole existing screen

All three return { status, fileId, screenIds }. Call get-screen-image once for each screenId to see the result.


ai-design-screens

Generate one or more new screens, change existing screens in place, or both in one call, from a text description — new flows, theming, copy, layout, or coordinated changes across several screens. This is the same design agent as the chat in the Flowstep editor: it decides from your message and elementIds what to build and what to change.

Omit fileId to start a new file; pass fileId to work in an existing one. If the request could apply to a file you already have, your agent should check list-files and list-screens first. For a next-step, error or empty state, or platform variant of one screen, use ai-generate-screen-variant. For a preset edit or redesign of one screen, use ai-edit-screen-variant. If you already have JSX, use add-screen-jsx or replace-screen-jsx instead.

Input

ParameterTypeDefaultDescription
fileIduuid—Target file. Omit to create a new file. Required when elementIds is set
messagestring—Description of the screens to generate and/or the changes to make. When you pass elementIds, say whether to edit them or use them as reference. Include any webpage URLs you want Flowstep to reference here
elementIdsuuid[][]Optional screenIds from list-screens and/or element data-ids from get-screen-jsx (with includeIds), like a selection in the editor. They can be edited in place or used as visual reference for new screens. A screenId targets the whole screen
attachments{ id, path, type }[] (max 5)[]Files from upload-attachment — images, PDFs, or code and text files. Don’t inline file contents in the message

Example — edit one screen and add another in a single call:

{
  "fileId": "5c2170f0-5b09-4a5a-ba7a-4d5c2cfb07e0",
  "message": "Switch this sign-in screen to dark mode, then add a matching forgot-password screen.",
  "elementIds": ["3f9e6eb6-5525-4383-9375-67e0bd762dbe"]
}

Output — { status, fileId, screenIds, reply? }.

{
  "status": "generated",
  "fileId": "5c2170f0-5b09-4a5a-ba7a-4d5c2cfb07e0",
  "screenIds": [
    "3f9e6eb6-5525-4383-9375-67e0bd762dbe",
    "c13d3707-0efe-49f5-b6cb-0ca5ac5223d0"
  ]
}
  • status — "generated" when screens were built or changed. "chat" when Flowstep replied without building, in which case reply holds its answer and screenIds is empty. If your brief is ambiguous, your agent should ask you to clarify and call the tool again.
  • screenIds — every screen built or changed during the call, including screens edited in place. If the call times out after some screens are built, it returns those screens instead of an error.

Screens you ask it to edit are overwritten in place.


ai-generate-screen-variant

Add a new screen derived from exactly one existing screen — the next step in the flow, an error or empty state, or a version for another platform. The original screen is left unchanged. To add a screen that isn’t a variant of an existing one (for example, a settings screen), use ai-design-screens with a fileId.

Input

ParameterTypeDescription
fileIduuidTarget file
screenIduuidThe existing screen to derive from
operationVariantenumRequired — how the new screen relates to the existing one
operationVariantAdds
next_screenThe next screen in the user flow
error_stateAn error state of the screen
empty_stateAn empty state of the screen
web_versionA web version
mobile_versionA mobile version
tablet_versionA tablet version
mobile_ios_versionAn iOS version
mobile_android_versionAn Android version

Output — { status, fileId, screenIds }. status is always "generated".


ai-edit-screen-variant

Change exactly one existing screen in place using a preset — theme or polish it, try a different layout or visual style, or redesign it from scratch. For new screens, free-form instructions, or a precise edit to individual elements, use ai-design-screens.

Input

ParameterTypeDescription
fileIduuidTarget file
screenIduuidThe existing screen to change
operationVariantenumRequired — the edit or redesign preset to apply
operationVariantTypeEffect
dark_themeEditSwitch the screen to a dark theme
light_themeEditSwitch the screen to a light theme
make_prettyEditPolish the screen’s visual design
different_layoutRedesignTry a different layout
different_styleRedesignTry a different visual style
from_scratchRedesignRedesign the screen from scratch

Output — { status, fileId, screenIds }. status is always "generated".

This overwrites the screen’s content in place.


Renamed tools

Tool names changed in September and October 2026. If you have prompts, scripts, or agent instructions that use the old names, update them:

Old nameNew name
get-screenget-screen-jsx
add-screenadd-screen-jsx
replace-screenreplace-screen-jsx
ai-generate-screensai-design-screens
ai-edit-screensai-design-screens
create-new-designai-design-screens
edit-design (free-form instructions)ai-design-screens
edit-design (with an operationVariant preset)ai-edit-screen-variant
regenerate-designai-edit-screen-variant
expand-designai-generate-screen-variant
get-design-guidelinesget-file-instructions
update-design-guidelinesupdate-file-instructions
delete-design-guidelinesdelete-file-instructions

Inputs changed too: the AI design tools take elementIds (or a single screenId for the variant tools) instead of targets, add-screen-jsx takes jsx and explicit metadata fields instead of jsxContent with a metadata comment, create-file takes name instead of title, and the file instructions tools take fileId instead of resourceId and linkedTo, with update-file-instructions taking instructions in place of designGuidelines.

Was this page helpful?