---
name: firaform
description: Work with FiraForm forms through the FiraForm MCP server. Use when the user asks to create or manage forms, check submission stats, whitelist a website domain, add webhook or Sendy integrations, check and enable payment gateways, or build and publish a static form site.
---

# FiraForm

FiraForm is a form backend. Each form has a public endpoint that accepts HTML form posts, stores submissions, filters spam, and sends notifications. You reach it through the **FiraForm MCP server** at `https://a.firaform.com/mcp`, authenticated with OAuth (the client opens a browser for the user to approve access) or, for clients without OAuth, an **MCP token** created under Profile → AI Agents (MCP). A REST API token does not work with the MCP server.

## Before anything else

1. Call `whoami`. It returns the user's teams, their role in each, plan names, and usage. Ask which team to use if it is not obvious; otherwise use `current_team_id`.
2. Members are read-only. Owners, admins, and managers can create forms and change form settings, fields, domains, and sites; only owners and admins can manage integrations and payments.
3. Forms are identified by the `uuid` returned from `list_forms` or `create_form`. Use `rename_form` to rename one, and `get_form_stats` for submission counts over a period.
4. A site can only submit to a form if its domain is on the team's whitelist (`list_domains` / `add_domain`), or a `*` entry exists. Publishing a Form Site whitelists that site's own host automatically, so never add `{slug}.firaform.page` by hand.
5. If your client supports prompts, `create_contact_form` and `build_form_site` walk through a complete setup.

## Common workflows

### Create a contact form

1. `create_form` with a clear name and the chosen `team_id`.
2. `get_form` with the new uuid; give the user the `endpoint_url` and the `html_snippet`.
3. `list_domains`; if the site's host is missing, `add_domain` with the exact host only (no protocol, path, or trailing slash).
4. Ask before adding a webhook or Sendy integration (`create_integration`).
5. Do not enable payments unless asked (`list_payment_gateways` first, then `enable_form_payment`).

### Submission stats

- Submission contents are not available to agents. Reading, exporting, and moderating individual submissions (including marking one as not spam) happens in the FiraForm dashboard; point the user there.
- `get_form_stats` returns counts only, never submission contents: today, this week, this month, and all time, plus a summary with the total, a spam status breakdown (clean, spam, suspicious, pending), and the number and total size of uploaded files. Small counts over short ranges are still exact, so a daily count of 1 shows that someone submitted that day; do not describe the numbers as anonymous.
- Pass `date_from` / `date_to` (YYYY-MM-DD) to limit the summary to a range, and `group_by` (`day`, `week`, `month`) for a timeline. Without `date_from` the timeline covers the last 30 days, 12 weeks, or 12 months; it can span at most 366 days, 104 weeks, or 36 months.

### Form settings

- `get_form_settings` shows the active flag, success and error redirects, the notification email, file attachments, and CAPTCHA options. Read it before writing the HTML, so the page includes whatever the form expects.
- `update_form_settings` changes those values. Redirects need a plan that allows them, except a redirect to the form's own Form Site, which works on every plan.
- `get_form_auto_reply` / `update_form_auto_reply` handle the automatic email sent to submitters. Subject and body support `{{field_name}}` placeholders. Auto-reply needs a plan that allows it.

### Manage fields

- `list_form_fields` shows types, required flags, rules, and submission counts. Fields with submissions are locked.
- `update_form_field` sets type, required, and validation rules. Field names must match the `name` attributes in the HTML form.

### Integrations

- `list_integrations` shows webhooks and Sendy integrations with masked secrets.
- `create_integration` / `update_integration` support `webhook` and `sendy` only. Webhooks need a plan that allows them and stay within the form's webhook limit; Sendy needs email integrations enabled.
- `delete_integration` is destructive. Confirm with the user first.
- Never ask for or repeat webhook header values or Sendy API keys; they are stored server-side and never returned.

### Payments

- `list_payment_gateways` shows which providers the team has configured per environment. Credentials are never returned.
- `enable_form_payment` turns a provider on for a form when the team has it enabled and configured. A form can have several gateways; visitors pick one with the `_ff_payment_gateway` field or the gateway selection page.
- Never ask for payment credentials.

### Build and publish a site

Each form can publish one static site at `{slug}.firaform.page`. Members can view a site and its history; owners, admins and managers can publish, roll back and rename it. The badge policy is on the site record: the site shows "Powered by FiraForm" unless the plan allows hiding it and the site opted out (`can_hide_branding` in `get_form_site`). No tool changes branding; it is a dashboard setting, so point the user there.

