> ## Documentation Index
> Fetch the complete documentation index at: https://docs.doola.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Authenticate with the raw API key in the Authorization header. Never add a Bearer prefix.
> Use the sandbox base URL https://api.test.doola.com and a dk_test_ key in examples unless the user asks for production.
> Send an Idempotency-Key header on POST /v1/partner/customers, POST /v1/partner/companies, POST /v1/partner/companies/import, POST /v1/partner/companies/{companyId}/services and POST /v1/partner/companies/{companyId}/documents. No other endpoint takes one.
> Every response is wrapped as {payload, error}. Read fields from payload and branch on error.code, never on the message.
> Drive formation progress from webhooks plus a reconciliation sweep, never a polling loop.
> Embedded SDK (@doola/js): the dk_ key stays on the server and mints customer sessions; the browser gets only a pk_ key and the session. onFormed carries only companyId and can fire more than once. Before charging, read the company with the dk_ key, require formationSubmissionStatus AWAITING_PAYMENT, check the owner's email, and price on the server. Then POST payment-confirmed, which answers 200 with an empty body, and replace the SDK element with a new doola.create() (never append a second one).
> The doola Formation MCP server at https://mcp.doola.com is for founders forming their own company with their own doola account. Platform partners integrate the Partner API or the Embedded SDK. The /mcp endpoint on this docs site only searches these docs.
> Affiliates refer founders to doola with a PartnerStack referral link and coupon code, or with two doola-branded iframe widgets: the Demo Booking Widget (app.doola.com/embed/book-demo?link=<referral link>) and the Company Formation Widget (app.doola.com/embed/partner/<partner ID>). The widgets need no API key and are not the Embedded SDK. Copy the snippets exactly as documented, never add a sandbox attribute to the formation widget iframe.
> For a full capability summary with the rules above, read https://docs.doola.com/skill.md.

# Tools reference

> The 42 MCP tools: seven that run the formation flow, six for status, companies and feedback, and 29 that read the customer's existing company.

