Skip to content

AI assistants & MCP

Tessule has two AI surfaces. Inside the app, three assistants help you design your schema, draft queries and charts, and build dashboards — in conversation. Outside the app, a built-in MCP server lets you connect Claude, VS Code, or any MCP-compatible AI client directly to your workspace’s data and tools.

If you only remember one thing: schema and dashboard AI proposes; a person applies. In-app assistants and MCP authoring tools use the same validated plan endpoints and permission checks as manual changes. MCP record tools act directly with your own workspace permissions; destructive tools require confirmation.


Talking to an assistant needs no special permission beyond seeing the page it lives on. The gated steps are the actions that come out of a conversation:

Step Action required Held by default
Chat with the schema assistant builder:access (it lives on the builder’s Data Overview page) Admins (grantable via custom roles)
Apply a schema plan schema:apply Admins only
Chat with the query assistant builder:access (SQL console / chart builder pages) Admins (grantable via custom roles)
Run a proposed query query:execute Everyone (readers included)
Save a proposed query / chart savedQueries:manage / charts:manage Admins and members
Chat with the dashboard assistant none beyond seeing the Dashboards page Everyone
Apply a dashboard plan dashboards:manage Admins and members
Enable AI record writes over MCP organization owner/admin (org settings) Org owners/admins

The buttons hide themselves when you lack the action, but the server is the authority — see Authorization & Permissions.


All three assistants — and MCP schema/dashboard authoring — follow the same loop:

AI drafts a plan (nothing changes) Validator (dry run) errors & warnings You review summary + preview Apply revalidate, atomic issues → AI fixes and revalidates permission-gated your decision
The loop every AI-authored schema or dashboard plan goes through. The dry-run validator and the apply endpoint are the same ones a human author uses; apply revalidates against the current workspace, so a stale plan fails cleanly instead of half-applying.

The validator returns issues — each with a severity (error, warning or info), a stable machine-readable code (e.g. REF_LABEL_NOT_UNIQUE, NAME_SANITIZED), the exact path of the offending element in the plan, and a fix suggestion. Errors block a plan from being proposed at all; warnings ride along with the proposal so you can judge them; an info finding is a shape the validator noticed but could not corroborate, for the author to acknowledge or ignore. A schema plan can keep a design it has considered quiet on re-validation (intentional: true on a field, or an acknowledge list of codes on the plan) — for warnings and info findings only, never for an error. The assistants use these issues to fix their own drafts before you ever see them — the plan card in the chat only appears once validation passed.


Where: the Data Overview page (the builder’s schema area). It is also the centrepiece of an empty workspace — describe your business and get a working schema.

What it does: interviews you about your operation (structured question forms, not just prose), drafts a schema plan, validates it against your current schema, and shows a proposal card: a markdown summary, the number of new tables and fields, a Preview schema diagram of the proposed structure against what exists, and — for those allowed — an Apply this schema button.

A plan can create tables (with fields, picklist vocabularies, references, formulas), add fields and uniqueness (plain or conditional), no-overlap and check constraints to existing tables, set up derivation rules and views, and designate lifecycle stages. What it can never do is delete, rename, or retype anything — plans are strictly additive, and destructive changes stay in the app UI where their consequences are shown.

Points worth knowing:

  • Applying uses POST /schema-plans/apply — the same admin-gated (schema:apply), audited endpoint as any other bulk schema change. The whole plan applies in one transaction: everything is created, or nothing is. Members can design freely and preview; the card tells them to ask an admin to apply.
  • Proposals go stale gracefully. If you keep chatting after a proposal, the card turns amber (“proposed before your latest message”) but stays usable — and because apply revalidates against the current schema, applying a stale plan is safe: it either still fits, or it fails cleanly with issues.
  • Conversations are saved per workspace and per user, so an interrupted design session resumes where you left off. New chat starts over.
  • The assistant sees your schema (tables, fields, relationships, descriptions), not your record data.

The equivalent dry-run endpoint, POST /schema-plans/validate, is open to all roles — validation changes nothing and is how the assistant (and MCP clients) check their work.