**Build and preview locally first.** Write the files in the user's workspace and show them a preview — open the HTML file, or start a small local server — and iterate until they are happy. Only call `deploy_form_site` when the user says the site is ready to go live. Do not publish draft revisions to `*.firaform.page` just to preview them: every publish is immediately public, counts against the daily publish limit, and can be crawled or shared before it is finished. If there is no local preview available, render the page description and ask before publishing.

1. `get_form_site` for the URL, status, limits and remaining usage. Read it before writing files; the file count, total size, per-file size and daily publish limits are plan-bound.
2. Write plain static files: `index.html` at the root plus CSS, small images, SVG and fonts. There is no build step and no server-side code.
3. Wire the form to the endpoint from `get_form`: `<form action="ENDPOINT" method="POST">`, a `name` on every input, `enctype="multipart/form-data"` only with file inputs. Include the CAPTCHA widget when `get_form_settings` shows CAPTCHA is on. If `list_form_fields` has a field with type `honeypot` (usually `_gotcha`), add it as a text input hidden with CSS (not `type="hidden"`), with `tabindex="-1"` and `autocomplete="off"`, and leave it empty.
4. `deploy_form_site` with `files: [{path, content, encoding}]`. Use `base64` only for binaries. The previous version stays live until the new one is ready.
5. If the deploy returns `ready: false`, poll `get_form_site_deploy` with the deploy id. Fix rejected files and deploy again; errors name the file and the rule.
6. Share the URL and check one test entry:
   - Note `summary.total` from `get_form_stats`. Use the total, not the `clean` count: new entries are stored as `pending` while the spam check runs.
   - Ask the user to submit one test entry from the published page. Do not post it yourself with curl or a script; the endpoint rejects requests whose origin is not on the domain whitelist.
   - Call `get_form_stats` again. The total goes up as soon as the entry is stored. If it did not, the entry was rejected (for example a filled honeypot field, CAPTCHA, field validation, or the monthly limit); tell the user instead of retrying.
   - Tell the user the test entry counts toward the plan's monthly submission quota, and that they can delete it in the dashboard (agents cannot delete submissions).
7. For large sites, `create_form_site_upload_url` returns a single-use, 10-minute signed URL that accepts a zip in the `archive` field, so a shell can upload without a REST API token or MCP token. A rejected upload needs a fresh link.
8. `list_form_site_deploys` gives the deploy ids; `rollback_form_site` makes an older ready one live again and is destructive, so confirm with the user first.
9. `rename_form_site` changes the public address. It is destructive even though nothing is deleted: the old address returns 404 with no redirect, so external links, bookmarks and QR codes break, absolute links inside the site break, and redirects pointing at the old address stop working. Read the address with `get_form_site`, explain this, and only call it with `confirm: true` after the user agrees. A taken or reserved name returns available alternatives.
10. Business and Premium can use a custom domain. `add_form_site_domain` creates it at Cloudflare and returns `dns_instructions`; pass the record type, name and value to the user exactly as returned (CNAME for subdomains, ALIAS/ANAME at `@` for root domains) and explain that a root domain needs a provider with flattening support. Then poll `get_form_site_domains` until the status is `active`. The limits are per site and per account, and the tools report both.

## Rules

- If a tool returns a plan limit error, show it to the user and suggest an upgrade. Do not retry.
- Confirm before any destructive call (`delete_integration`, `rollback_form_site`, `rename_form_site`) and before enabling payments.
- Connect with OAuth or an MCP token only. Never ask the user for a REST API token: the MCP server rejects it, and it can read submissions. If you already have one, do not use it to read, export, or list submissions; direct the user to the dashboard.
- If a request is refused with 403 and mentions an MCP connection, the client is using a REST API token. Ask the user to create an MCP token on Profile → AI Agents (MCP), or to reconnect with OAuth.
- Do not guess a team, form uuid, or domain. Ask, or read it with a tool.
- Errors like "Form not found" mean the form does not exist or the user is not in its team; do not keep retrying.
- Rate limits: 600 discovery requests and 120 tool calls per minute per user. Back off on 429 and use `Retry-After`.

## Example HTML snippet

```html
<form action="https://a.firaform.com/api/f/FORM_UUID" method="POST">
  <label>Name <input type="text" name="name" required></label>
  <label>Email <input type="email" name="email" required></label>
  <label>Message <textarea name="message" required></textarea></label>
  <button type="submit">Send</button>
</form>
```

Field names in the HTML must match the form's field configuration for validation rules to apply.
