AI Assistant

Ask questions about your database in plain language and let the Assistant write and run queries for you.

The Assistant is a chat built into the workspace window. It knows the structure of the database you're connected to, can look up tables and run queries, and shows you every query it runs. Writes never run without your approval.

Open the Assistant

The Assistant lives in the inspector on the right side of the workspace window.

  1. Show the inspector with View ▸ Toggle Row Details (⌥⌘0) or the inspector icon in the top bar.
  2. Click Assistant in the segmented control at the top (next to Details).

Mantidb remembers which of the two you used last.

The header shows the current provider and model, for example Anthropic · claude-opus-5-5. Click it to switch provider or to open Assistant Settings…. The button next to it starts a new chat.

Before you can chat, add a provider and its API key in Settings ▸ Assistant.

Chat with your data

Type a question in the Ask about your data… field and press ⌘↩ or ↩ (Send). Click Stop to interrupt a reply.

You can ask things like:

  • "Which customers placed more than five orders last month?"
  • "Explain how the orders and invoices tables are related."
  • "Write a query that finds duplicate email addresses."

The Assistant answers in the language you write in.

Replies appear when they are complete; they aren't streamed word by word. Chats aren't saved.

What the Assistant knows

With every chat, the Assistant receives a description of the open connection:

  • The database engine and version.
  • The current schema.
  • The connection's safe mode.
  • The columns, primary keys and foreign keys of the first 80 tables and views.

That description is limited to about 24,000 characters. Tables beyond that are listed by name only, and the Assistant looks up their details when it needs them.

Tools and limits

The Assistant can use two tools on your connection:

ToolWhat it does
describe_tableReads the columns and keys of a table.
run_queryRuns one SQL statement.

Limits:

  • One statement per run_query call.
  • Each query fetches up to 500 rows. The model itself sees at most 50 of them.
  • Up to 10 rounds of tool use for each message you send.

Query cards

Each query the Assistant runs appears in the chat as a card:

  • A SQL badge for reads, or WRITE for statements that change data.
  • The status — "Running…", "Waiting for your approval", "N rows · X ms", or "Not run: you declined it".
  • A preview of up to 8 rows of the result.
  • Open in Editor — opens the SQL in a new query tab.
  • Copy SQL — copies the statement.

Every query the Assistant runs is saved to History.

Approving writes

Reads run right away. Writes always ask first, whatever the safe mode — even in Silent:

  1. Mantidb shows "Run this statement from the Assistant?" with the SQL.
  2. Approve it to run, or decline it. A declined query shows "Not run: you declined it".
  3. If the connection's safe mode requires Touch ID, you're asked for it too.

On a Read only connection, writes from the Assistant are always rejected.

Assistant settings

Open Mantidb ▸ Settings… (⌘,) and choose Assistant, or pick Assistant Settings… from the provider menu in the Assistant header.

Add a provider with + and remove one with −. Each provider has:

FieldDescription
ProtocolThe API the provider speaks (see below).
NameThe name shown in the Assistant header.
ModelThe model to use.
Base URLThe address of the API.
Default for new chatsUse this provider when you start a new chat.
API keyClick Save to store it, Remove to delete it.

API keys are stored only in the macOS Keychain.

Providers

ProtocolDefault base URLDefault modelAPI key
Anthropichttps://api.anthropic.comclaude-opus-5-5Required
OpenAIhttps://api.openai.com/v1— (enter one)Required
OpenAI-compatiblehttps://openrouter.ai/api/v1— (enter one)Required
Ollamahttp://localhost:11434/v1llama3.1Not needed

Use OpenAI-compatible for services that follow the OpenAI API, such as OpenRouter, DeepSeek, Gemini or LM Studio — change the Base URL to point at your service. Ollama runs models locally on your Mac and doesn't need a key.

Want to use Mantidb from an AI tool you already have, such as Claude Code or Cursor? See MCP Server.