The server exposes **42 tools**. Seven run the formation flow, one operation each: `start_formation`, `create_checkout_session`, `verify_payment`, `search_industries`, `save_company_details`, `request_ssn_entry_link` and `submit_formation`. Five more handle status, multi-company management and inspection, and `report_missing_capability` takes reports of anything the others can't do. The other 29 read the customer's existing company: see [Account tools](#account-tools).

> [!NOTE]
>
> **Conventions.** Identity comes from the OAuth bearer, so no tool takes a `customerId` argument. Tool descriptions are agent-facing and double as the agent's playbook. The flow is server-tracked: every formation response carries `nextStep` and `nextQuestion`, so the host doesn't plan the multi-step flow itself. They are data, not instructions: `nextStep` is `{tool, missingFields, description}`, naming the tool for the step the flow waits on, the arguments of that tool it still needs, and where the customer stands. A call whose arguments still carry a `<placeholder>` is rejected with `INVALID_INPUT` and saves nothing.
>
> **Intent.** Every tool also accepts a top-level `context` string: one sentence on why the agent is making the call. It is optional on every tool except `report_missing_capability`, where it is the report itself and required. Elsewhere it feeds doola's usage analytics only, no tool acts on it, and leaving it out changes nothing. Keep it general and free of personal details.
>
> **Conversation.** Every response carries a `conversation_id`, and every tool accepts it back as an optional top-level string. Leave it out on the first call, then pass the value from the previous response unchanged on every later call in the same conversation. It only groups one conversation's calls in doola's usage analytics: no tool acts on it and it grants nothing. A value that isn't a well-formed UUIDv7 is replaced with a new one.

## Formation tools

The server gates payment and everything after it. `create_checkout_session` refuses to run until `start_formation` has saved the legal name, country of residence and company name, and each `save_company_details` section waits for payment and its own prerequisites. A gated call returns `PRECONDITIONS_NOT_MET` with the `missing` steps and the `nextStep` that comes first. `start_formation`, `verify_payment` and the read-only `search_industries` are not gated.

### start\_formation

Starts the formation of an LLC or a C-Corp. Every argument is optional and is saved as given, so call it as soon as the user answers. `state` and `entityType` default to a Wyoming LLC, so `{}` sets that when the user has no preference. The user chooses the entity type; the agent explains the options and never picks for them.

| Argument | Type | Description |
| - | - | - |
| `firstName` | string | Legal first name as on the user's ID. Only needed when the profile lacks it; send with `lastName`. |
| `lastName` | string | Legal last name as on the user's ID. Only needed when the profile lacks it; send with `firstName`. |
| `countryOfResidence` | string | Country the user personally lives in, ISO 3166-1 alpha-3 (e.g. `USA`, `GBR`, `BRA`). |
| `companyName` | string | The name the user chose, without the `LLC` or `Inc.` suffix. Never invent or suggest one. Re-sending it replaces the saved name and clears any backup names. |
| `state` | string | Two-letter code of the formation state: any of the 50 states or `DC`. Defaults to `WY`. |
| `entityType` | string | `LLC` or `CCorp`. Defaults to `LLC`. Name options end in `LLC` or `Inc.` to match, and switching the entity type rewrites the ending on names already saved. |

### create\_checkout\_session

Accepts doola's [Terms of Service](https://www.doola.com/terms-of-service) for the Starter package on the user's behalf and creates the Stripe checkout. Show the user the Terms link and call it only after they agree. A call without `termsAccepted: true` is refused with `INVALID_INPUT` before anything is accepted or created.

| Argument | Type | Required | Description |
| - | - | - | - |
| `termsAccepted` | boolean | Yes | `true` only after the user has seen the Terms of Service and agreed to them. |

Returns:

* `pricing`: the first-year list price. Quote `pricing.summary` verbatim and never call it "charged today", since discounts apply at checkout.
* `chargeSummary`: what Stripe charges today, after any discount. Quote it verbatim.
* `checkoutUrl`: paste it verbatim into the reply, never a placeholder.
* `checkoutSessionId`: keep it for `verify_payment`.
* `companyId` and `companyName`: the company this checkout pays for. Name it to the user.

### verify\_payment

Checks with Stripe whether the checkout was paid. Call it once the user says they've paid. Returns `paymentStatus` (`Complete` when done), the amount paid, and `companyId` / `companyName` for the company the checkout was opened for. A `Complete` payment makes that company the active one, so `save_company_details` and `submit_formation` write to it. Ask no post-payment question until it returns `Complete`.

| Argument | Type | Required | Description |
| - | - | - | - |
| `checkoutSessionId` | string | Yes | The `checkoutSessionId` from `create_checkout_session`. |

### search\_industries

Read-only. Takes no arguments and returns the industries a company can be filed under. Match the user's description of the business against the list, offer the closest entries, and pass the one they pick, verbatim, as `industry` to `save_company_details`.

### save\_company\_details

Saves the post-payment details. Every argument is optional and is saved as given, so save each answer as soon as the user gives it. Sections are written in the order below and the call stops at the first one that fails; the response's `saved` array lists what was written before that.

| Argument | Shape | Description |
| - | - | - |
| `industry`, `description` | strings | `industry` is a verbatim entry from `search_industries`; `description` says what the business does, 50 characters max. Send them together. |
| `sellingPlatform` | string | Where the business sells, e.g. Amazon or Shopify. Optional. |
| `alternateNames` | string\[] | Up to two backup names, without the `LLC` or `Inc.` suffix. The primary name stays as saved. |
| `registeredAddress` | `{ provider, address? }` | `provider` is `registeredAgent` (doola's registered agent in the formation state, included) or `customer`, with `address: { line1, line2?, city, state, postalCode }` in the formation state. |
| `mailingAddress` | `{ provider, address? }` | Where bank cards and IRS mail go. Same shape; a `customer` address must be in the US. `registeredAgent` is the answer for a founder with no US address. |
| `members` | `[{ legalFirstName, legalLastName, ownershipPercent?, address }]` | LLC only. Every member of the LLC, each a person. `address` is `{ line1, line2?, city, state, postalCode, country, phone }`. Replaces the saved members as a whole, so always send all of them. Ownership is saved when every member carries `ownershipPercent`, and the percentages must total exactly 100. A company as a member is set up from the doola dashboard. |
| `executiveMembers` | `[{ type, legalFirstName, legalLastName, address }]` | C-Corp only. Every officer and director, each a person. `type` is `President`, `Secretary`, `Treasurer` or `Director`; the company needs at least one of each, and at most one President, Secretary and Treasurer. A person holding several roles is listed once per role. Replaces the saved officers as a whole. |
| `shareStructure` | `{ authorizedShares, parValue }` | C-Corp only. The number of shares the corporation may issue and the par value per share in USD, both greater than 0. |
| `responsibleParty` | `{ legalFirstName, legalLastName, email, address }` | The person the IRS treats as responsible for the company. The SS-4 and Form 8821 go to `email` for signing, so confirm it with the user. `address` has the same shape as a member's. There is no SSN field: see `request_ssn_entry_link`. |

### request\_ssn\_entry\_link

> [!NOTE]
>
> doola turns this tool on per environment. While it is off, the server does not list it, `get_company_onboarding_status` never suggests it, and doola collects the SSN by email with the SS-4.

For a responsible party who lives in the US, the EIN application needs their Social Security Number. No tool accepts one, so this hands the customer a single-use link to a doola-hosted page instead, the way `create_checkout_session` hands out Stripe's checkout. The customer signs in to doola with the account the agent is connected to (the page refuses any other account, so a forwarded link cannot be used to phish someone else's SSN) and types the SSN there and it goes straight to doola, never through the client's transcript, a tool result or doola's analytics. Takes no arguments, and is refused with `PRECONDITIONS_NOT_MET` until the responsible party is saved.

* A client that declared URL-mode elicitation gets an `input_required` result asking it to open the page. Its retry checks with doola whether the SSN arrived. If it has, the flow moves on. If not, the customer is usually still on the page, so no second link is sent, and `get_company_onboarding_status` reports `responsiblePartySsnOnFile` once the SSN arrives.
* Any other client gets `ssnEntryUrl` (paste it verbatim) and `expiresInMinutes`, with the same link in `message`. The link works once and expires after 15 minutes; call the tool again for a fresh one, which retires any earlier link for the company.
* Every result carries `responsiblePartySsnOnFile`, a boolean. No tool ever returns the SSN or any part of it.

It is never a gate: a customer who would rather not can still file, and doola collects the SSN by email with the SS-4. A responsible party living outside the US gets no link and the emailed SS-4 as before.

> [!WARNING]
>
> Never ask for an SSN or ITIN in the chat, and never repeat or save one the customer types anyway.

### submit\_formation

Files the company with its formation state's Secretary of State and emails IRS Form SS-4 and Form 8821 to the responsible party for signing. Refused with `PRECONDITIONS_NOT_MET`, listing `missing`, while any earlier step is incomplete. A successful filing returns `companyId` and `companyName`, the company that was filed.

| Argument | Type | Required | Description |
| - | - | - | - |
| `userConfirmed` | boolean | Yes | `true` only after the user reviewed a complete summary and replied "submit". |

> [!WARNING]
>
> `submit_formation` is **irreversible**. Always present a complete summary table and require an explicit "submit" before calling it. Editing after submission may incur extra costs or delays.

### Response fields

Every formation tool's response shares these fields:

| Field | Meaning |
| - | - |
| `nextStep` | The step the flow waits on: `{tool, missingFields, description}`, the tool that records it, the arguments of that tool it still needs, and where the customer stands. `null` when the flow is complete. |
| `nextQuestion` | That step's question for the user, worded to them. `null` when the flow is complete. |
| `saved` | What this call saved (`start_formation` and `save_company_details`). |
| `missing` | Prerequisites still unmet, in flow order. On `PRECONDITIONS_NOT_MET`, the steps to finish first. |
| `error` | `true` if the call failed. |
| `code` | Structured error code when `error=true` (see below). |
| `message` | Human-readable status. |

Error `code` values: `INVALID_INPUT`, `PRECONDITIONS_NOT_MET`, `READINESS_CHECK_FAILED`, `FILING_FAILED`. See [Errors](https://docs.doola.com/mcp/errors.md).

## Helper tools

> [accordion] get\_company\_onboarding\_status
>
> The canonical "where am I?" entry point. Call it **once per session**, right after the OAuth handshake. No arguments. Returns the customer profile, inferred completed steps, `responsiblePartySsnOnFile` (a boolean, never the SSN), `suggestedNextStep` (the tool for the step the flow waits on), and `nextStep` + `nextQuestion` as on every formation response.
>
> Don't call it before every step, since each formation response already carries `nextStep`. Re-call it only when the user returns mid-flow and asks "where are we?", after an unexpected error, or after `switch_active_company`. If the customer has no active company yet, its `nextStep` is `start_formation`.

> [accordion] list\_companies
>
> Returns every company the authenticated customer owns. Use when the user asks "which companies do I have?", wants to switch context, or before starting a new formation.
>
> **Returns:** `companies[]` (`companyId`, `name`, `state`, `entityType`, `dashboardStatus`, `submitted`, `isActive`) and `activeCompanyId`. The entry with `isActive: true` is the one the formation tools currently operate on.

> [accordion] start\_new\_company
>
> Begin a brand-new company formation alongside existing companies. Call it when the customer explicitly asks to form a second (or further) company. Creates an empty in-progress company, links it to the customer, and pins it as active. The previously active company is untouched and stays in `list_companies`.
>
> **Returns:** `companyId` (the new active company), `suggestedNextStep` (`start_formation`), and the `nextStep` and `nextQuestion` for that first step.

> [accordion] switch\_active\_company
>
> Point the formation tools at a different company the customer already owns. Returns the same shape as `get_company_onboarding_status` for the newly active company.
>
> **Parameter:** `companyId` (string, required). Must be one of the IDs returned by `list_companies`; unknown IDs are rejected.

> [accordion] get\_company\_info
>
> Returns the active company's full profile: name, state, entity type, EIN, industry, dashboard status, formation filing date, members, responsible party, addresses, name options, and provisioned services. People carry an `ssnOnFile` boolean in place of any SSN. Use it for "tell me about my company", "what's my EIN?" or "who are the members?". It differs from `get_company_onboarding_status`, which returns derived next-step routing rather than raw data.
>
> **Parameters:** none. To inspect a different company, call `switch_active_company` first.

> [accordion] report\_missing\_capability
>
> Call when the user wants something none of the other tools can do. The report is recorded for doola's team; it reads no customer data, changes nothing on the account, and returns no new tools. Tell the user the capability isn't available here and point them to the doola dashboard.
>
> **Parameter:** `context` (string, required). The goal and the kind of tool that would help, in general terms with no personal details.

## Account tools

Twenty-nine read-only tools answer questions about the customer's existing doola company from its live data. They act on the active company, and every tool, its title and its description are in `tools/list`.

| Area | Tools |
| - | - |
| Help Center | `search_doola_help_center` |
| Formation and status | `get_ein_application_status`, `get_itin_status`, `get_tax_filing_status`, `get_dissolution_status` |
| Documents, plan and profile | `list_company_documents`, `get_doola_plan`, `get_my_profile` |
| Compliance | `get_compliance_checklist`, `get_compliance_calendar` |
| Invoices | `list_invoices`, `get_invoice_detail` |
| Offers | `get_service_offers`: doola and partner offers, with a sign-up link for each |
| Bookkeeping | `get_bookkeeping_report` (profit and loss, balance sheet, cash flow, expenses by category or trial balance, as a PDF or XLSX download link or as figures), `get_bookkeeping_transactions`, `get_bookkeeping_uncategorized_transactions`, `get_bookkeeping_bank_accounts`, `get_chart_of_accounts`, `get_bookkeeping_vendors`, `get_bookkeeping_clients` |
| Stores and ads | `get_ecommerce_connection_status`, `get_sales_platforms`, `get_ads_platforms`, `get_orders`, `get_orders_time_series`, `get_top_selling_products`, `get_total_sales_by_platform`, `get_ads_campaigns`, `get_ads_time_series` |

Every one of them except the Help Center search waits until the company's formation has been submitted or filed, or the company was formed outside doola. Called earlier, it answers `error: true` with `code: PRECONDITIONS_NOT_MET` and a `nextStep` naming `get_company_onboarding_status`, and does not run. The Help Center search answers for any signed-in customer, with or without a company.

A bookkeeping tool called for a company with no doola bookkeeping answers `bookkeepingSetUp: false` with a `nextStep` naming `get_service_offers` for the Bookkeeping offer. `get_ecommerce_connection_status` also returns `integrationsPageLink`, the dashboard page where stores and ad accounts are connected. Call it before answering from store or ad data: a store still syncing has no data yet, which is not the same as zero sales.

The sign-up links they return, for doola services and partner offers alike, carry an `mcp_source` parameter naming the client that asked for them.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.