Skip to main content

Documentation Index

Fetch the complete documentation index at: https://ngquct-feat-1048-apple-intelligence-transport.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

AI Assistant

Built-in AI for writing, explaining, optimizing, and fixing SQL. One active provider drives every AI feature: chat, inline suggestions, editor actions, and fix-error. The chat panel has three modes (Ask, Edit, Agent). It can call tools to inspect your schema, take context from @ mentions, and run templates from / slash commands. Provider keys stay in the macOS Keychain. Per-connection rules and tool whitelists sync via iCloud with the connection.

Configure a Provider

Open Settings (Cmd+,) > AI. The tab is modeled on Xcode’s Intelligence settings: a single Active Provider picker at the top, a list of configured providers below, and a detail sheet when you drill into one.
AI settings

Add a Provider

  1. Click Add Provider… and pick a type: GitHub Copilot, Claude, OpenAI, OpenRouter, OpenCode Zen, Gemini, Ollama, or a custom OpenAI-compatible endpoint.
  2. Enter the API key, or run device-flow sign-in for Copilot.
  3. Enter a model name, or pick one from the fetched list. Click Reload if needed.
  4. Click Test Connection.
API keys are stored in the macOS Keychain. Ollama is detected at launch.

Active Provider

The active provider handles every AI request. Override it per turn from the model picker in the chat composer. Change the default from the Active Provider picker at the top of the AI tab.

GitHub Copilot

Add Copilot like any other provider. The detail sheet runs GitHub’s device-flow sign-in: enter the displayed code on github.com to authorize. The Copilot language server starts when you add a Copilot provider and stops when you remove it. Copilot supports tool calling through GitHub’s conversation/registerTools bridge. Tool calls go through the same approval flow as the other providers.

Apple Intelligence

On macOS 26 and later, Apple Intelligence runs on this Mac through the Foundation Models framework. It needs no API key and no network: your schema and queries stay on the device. It supports tool calling like the other providers. Apple Intelligence sits at the top of the provider list. On a fresh install it is the default provider when the on-device model is available. When it is not, the row explains why: the Mac is not eligible, Apple Intelligence is off in System Settings (with a button to open them), the model is still downloading, or the OS is older than macOS 26. It has one on-device model, so there is no model list and no reasoning or image options.

Chat

Press Cmd+Shift+L, click the inspector toggle and pick AI Chat, or use View > Toggle AI Chat. The right inspector has a Details / AI Chat segmented picker at the top.
AI chat panel
Type a question and press Return. Code blocks have Copy and Insert buttons. Insert opens the SQL in a new query tab, or fills the current editor if it’s empty. Token counts show below each response.
Code block actions
Token usage
Conversations auto-save and auto-title from your first message. The composer footer’s clock icon opens recent conversations and the pencil-and-square icon starts a new one.
Conversation history
Failed responses show Retry. Successful ones show Regenerate. Click Stop to cancel a streaming response.

Chat Modes (Ask / Edit / Agent)

The mode picker in the composer footer controls which tools the AI can call. The mode sticks across turns until you change it. New chats start in Ask.
ModeTools availableWhen to use
AskRead-only schema lookups: list_connections, get_connection_status, list_databases, list_schemas, list_tables, describe_table, get_table_ddl.Asking questions, exploring a database, drafting queries you’ll run yourself.
EditAll Ask tools, plus execute_query for SELECT, INSERT, UPDATE, DELETE. Destructive DDL (DROP, TRUNCATE, ALTER...DROP) stays blocked.Letting the AI run queries it proposes, e.g. “fetch the 5 most recent orders”.
AgentAll tools, plus confirm_destructive_operation for destructive DDL. Runs tools in a loop, up to 10 round trips per turn.Multi-step migrations, schema changes, larger refactors.
Mode and safe mode are independent gates. Picking Agent does not bypass safe mode: the write-confirm dialog still fires when safe mode is Confirm Writes or higher.

Tool Calling

In Edit and Agent modes, the AI can call tools to look up your database or run queries. Each tool call appears in the assistant’s reply as a card. For read-only tools, the call runs immediately. For write-side tools, the card shows three buttons:
  • Run: approve this single call.
  • Always for this connection: approve and add the tool to this connection’s whitelist (Connection.aiAlwaysAllowedTools). Future calls of the same tool on this connection skip the prompt.
  • Cancel: reject the call. The model gets an error result and continues.
Whitelists are per-tool and per-connection. They stick with the connection and sync via iCloud.
Per-card tool approval
If the connection’s safe-mode level is Silent, write tools auto-approve without prompting. If safe mode is Read Only, write tools auto-deny and the message tells you to raise the level. The tool call card expands to show the arguments and the response. Once the model is done calling tools, it streams the answer. The cap is 10 tool round trips per turn. If you hit it, send a follow-up to continue.
Streaming response

Available Tools