Validate once, apply by id. Every validate response carries a planId for the document it checked, held for 30 minutes, and a planHash (a content fingerprint, key order ignored). Apply accepts { "planId": "…" } in place of the document, so exactly the plan that was validated and shown is the plan that runs, and an agent never emits a large plan twice. To correct a few things, validate again with the planId and a patch — RFC 6902 JSON Patch add/remove/replace operations at JSON Pointers into the document — and the corrected plan is stored under a new id. The approval step then has something concrete to approve: “apply plan 7f3a… (hash 9c1e…)”. The same contract applies to dashboard plans, and to the validate_*_plan / apply_*_plan MCP tools (plan_id, patch).

For schema-as-code workflows, MCP’s export_schema_plan tool returns the current workspace as the same deterministic plan format. You can commit or diff the result, copy it into an empty workspace, or apply it in reconcile mode: matching objects are skipped, missing pieces are created, and differing objects are rejected. Reconcile remains additive — it never renames, retypes, or deletes objects.


Where: the Dashboards page.

What it does: designs analytics as one dashboard plan — new saved queries, charts backed by them, and dashboards arranging the tiles. It is deliberately reuse-first: it lists your existing queries and charts and prefers referencing them over creating near-duplicates (the validator even flags a new query that duplicates an existing one). It knows every chart type, including the process family and benchmarks: ask for “the work-order funnel with last quarter beside it” or “time in stage against our SLAs” and it drafts the stage-history SQL and the chart that reads it. The same authoring guide is served to external AI clients over MCP (get_dashboard_authoring_guide).

Validation (POST /dashboard-plans/validate) checks structure and references, and plans every new SQL query read-only against your workspace — without executing it. Apply (POST /dashboard-plans/apply, requires dashboards:manage) creates everything in one transaction. The result is ordinary saved queries, charts, and dashboards, indistinguishable from ones built by hand — edit or delete them as usual. Plans never modify or delete existing objects.


Where: the SQL console and the chart builder.

What it does: turns “how many deals closed last month, by owner?” into a validated SQL query — and, when you asked for a visualisation, a chart definition to go with it (any chart type, the process charts and benchmarks included). Its propose_query step parses the SQL and plans it read-only against your real schema, so it never presents a query it hasn’t validated.

The assistant itself never executes the query and never sees any record data. The proposal card puts you in control:

  • Run — executes it via the ordinary query endpoint (your query:execute action, your daily query quota) and shows the results, with a live chart preview when one was proposed.
  • Save / Save chart — stores it as a normal saved query or chart (requires savedQueries:manage / charts:manage).
  • Open in editor — loads the SQL into the console for hand-tuning.

Where: file import, at the analysis step (POST /imports/analyze). This is not a chat: nobody talks to it, and it runs once per analysis, only when available.

What it does: import analysis reads each column’s values and settles most of them: numbers, dates, emails and so on. A few it cannot settle: columns it can only read as text, such as a yes/no column where some answers carry a comment (No - moved away), an address in one cell, or dates written 12 Jan 26; columns it could only guess a picklist for; and columns it typed “mostly consistently”, where a few values do not fit. For those columns, and only those, a model is asked to suggest import rules that read them better. A suggestion arrives on the column as a ruleProposal marked source: "ai".

What the model sees:

  • each such column’s header;
  • up to 20 distinct values from the part of the file analysis already read, none longer than 200 characters;
  • how many cells were empty, and the type analysis gave the column;
  • the fields the column may write: the column’s own field and, when the file matches an existing table, that table’s field names, display names and types;
  • the names of the fields it may not reuse for a new one: every field the matched table already has, and every other column’s target field.

What it never sees: the whole file, any row as a row, any column that analysis already typed with confidence, and any record already in your workspace (not even the ones analysis compared the file against to find a matching table). It writes nothing.

What it can suggest: only rules from the import-rule vocabulary, and only the ones a single column’s values can justify: mapValues, remainder, extract, split, dateFormat and nullTokens. It can suggest new fields for the chain to write, such as a comment field or a postcode. Each suggestion is checked the way a hand-written chain is checked before a job runs:

  1. the rules must parse;
  2. every regular expression must pass the safety check;
  3. every field the chain writes must exist or be declared;
  4. no field may be written twice across the whole mapping.

