Help

Learn how to use SapientDB to manage your documents and collaborate with your team.

Editing Documents

Creating a Document

  1. Go to the Documents page from the sidebar
  2. Click the New Document button
  3. Enter a title for your document
  4. Start adding blocks to build your content

Editing the Title

Click on the document title at the top of the page to edit it. Press Enter to save or Esc to cancel.

Document Properties

Click the Properties button (or ) in the top right to open the properties panel where you can:

  • View document metadata (created date, word count, etc.)
  • Manage permissions and access control
  • Delete the document

Working with Blocks

Documents are made up of blocks. Each block is an independent unit of content that can be edited, reordered, searched, and have its own metadata.

Adding Blocks

Click Add block at the bottom of the document to add a new block. New blocks are added at the end by default.

Editing Blocks

Click on any block to start editing. The editor supports Markdown formatting:

  • **bold** or Cmd+B
  • *italic* or Cmd+I
  • `code` for inline code
  • [link](url) or Cmd+K
  • # Heading for headings
  • - item for bullet lists

Reordering Blocks

Hover over a block to reveal the drag handle () on the left. Drag and drop blocks to reorder them within the document.

Block Actions

Hover over a block to reveal action buttons on the right:

  • — Open block properties (metadata, tags)
  • — Toggle raw Markdown view
  • — Delete block

Permissions

Each document has an owner and can have custom access controls. Open the document properties panel to manage permissions.

  • Owner — Full control, can delete and manage permissions
  • Read — Can view the document and its blocks
  • Write — Can edit blocks and document content
  • Admin — Can manage permissions (but not delete)

Collections & Teams

Collections are shared containers for documents. Use the dropdown in the sidebar to switch between collections. Go to Team to manage your collection members and roles.

Note: Most team management features (inviting members, managing roles, service accounts) are only visible to collection admins.

Inviting Team Members

(Admin only)

  1. Go to Team from the sidebar
  2. In the Invite Members section, enter an email address
  3. Optionally select a role to assign them
  4. Choose whether to grant admin privileges
  5. Click Send Invitation

The invitee will receive an email with a link to join. Pending invitations appear in the Pending Invitations section and can be revoked before they're accepted.

Managing Members

(Admin only)

In Team → Team Members, admins can manage existing team members:

  • Toggle Admin — Admins can invite/remove members and manage roles
  • Assign Roles — Click on a member to assign or remove roles
  • Remove Member — Remove someone's access to the collection

Creating Roles

(Admin only)

Roles let you group permissions and assign them to multiple users. To create a role:

  1. Go to Team → Roles
  2. Click Create Role
  3. Enter a name (e.g., "Editors", "Reviewers", "Engineering")
  4. Optionally add a description
  5. Click Create

Using Roles for Permissions

Once you've created roles and assigned members to them, you can use roles in document permissions:

  1. Open a document and click Properties
  2. In the Permissions section, you'll see access levels (Read, Write, Admin)
  3. Add roles to each access level to grant that permission to all role members

Example: Add the "Editors" role to Write access, and all members with that role can edit the document.

Assigning Roles to Members

(Admin only)

There are two ways to assign roles:

  • From Members — Click a member in Team → Team Members, then select roles to assign
  • From Roles — Click a role in Team → Roles, then add members to that role

Account Settings

Your personal account settings are separate from collection settings. Access them via Account in the sidebar.

Profile

View your email address and user ID. These are managed through your authentication provider.

Change Password

Update your password from the Account page. Passwords must be at least 8 characters. After changing your password, you'll remain signed in on this device.

Keyboard Shortcuts

Esc
Close panels and dialogs
Enter
Save when editing titles
Cmd+B
Bold text in editor
Cmd+I
Italic text in editor
Cmd+K
Add link in editor

MCP Server

SapientDB includes an MCP (Model Context Protocol) server that allows AI assistants like Claude to read, write, and search your documents programmatically.

Available Tools

  • list_documents — List documents in a collection
  • get_document — Get document metadata
  • create_document — Create a new document
  • update_document — Update document title/metadata
  • list_blocks — List blocks in a document
  • get_block — Get a specific block
  • create_block — Add a new block
  • update_block — Edit block content
  • delete_block — Remove a block
  • search_blocks — Full-text search with filters
  • search_documents — Search documents by title
  • get_permissions — Get document/block ACL
  • set_permissions — Update access control

Configuration

To use the MCP server with Claude Desktop, add it to your configuration:

{
  "mcpServers": {
    "sapientdb": {
      "command": "sapientdb-mcp",
      "env": {
        "DATABASE_URL": "your-database-url",
        "SUPABASE_JWT_SECRET": "your-jwt-secret"
      }
    }
  }
}

Authentication

All MCP tools require an authorization parameter with a valid JWT or service account API key. Create service accounts from the Team page (admin only).

API Access

Service Accounts

(Admin only)

Service accounts are ideal for automated systems and integrations. Create them from Team → Service Accounts.

  • Each service account gets a unique API key
  • Assign a role to control permissions
  • Set expiration dates for security
  • Rotate keys without recreating the account

Personal Access Tokens

PATs allow you to authenticate as yourself from scripts or tools. They inherit your collection memberships and permissions. PAT format: pat_XXXXXXXX_...

Need More Help?

For questions, bug reports, or feature requests, please contact your collection administrator or reach out to the development team.