ToolPurposeAvailable in
list_connectionsList configured connectionsAsk, Edit, Agent
get_connection_statusConnection health and metadataAsk, Edit, Agent
list_databasesDatabases on the active connectionAsk, Edit, Agent
list_schemasSchemas in the active databaseAsk, Edit, Agent
list_tablesTables in a schemaAsk, Edit, Agent
describe_tableColumns, types, constraintsAsk, Edit, Agent
get_table_ddlCREATE TABLE statementAsk, Edit, Agent
execute_queryRun SELECT / INSERT / UPDATE / DELETE. Multi-statement input rejected. Destructive DDL blocked.Edit, Agent
confirm_destructive_operationRun destructive DDL after the model passes the verbatim phrase I understand this is irreversibleAgent
Provider support: Apple Intelligence (macOS 26+, on-device), Claude, OpenAI, OpenRouter, OpenCode Zen, Gemini, Ollama (model-dependent), GitHub Copilot, and custom OpenAI-compatible endpoints.

Attach Context with @

Type @ in the composer to anchor a picker at the caret. Pick from:
  • Schema: every table’s columns and foreign keys.
  • A specific Table: that table’s columns and foreign keys only.
  • Current Query: whatever’s in the active editor tab.
  • Query Results: the most recent query result snapshot.
  • Saved Query: pick one of your starred queries to send its name and SQL alongside the message.
Up/Down navigates, Return or Tab inserts, Escape dismisses. The @ button next to the composer opens the same picker as a menu. Attached items show as chips in the composer. Saved query chips resolve when you send, so the AI sees whatever’s in the saved query at send time, not when you attached it.

Slash Commands

Type / (or click the button next to the composer) to run a command. Built-ins:
  • /explain: explain the active query.
  • /optimize: suggest optimizations for the active query.
  • /fix: fix the last error against the active query.
  • /help: list the commands inline in the chat.

Custom Slash Commands

Add your own under Settings > AI > Custom Slash Commands. A command needs a name, an optional description, and a prompt template. Templates take these placeholders, substituted at send time:
  • {{query}}: the current editor query.
  • {{schema}}: the formatted schema for the active connection (capped by Max schema tables in AI settings).
  • {{database}}: the active database name.
  • {{body}}: text typed after the command. For example, /review WHERE clauses passes WHERE clauses as {{body}}.
Save needs a name and a non-empty template. Saved commands show up in the slash menu next to the built-ins.

Inline Model Picker

Next to the mode picker is a model picker (cpu icon) listing every configured provider and its models. Pick one to override the active provider for the current turn. The label shows your pick; clear it to fall back to the active provider. The override is per turn, not per chat. The next turn starts from the active provider unless you pick again.

Per-Connection AI Rules

Pin context to a connection so the AI sees it on every chat turn against that database. Open the connection’s edit form and pick AI Rules in the sidebar (sparkles icon). Rules are plain text. Use them for facts the schema does not show:
  • Table conventions: Tables prefixed with tmp_ are scratch and safe to ignore.
  • Join keys: users.email_hash is the join key, not users.email.
  • Soft deletes: Always filter orders by deleted_at IS NULL.
  • PII to avoid: Never select users.ssn or users.dob.
  • Business rules: Active accounts have status = 'active' AND verified_at IS NOT NULL.
The text is appended to the system prompt under a ## Connection-Specific Rules heading, after the schema and any attached context. Rules sync via iCloud, so they apply on every device tied to the connection.

Inline Suggestions

Toggle Enable inline suggestions while typing in the AI tab. The active provider drives suggestions. Press Tab to accept, Esc to dismiss. With Copilot active, suggestions come from Copilot’s inline-completion model. With any other active provider, suggestions come from chat completions.

Editor Actions

Right-click SQL in the editor for Explain with AI and Optimize with AI.
Editor context menu
Default shortcuts:
ActionShortcut
Toggle AI ChatCmd+Shift+L
Explain with AICmd+L
Optimize with AICmd+Option+L
Customize under Settings > Keyboard > AI.

Ask AI to Fix

Query error dialogs include an Ask AI to Fix button. It opens chat with the failed query and error pre-filled.
Ask AI to Fix

Context

Under Settings > AI > Context:
  • Include database schema (default off)
  • Include current query (default off)
  • Include query results (default off)
  • Max schema tables (default 20)
New installs default these toggles to off. The AI then only sees what you attach with @ mentions or what tool calls pull in. Turn the toggles on to auto-include context on every turn. Existing installs keep their previous values.

Privacy

Set a per-connection AI policy in the connection form: Use Default, Always Allow, Ask Each Time, or Never. New connections default to Ask Each Time.
Per-connection AI policy

External AI Clients

External clients (Raycast, Cursor, Claude Desktop, and other MCP clients) call the same AI tools through the External API. Two per-connection settings gate them:
  • AI policy decides whether the connection is reachable by AI clients at all. Never blocks every external AI tool call against this connection.
  • External Access caps the level: blocked, readOnly (default), or readWrite. A token’s effective permission is MIN(token.scope, connection.externalAccess). Set this in the connection form’s Advanced tab.
See Tokens for the scope model.