Onboarding State
get_onboarding_stateRead the tenant's onboarding state. Call this FIRST when onboarding or when asked 'what's left to set up'. When issues is present, something the person started has failed (an import, a connection, a backfill, a migration): open with it, call get_onboarding_issues and offer its first fix before anything else. Otherwise lead the answer with foundationsNextStep: the one next step Foundations picks for this account, from the same goals and checks the Foundations page shows (goal, step, its state and measured counts, a plain-English statement and why it matters, and a link that opens that step on the Foundations page for the person to act on), and connectQueue: the person's sources one at a time (from save_data_sources), each with what it brings, its route, status and the one action to take (ordered by the kinds connectQueue.orderedForGoals need, when goals are chosen). While sources are waiting, present only connectQueue.next: one line on what it brings, its action, then call this again once the person is back. Never list the whole queue as a menu. Say foundationsNextStep's statement as written; never invent numbers or treat an answered question as setup done. kind all_set means every chosen goal Spark can check is ready (openGoals lists chosen goals Spark cannot measure yet). journey is the in-chat onboarding path for a person setting Spark up from this conversation: seven stages in order (account_linked, goals, data_sources, connect_sources, sales_and_stock, first_signal, purchasing), each with its status (done | current | upcoming), what Spark measured, the fact that finishes it, and a playbook naming the tools for it. Work only the current stage's playbook, open each reply with what changed in the account's own numbers, and end it with exactly one thing for the person to do. When a person says 'Continue my Spark setup', call this and resume at journey.stage. Also returns setup profile key, sandbox/live + evaluation window (days remaining, frozen), the free trial while it runs (plan, end, whether it ends on Free without a card), enabled modules and feature flags, the profile's onboarding checklist (ordered steps with completion), and a data profile (item/order/customer/supplier/warehouse counts + active integrations). Then get_data_readiness for the per-capability gap analysis. For a client-pinned credential the data counts confine to that client, configuration stays tenant-level, and foundationsNextStep and journey are null (Foundations is account-wide). An unpinned 3PL operator can pass clientId to inspect one client (foundationsNextStep and journey are then null too).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_onboarding_state"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clientId | No | Optional client id for a 3PL operator view. Client-pinned credentials omit it; the credential decides. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan | No | ||
| trial | No | ||
| intent | No | ||
| isLive | No | ||
| issues | No | ||
| journey | No | ||
| modules | No | ||
| checklist | No | ||
| isSandbox | No | ||
| workflows | No | ||
| tenantName | No | ||
| dataProfile | No | ||
| connectQueue | No | ||
| featureFlags | No | ||
| scopeClientId | No | ||
| foundationsUrl | No | ||
| intentAdvisory | No | ||
| scopedToClient | No | ||
| scopeClientName | No | ||
| setupProfileKey | No | ||
| credentialPinned | No | ||
| evaluationWindow | No | ||
| foundationsNextStep | No | ||
| foundationPreferences | No |