The chain is then run over the sample values the model was shown, and each value it produces is read as the type its field will have. A chain that cannot read more than half of them is thrown away, and so is one that would leave a guessed picklist a picklist: the picklist’s options are the column’s raw answers, which the chain’s values would never match. Any suggestion that fails any check is dropped whole. The column keeps the analysis it would have had anyway, and no error is raised.

Nothing is applied for you. The analysis is complete before any model is asked, and a suggestion only adds a ruleProposal to a column. Everything else in the response is identical with the proposer on or off. In the import wizard, the review screen shows each suggestion on its column, marked as the AI’s, with the model’s reasoning and the sample values the chain could not read; you adopt it with Use these rules or set it aside. An adopted chain stays marked Proposed by AI only while it is unchanged — edit it and it is Edited from an AI suggestion. Through the API, you adopt a suggestion by putting its rules into the column’s mapping and its fields into the plan (see Suggested rules), then preview it with POST /imports/preview like any other chain.

Three switches, each of which removes the model call without removing the import:

  • Your plan: the import.ruleProposer.enabled entitlement. It is on by default, like capture from image.
  • Your organization: an org owner or admin switches AI suggestions when importing off under Organization Settings → Features. It stays off until they switch it back.
  • One request: send "ai": false in the analyze request. The response is the deterministic analysis, whatever the three settings above allow.

When the proposer is off, you get the ordinary analysis, with no error and no different behaviour. The same happens when it fails: the budget is spent, the model errors or takes more than about 12 seconds, or its answer cannot be read.

Cost: one model call per analysis, and only when some column qualifies. It is metered against the organization’s monthly AI token budget, as import_rule_proposer in the usage ledger.


Availability: when an assistant is missing

Section titled “Availability: when an assistant is missing”

Each assistant has a status endpoint the app checks before showing the panel: GET /schema-assistant/status, GET /dashboard-assistant/status, and GET /query-assistant/status. Each returns a single enabled flag.

An assistant is unavailable when:

  • AI features aren’t enabled for your organization (enabled: false) — the panels hide entirely. They are an add-on, not something a workspace admin can switch on locally.
  • Your organization’s monthly AI budget is exhausted. AI usage is metered in tokens against a per-organization monthly budget (default five million; adjustable per plan). When it runs out, assistant turns are refused with a clear message until the calendar month resets. Metering itself never blocks — only the budget ceiling does.
  • A single conversation grows too large — the assistant asks you to start a new chat rather than silently truncating history.
  • The live connection is down — assistant turns stream over the app’s realtime connection; the Send button waits for it to reconnect.

The MCP server lets Claude, VS Code, or any MCP-compatible client work with your workspace directly. It is a thin adapter over the regular REST API: every tool call is forwarded to the corresponding API endpoint with the caller’s own credentials, so authentication, authorization, validation, and audit logging happen exactly once, identically for AI clients and the web app. There is no AI side door.

Every workspace has its own MCP server URL. Connect one URL for each workspace you want an AI client to work in: the connection, and the OAuth grant behind it, reach that workspace and no other, so connections to several workspaces sit side by side and you switch one on or off on its own.

  1. Open the workspace you want to connect.
  2. Go to Workspace Settings → AI & MCP.
  3. Copy the MCP server URL with Copy. It has the form https://<api host>/mcp/{workspaceId}: the workspace’s id, in lowercase, after /mcp/.

Anyone who can open the workspace sees the same URL. The URL is not a secret: connecting through it still needs your sign-in and your consent, and the connection acts with your own permissions in that workspace.

A client that keeps only one connection can use https://<api host>/mcp instead: you choose the workspace on the consent screen, and to switch workspace you disconnect and connect again.

Each connection says which workspace it is: the server’s title in the handshake carries the workspace name, its instructions carry the name, id and environment (production or sandbox), an orientation derived from your tables (the most referenced tables, the ones with a lifecycle, your dashboards), any standing instructions for AI agents a workspace admin has written on the AI & MCP tab (house rules such as the currency amounts are in, or a table an integration feeds that nothing else should write to), and the rule for reporting problems (see Telling us when something is wrong), every tool’s description ends with the same line (Workspace: "Example Workspace" (ws_0123abcd, production).), and every write result ends with a workspace line naming what it changed. With several workspaces connected side by side the tool lists are otherwise identical, so this is how an agent, and you, tell “create a record in Example Workspace” from “create a record in the sandbox” before and after the fact. Every tool that writes also takes an optional expected_workspace_id: a call that names another workspace is refused before anything runs, so a careful agent can make a cross-connector slip impossible.

  1. In Claude: Settings → Connectors → Add custom connector, paste the workspace’s MCP server URL. In Claude Code: claude mcp add --transport http <name> <URL>. In VS Code or another client: add it as a remote MCP server. Repeat with another workspace’s URL to connect that one too.
  2. The client walks you through sign-in and the consent screen: which application, the host it sends you back to, which scopes, and the workspace, which a per-workspace URL fixes. See API access & tokens for the full OAuth flow, scope meanings, and token lifetimes.
Group Tools Needs
Read structure & data describe_workspace (what the workspace is for and how it is shaped: hubs, lifecycles, reporting views, dashboards, one line per table; detail: "full" adds every field), find_tables (the tables a goal needs, ranked from words in the request, with their fields and neighbours), describe_tables (the fields of a named set and the references between them), list_tables, get_table_schema, sample_data, search_records tables:read and records:read scopes + your own read permissions
Query query_data (read-only SQL; returns up to limit rows — 200 by default, 10,000 at most — with hasMore set when a full page came back; a lookup, rollup or computed column is not a SQL column — the refusal carries the equivalent expression, and get_table_schema lists it as sqlEquivalent) query:execute scope + your own query:execute permission
Schema authoring get_schema_authoring_guide, get_schema_part (the library of schema parts — published building blocks of tables plus the views, flows, record pages and dashboards that make them a working process, including curated parts for a sales pipeline, property management, event planning and a nonprofit — to search before designing from scratch: omit partId to search, pass it to read one part’s document, the slots it needs and what it can do; also browsable as schema-part:// resources), export_schema_plan, validate_schema_plan, apply_schema_plan guide/parts/export/validate: read access; apply: the schema:apply scope and schema:apply in your role (admin)
Dashboard authoring list_saved_queries, list_charts, list_dashboards, get_dashboard_authoring_guide, validate_dashboard_plan, apply_dashboard_plan list/guide/validate: read access; apply: the dashboards:manage scope and a role that can manage dashboards
Flow authoring get_flow_authoring_guide — the flow document format (triggers, blocks and their outputs, {{...}} references, conditions, code blocks, loop protection, testing); flows themselves are built through the gateway’s Flows operations guide: read access; building, testing and publishing a flow: the flows:create, flows:update and flows:execute scopes and those actions in your role (admins by default)
Custom app authoring get_hosted_site_authoring_guide — how a custom app signs members in, calls the API from its pages, what it may call and hold, and how a build is deployed; deploy_site — deploy a built app from one zip or tar.gz of its built directory, with the source it was built from (POST /hosted-site/deployments/archive); download_site — download a deployment’s build and source to change it (GET /hosted-site/deployments/{deploymentId}/files); the app itself is created through the gateway’s Hosted Sites operations guide: read access; deploy_site, download_site, creating the app: the hostedSites:manage scope and hostedSites:manage in your role (admins by default)
The workspace’s OpenAPI document get_openapi_document — a download URL for the workspace’s OpenAPI document (the input for generating a typed client), with its version, digest and size and never the document’s text; the URL needs no header, lives ten minutes, reaches this workspace’s document only and grants nothing beyond what the connection can read. audience: site is the form a custom app’s build uses. The same documents are readable whole as the workspace-openapi:// resources the tables:read scope and tables:read in your role
Saved views list_saved_views, create_saved_view, update_saved_view list, and a private view: read access; sharing a view with the workspace or a group (what a dashboard tile needs): the customization:manage scope and customization:manage in your role (admins by default)
Record writes create_record, create_records (up to 500 rows of one table, with a result per row; with on_match and a match_by key, rows that match an existing record update or skip it, so a batch can be sent again; dry_run checks without writing), update_record, delete_record records:create / records:update / records:delete scopes + your record permissions + the org opt-in below
Report a problem report_issue, list_my_issues, get_issue, reply_on_issue Nothing beyond a connection — see below
Everything else (the gateway) find_operations, describe_operation, call_operation, call_write_operation — search the whole workspace API by goal, load one operation’s contract on demand, and call it by id: flows, approvals, record history, saved-query runs, imports, exports, the recycle bin, comments, attachments, members, audit, … The scope and permission of the operation itself (find_operations says per hit whether your connection can call it); writes under records or existing-schema actions also need the org opt-ins below, and call_write_operation is only listed on a grant that allows some write

An agent searches, reads, previews and installs schema parts. Over MCP an agent searches and reads parts, composes a part document from the workspace’s tables (POST /library/compose, through call_write_operation) and previews an install (POST /library/parts/{partId}/versions/{number}/install/preview, which needs the schema:apply scope and schema:apply in your role (admin), and changes nothing). The preview lists what the part would create and under which names, the slots still to bind — external tables, people, secrets — and what the part can reach: outbound hosts, email, code blocks, SQL. A part can also add roles, with the record rules that limit them and who holds each one. The preview describes every role in plain words, and the install refuses roles nobody has read: the agent shows them to you and sends the preview’s rolesReviewToken as acknowledgedRoles only once you agree (otherwise the install answers PART_ROLES_NOT_REVIEWED); in the app, the install wizard asks you to tick that you have read them. Once you agree, the agent installs the part with the same request (POST /library/parts/{partId}/versions/{number}/install, the same scope and role). The install runs under the connection’s own grant, its scopes over your role, so anything the grant cannot create, such as a shared saved view without customization:manage, is listed as an issue on the install instead of being created. An agent cannot publish a part: the API refuses publishing to every API token and OAuth client. In the app, you install a part yourself from Library → the part → Install, which opens the install wizard on the current workspace (Try in a sandbox opens it on a new sandbox workspace), and the in-app schema assistant offers a matching part on your first message in a workspace with no tables.

Every tool carries the standard MCP annotations — a title, and whether it is read-only, additive, or modifies existing data — so a client can decide how much to ask before calling it: read-only tools run without a per-call prompt, tools that change or delete existing data always prompt. Results are held to the size a client will accept (about 120,000 characters); a larger result comes back with its longest list cut and a truncated note saying how many entries were dropped and how to narrow the call.

Write tools return a short confirmation. A write confirms what changed and stops: update_field returns the field’s identity, type and flags (its config only when that is what was edited), set_stage_config the policy and stage count, create_record and update_record the record with its null fields left out, and apply_*_plan the created objects and each warning once — the summary belongs to validate, where it is shown to the user. Use the read tools (get_table_schema, query_data) for full definitions. On the bulk endpoints, results: "failures" lists only the records that were not changed alongside the counts.

Two prompts ship alongside the tools for clients that support them: design_schema and design_dashboard — interview-style kickoffs that package the authoring guides.

If your assistant hits a bug, a missing capability, or an error it cannot work around, it can file that as an issue without leaving the conversation — report_issue puts it in the same log the in-app feedback widget feeds, with a title, the full description, whatever structured detail it has (the tool it called, the arguments, the error), and up to three small attachments such as a log or a screenshot.

The connection’s instructions ask the assistant to do this unprompted: when it works around a missing capability, guesses its way past a refusal, finds a tool description or guide wrong, or meets an error that does not explain itself. It files one issue per gap, adds to an existing report rather than repeating it, describes shapes and errors rather than your records’ contents, and tells you in one line what it filed. You see every report it files under My feedback in the app’s feedback panel.

These tools need no scope beyond a working connection and no organization opt-in: reporting a problem with the product is not access to your data. They are self-scoped, so an assistant only ever sees issues you reported.

What is recorded about the assistant. The agent names itself in the call (for example “Claude Code”), and that name is stored as what it claims. Separately, Tessule records which registered OAuth client the connection belongs to, which is observed rather than taken on trust. Both are kept with the report.

Issues are a conversation. We can reply on a report, and you (or your assistant) can reply back: answer a question, add a fuller stack trace, narrow a reproduction. Replies show up in the feedback panel in the app, with an unread marker, and through get_issue / list_my_issues. Each reply names who wrote it.

The create_record / create_records / update_record / delete_record tools are off by default for every organization. An org owner or admin enables “AI record writes via MCP” under Organization Settings (the features toggle, backed by PUT /organizations/{organizationId}/features). Until then the tools are absent from the client’s tool list.

The flag only controls whether the tools are offered. Even with it on, every write passes the exact checks the web app’s writes do: the records:create / records:update / records:delete actions from your DB-backed permissions, row-level scopes and field-level restrictions, and full schema validation. A reader’s write is denied with the flag on; the flag never grants anything.

  • The connected user’s own permissions apply, end to end. MCP calls run as you, in the one workspace you approved. Records and fields you can’t see can’t be read, matched, or leaked into search snippets.
  • Scopes cap, roles grant. The token’s scopes are intersected with your role-based permissions — see API access & tokens.
  • Non-admins never see apply_schema_plan in the tool list, and the endpoint enforces the admin gate regardless of what a client cached.
  • Role changes apply on the next call. Every MCP call resolves your membership and roles from the database, so a demotion or a revoked membership takes effect on the next tool call, and the connection’s refresh grant is refused once membership has ended.

Everything an MCP client does lands in the same records as everything else:

  • Mutations appear in the workspace audit trail, attributed to the connected user.
  • Writes emit the standard application events, tagged with source: "mcp" and the tool name — so the UI live-updates, and you can tell an AI-made change from a hand-made one.

  • Same validator for AI and humans. AI-authored plans go through the identical validation and apply pipeline as manual ones; there is no relaxed “AI mode”.
  • Schema plans are additive-only. No AI path can delete, rename, or retype a table or field. Destructive schema changes exist only in the app UI, in front of a person.
  • Applies are atomic and revalidated. A plan validated against yesterday’s workspace is re-checked at apply time and fails cleanly rather than half-applying.
  • delete_record moves a record to the recycle bin, where it stays restorable until the retention window purges it. It requires the org opt-in, the records:delete scope, your own records:delete permission, and (per the tool’s own instructions) explicit user confirmation in the AI conversation. Deleting a record can also remove rows derived from it, and the consent screen says so.
  • Cost is bounded. All in-app assistant usage, and every import rule suggestion call, is metered against the organization’s monthly AI token budget.
  • No AI on the import hot path. The model is asked once, while the file is analysed; rows are always imported by the deterministic rule engine.

Q: I don’t see any AI panels at all.

AI features aren’t enabled for your organization (the status endpoints return enabled: false) — this isn’t something a workspace setting controls. If others in your workspace see the schema or query assistant and you don’t, you’re likely missing builder:access (those two live on builder pages).

Q: The assistant proposed a plan but I can’t apply it.

Applying a schema plan needs schema:apply — admins only. The card shows “Ask a workspace owner or admin to apply this schema” in that case; they can open the same conversation outcome and apply it. Dashboard plans need dashboards:manage (members have it).

Q: Does the AI see my records?

The schema assistant sees your schema, not your data. The query assistant validates SQL without executing it and never sees results — you run the query. The dashboard assistant sees query/chart/dashboard definitions. Import rule suggestions see a few sample values from the file you are importing, column by column, and never your existing records (see above). Over MCP it’s different by design: query_data, sample_data, and search_records return real data (that you can see) to the AI client you connected — that’s their purpose.

Q: Can an MCP client change my schema behind my back?

It can propose freely (validate_schema_plan changes nothing). Executing requires an admin’s grant on the token (the schema:apply scope and the admin role), and the tool’s contract instructs the AI to show you the validation summary and get confirmation first. Every apply is audited with source: "mcp".

Q: The assistant said my organization reached its AI limit.

The monthly AI token budget is spent. It resets at the start of the next calendar month; your org owner can ask about a higher budget. MCP usage with external clients (e.g. Claude) spends that client’s tokens, not this budget.

Open the app