---
name: brain
displayName: Cortex
description: Full reference for the Cortex workspace. Use it to create, query or change databases, rows, docs, folders, skills and integrations through the brain_* MCP tools.
type: general
version: 1.0.0
tags: [mcp, reference]
---

# Cortex reference

Workspaces hold folders, docs (rich text), databases (typed columns, rows, views) and skills (SKILL.md prompts). Every tool below runs as you, with your permissions.

## Common flows
- Make a database: brain_create_database (pass properties to add columns in one call), then brain_bulk_create_pages.
- Query: brain_list_pages with filters [{ property, op, value }] and sorts [{ property, direction }].
- Write a doc: brain_create_doc with markdown content; brain_append_doc_content to add to it.

## Tools

### `brain_list_workspaces`

List the workspaces you belong to, with your role in each.

```json
{
 "type": "object",
 "properties": {},
 "additionalProperties": false
}
```

### `brain_create_workspace`

Create a new workspace. You become its owner. Returns workspace.

```json
{
 "type": "object",
 "properties": {
  "name": {
   "type": "string",
   "minLength": 1,
   "maxLength": 80
  }
 },
 "required": [
  "name"
 ],
 "additionalProperties": false
}
```

### `brain_get_workspace_settings`

Read the current workspace: name, icon, plan, credit balance and conventions.

```json
{
 "type": "object",
 "properties": {},
 "additionalProperties": false
}
```

### `brain_update_workspace_settings`

Rename the workspace or change its icon. Owner or admin only.

```json
{
 "type": "object",
 "properties": {
  "name": {
   "type": "string",
   "minLength": 1,
   "maxLength": 80
  },
  "icon": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 8
    },
    {
     "type": "null"
    }
   ]
  }
 },
 "additionalProperties": false
}
```

### `brain_set_workspace_conventions`

Replace the workspace conventions: free text every AI chat and agent reads as standing instructions.

```json
{
 "type": "object",
 "properties": {
  "conventions": {
   "type": "string",
   "maxLength": 20000
  }
 },
 "required": [
  "conventions"
 ],
 "additionalProperties": false
}
```

### `brain_list_members`

List workspace members with name, email and role.

```json
{
 "type": "object",
 "properties": {},
 "additionalProperties": false
}
```

### `brain_invite_user`

Invite someone by email. Existing users are added right away; new ones join on signup. Collaborators are free.

```json
{
 "type": "object",
 "properties": {
  "email": {
   "type": "string",
   "format": "email",
   "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
  },
  "role": {
   "default": "member",
   "type": "string",
   "enum": [
    "admin",
    "member",
    "guest"
   ]
  }
 },
 "required": [
  "email",
  "role"
 ],
 "additionalProperties": false
}
```

### `brain_update_member_role`

Change a member's role. Owner only.

```json
{
 "type": "object",
 "properties": {
  "userId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "role": {
   "type": "string",
   "enum": [
    "admin",
    "member",
    "guest"
   ]
  }
 },
 "required": [
  "userId",
  "role"
 ],
 "additionalProperties": false
}
```

### `brain_remove_member`

Remove a member from the workspace. Owner or admin only.

```json
{
 "type": "object",
 "properties": {
  "userId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "userId"
 ],
 "additionalProperties": false
}
```

### `brain_list_children`

The sidebar tree: every folder, doc, database and site you can see, flat with parentId. Optionally only the children of one node.

```json
{
 "type": "object",
 "properties": {
  "parentId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "additionalProperties": false
}
```

### `brain_create_folder`

Create a folder in the sidebar. section is private (only you) or workspace (everyone). Returns node.

```json
{
 "type": "object",
 "properties": {
  "title": {
   "default": "New folder",
   "type": "string",
   "maxLength": 200
  },
  "parentId": {
   "anyOf": [
    {
     "type": "string",
     "format": "uuid",
     "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    {
     "type": "null"
    }
   ]
  },
  "section": {
   "type": "string",
   "enum": [
    "private",
    "workspace"
   ]
  },
  "icon": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 8
    },
    {
     "type": "null"
    }
   ]
  }
 },
 "required": [
  "title"
 ],
 "additionalProperties": false
}
```

### `brain_create_doc`

Create a standalone doc. content can be markdown or Tiptap JSON. Returns node.

```json
{
 "type": "object",
 "properties": {
  "title": {
   "default": "",
   "type": "string",
   "maxLength": 300
  },
  "parentId": {
   "anyOf": [
    {
     "type": "string",
     "format": "uuid",
     "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    {
     "type": "null"
    }
   ]
  },
  "section": {
   "type": "string",
   "enum": [
    "private",
    "workspace"
   ]
  },
  "icon": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 8
    },
    {
     "type": "null"
    }
   ]
  },
  "content": {
   "description": "Tiptap JSON, or a markdown string (headings, bullets, - [ ] tasks, paragraphs)",
   "anyOf": [
    {
     "type": "object",
     "propertyNames": {
      "type": "string"
     },
     "additionalProperties": {}
    },
    {
     "type": "string"
    }
   ]
  }
 },
 "required": [
  "title"
 ],
 "additionalProperties": false
}
```

### `brain_get_doc`

Read a doc: title, icon, Tiptap JSON content and a plain-text rendering.

```json
{
 "type": "object",
 "properties": {
  "docId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "docId"
 ],
 "additionalProperties": false
}
```

### `brain_update_doc`

Update a doc or any sidebar item: title, icon, content (markdown or Tiptap JSON).

```json
{
 "type": "object",
 "properties": {
  "docId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "title": {
   "type": "string",
   "maxLength": 300
  },
  "icon": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 8
    },
    {
     "type": "null"
    }
   ]
  },
  "content": {
   "description": "Tiptap JSON, or a markdown string (headings, bullets, - [ ] tasks, paragraphs)",
   "anyOf": [
    {
     "type": "object",
     "propertyNames": {
      "type": "string"
     },
     "additionalProperties": {}
    },
    {
     "type": "string"
    }
   ]
  }
 },
 "required": [
  "docId"
 ],
 "additionalProperties": false
}
```

### `brain_append_doc_content`

Append markdown to the end of a doc.

```json
{
 "type": "object",
 "properties": {
  "docId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "markdown": {
   "type": "string"
  }
 },
 "required": [
  "docId",
  "markdown"
 ],
 "additionalProperties": false
}
```

### `brain_move_item`

Move a sidebar item under another folder/doc (parentId null = top level) and/or between Private and Workspace. position orders siblings.

```json
{
 "type": "object",
 "properties": {
  "itemId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "parentId": {
   "anyOf": [
    {
     "type": "string",
     "format": "uuid",
     "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    {
     "type": "null"
    }
   ]
  },
  "section": {
   "type": "string",
   "enum": [
    "private",
    "workspace"
   ]
  },
  "position": {
   "type": "number"
  }
 },
 "required": [
  "itemId"
 ],
 "additionalProperties": false
}
```

### `brain_delete_item`

Move a doc, folder, database or site to the trash (restorable).

```json
{
 "type": "object",
 "properties": {
  "itemId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "itemId"
 ],
 "additionalProperties": false
}
```

### `brain_list_trash`

List items in the trash that you can restore.

```json
{
 "type": "object",
 "properties": {},
 "additionalProperties": false
}
```

### `brain_restore_item`

Restore an item from the trash.

```json
{
 "type": "object",
 "properties": {
  "itemId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "itemId"
 ],
 "additionalProperties": false
}
```

### `brain_delete_permanently`

Delete a trashed item and everything inside it forever. Irreversible.

```json
{
 "type": "object",
 "properties": {
  "itemId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "itemId"
 ],
 "additionalProperties": false
}
```

### `brain_set_favorite`

Add or remove a sidebar item from your favorites.

```json
{
 "type": "object",
 "properties": {
  "itemId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "favorite": {
   "type": "boolean"
  }
 },
 "required": [
  "itemId",
  "favorite"
 ],
 "additionalProperties": false
}
```

### `brain_list_doc_versions`

List saved versions of a doc, newest first.

```json
{
 "type": "object",
 "properties": {
  "docId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "docId"
 ],
 "additionalProperties": false
}
```

### `brain_restore_doc_version`

Restore a doc to a saved version. The current content is saved as a version first.

```json
{
 "type": "object",
 "properties": {
  "docId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "versionId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "docId",
  "versionId"
 ],
 "additionalProperties": false
}
```

### `brain_create_database`

Create a database. A title column called Name and a default table view are created for you. Optionally pass properties to create columns in one go.

```json
{
 "type": "object",
 "properties": {
  "name": {
   "default": "Untitled database",
   "type": "string",
   "maxLength": 200
  },
  "parentId": {
   "anyOf": [
    {
     "type": "string",
     "format": "uuid",
     "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    {
     "type": "null"
    }
   ]
  },
  "section": {
   "type": "string",
   "enum": [
    "private",
    "workspace"
   ]
  },
  "icon": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 8
    },
    {
     "type": "null"
    }
   ]
  },
  "titleName": {
   "default": "Name",
   "type": "string"
  },
  "properties": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "name": {
      "type": "string"
     },
     "type": {
      "type": "string",
      "enum": [
       "title",
       "text",
       "number",
       "select",
       "multi_select",
       "status",
       "date",
       "checkbox",
       "url",
       "email",
       "phone",
       "relation",
       "lookup",
       "rollup",
       "formula",
       "created_time",
       "last_edited_time",
       "created_by",
       "last_edited_by",
       "files",
       "person",
       "property_last_edited_time",
       "property_last_edited_by"
      ]
     },
     "config": {
      "type": "object",
      "propertyNames": {
       "type": "string"
      },
      "additionalProperties": {}
     }
    },
    "required": [
     "name",
     "type"
    ],
    "additionalProperties": false
   }
  }
 },
 "required": [
  "name",
  "titleName"
 ],
 "additionalProperties": false
}
```

### `brain_list_databases`

List every database you can see, with id, name and row count.

```json
{
 "type": "object",
 "properties": {},
 "additionalProperties": false
}
```

### `brain_get_database`

Read a database's schema: columns (id, name, type, config) and views.

```json
{
 "type": "object",
 "properties": {
  "databaseId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "databaseId"
 ],
 "additionalProperties": false
}
```

### `brain_update_database`

Rename a database or change its icon or description.

```json
{
 "type": "object",
 "properties": {
  "databaseId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "name": {
   "type": "string",
   "maxLength": 200
  },
  "icon": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 8
    },
    {
     "type": "null"
    }
   ]
  },
  "description": {
   "type": "string"
  }
 },
 "required": [
  "databaseId"
 ],
 "additionalProperties": false
}
```

### `brain_create_property`

Add a column. Types: title, text, number, select, multi_select, status, date, checkbox, url, email, phone, relation, lookup, rollup, formula, created_time, last_edited_time, created_by, last_edited_by, files, person, property_last_edited_time, property_last_edited_by. select/multi_select/status: config.options [{label, color}]. relation: config.relatedDatabaseId, config.twoWay (default true), config.inverseName. lookup/rollup: config.relationPropertyId + config.targetPropertyId (+ config.aggregation for rollup: count_all, count_values, count_unique, count_empty, count_not_empty, percent_empty, percent_not_empty, sum, average, median, min, max, range). formula: config.expression, e.g. prop("Amount") * 2. number: config.format (number, dollar, euro, percent).

```json
{
 "type": "object",
 "properties": {
  "databaseId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "name": {
   "type": "string",
   "minLength": 1,
   "maxLength": 200
  },
  "type": {
   "type": "string",
   "enum": [
    "title",
    "text",
    "number",
    "select",
    "multi_select",
    "status",
    "date",
    "checkbox",
    "url",
    "email",
    "phone",
    "relation",
    "lookup",
    "rollup",
    "formula",
    "created_time",
    "last_edited_time",
    "created_by",
    "last_edited_by",
    "files",
    "person",
    "property_last_edited_time",
    "property_last_edited_by"
   ]
  },
  "description": {
   "type": "string"
  },
  "config": {
   "type": "object",
   "propertyNames": {
    "type": "string"
   },
   "additionalProperties": {}
  }
 },
 "required": [
  "databaseId",
  "name",
  "type"
 ],
 "additionalProperties": false
}
```

### `brain_update_property`

Update a column: name, description, type (converting values where possible), config (merged). Use config.options to replace select options, config.expression for formulas.

```json
{
 "type": "object",
 "properties": {
  "propertyId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "name": {
   "type": "string",
   "minLength": 1,
   "maxLength": 200
  },
  "description": {
   "type": [
    "string",
    "null"
   ]
  },
  "type": {
   "type": "string",
   "enum": [
    "title",
    "text",
    "number",
    "select",
    "multi_select",
    "status",
    "date",
    "checkbox",
    "url",
    "email",
    "phone",
    "relation",
    "lookup",
    "rollup",
    "formula",
    "created_time",
    "last_edited_time",
    "created_by",
    "last_edited_by",
    "files",
    "person",
    "property_last_edited_time",
    "property_last_edited_by"
   ]
  },
  "config": {
   "type": "object",
   "propertyNames": {
    "type": "string"
   },
   "additionalProperties": {}
  }
 },
 "required": [
  "propertyId"
 ],
 "additionalProperties": false
}
```

### `brain_delete_property`

Delete a column and its values. Irreversible. The title column can't be deleted.

```json
{
 "type": "object",
 "properties": {
  "propertyId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "propertyId"
 ],
 "additionalProperties": false
}
```

### `brain_duplicate_property`

Copy a column (definition and values) next to the original.

```json
{
 "type": "object",
 "properties": {
  "propertyId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "propertyId"
 ],
 "additionalProperties": false
}
```

### `brain_reorder_properties`

Set column order by passing every property id in the new order.

```json
{
 "type": "object",
 "properties": {
  "databaseId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "propertyIds": {
   "type": "array",
   "items": {
    "type": "string",
    "format": "uuid",
    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
   }
  }
 },
 "required": [
  "databaseId",
  "propertyIds"
 ],
 "additionalProperties": false
}
```

### `brain_set_property_locked`

Lock or unlock a column. A locked column can't be edited by anyone, people or agents. Owner only.

```json
{
 "type": "object",
 "properties": {
  "propertyId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "isLocked": {
   "type": "boolean"
  }
 },
 "required": [
  "propertyId",
  "isLocked"
 ],
 "additionalProperties": false
}
```

### `brain_rename_property_option`

Rename a select/multi_select/status option and update every row that holds it.

```json
{
 "type": "object",
 "properties": {
  "propertyId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "oldValue": {
   "type": "string"
  },
  "newValue": {
   "type": "string",
   "minLength": 1
  }
 },
 "required": [
  "propertyId",
  "oldValue",
  "newValue"
 ],
 "additionalProperties": false
}
```

### `brain_delete_property_option`

Delete a select/multi_select/status option and remove it from every row.

```json
{
 "type": "object",
 "properties": {
  "propertyId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "value": {
   "type": "string"
  }
 },
 "required": [
  "propertyId",
  "value"
 ],
 "additionalProperties": false
}
```

### `brain_set_property_option_color`

Set the colour of a select/multi_select/status option. Colours: default, gray, brown, orange, yellow, green, blue, purple, pink, red, cyan.

```json
{
 "type": "object",
 "properties": {
  "propertyId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "value": {
   "type": "string"
  },
  "color": {
   "type": "string",
   "enum": [
    "default",
    "gray",
    "brown",
    "orange",
    "yellow",
    "green",
    "blue",
    "purple",
    "pink",
    "red",
    "cyan"
   ]
  }
 },
 "required": [
  "propertyId",
  "value",
  "color"
 ],
 "additionalProperties": false
}
```

### `brain_list_pages`

Query rows of a database with filters, sorts, free-text search and paging. Filters: [{ property, op, value }], ops: equals, not_equals, contains, not_contains, starts_with, ends_with, is_empty, is_not_empty, gt, gte, lt, lte, before, after, checked, unchecked, past_week, next_week, this_month.

```json
{
 "type": "object",
 "properties": {
  "databaseId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "viewId": {
   "description": "Apply a saved view's filters and sorts",
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "filters": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "property": {
      "type": "string",
      "description": "Property id or name"
     },
     "op": {
      "type": "string",
      "enum": [
       "equals",
       "not_equals",
       "contains",
       "not_contains",
       "starts_with",
       "ends_with",
       "is_empty",
       "is_not_empty",
       "gt",
       "gte",
       "lt",
       "lte",
       "before",
       "after",
       "on_or_before",
       "on_or_after",
       "checked",
       "unchecked",
       "past_week",
       "next_week",
       "this_month"
      ]
     },
     "value": {}
    },
    "required": [
     "property",
     "op"
    ],
    "additionalProperties": false
   }
  },
  "filterMode": {
   "type": "string",
   "enum": [
    "and",
    "or"
   ]
  },
  "sorts": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "property": {
      "type": "string"
     },
     "direction": {
      "default": "asc",
      "type": "string",
      "enum": [
       "asc",
       "desc"
      ]
     }
    },
    "required": [
     "property",
     "direction"
    ],
    "additionalProperties": false
   }
  },
  "search": {
   "type": "string"
  },
  "limit": {
   "type": "integer",
   "minimum": 1,
   "maximum": 2000
  },
  "cursor": {
   "type": "integer",
   "minimum": 0,
   "maximum": 9007199254740991
  },
  "format": {
   "default": "names",
   "description": "names: properties keyed by column name (default). ids: values keyed by property id",
   "type": "string",
   "enum": [
    "ids",
    "names"
   ]
  }
 },
 "required": [
  "databaseId",
  "format"
 ],
 "additionalProperties": false
}
```

### `brain_count_pages`

Count rows in a database, optionally filtered.

```json
{
 "type": "object",
 "properties": {
  "databaseId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "filters": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "property": {
      "type": "string",
      "description": "Property id or name"
     },
     "op": {
      "type": "string",
      "enum": [
       "equals",
       "not_equals",
       "contains",
       "not_contains",
       "starts_with",
       "ends_with",
       "is_empty",
       "is_not_empty",
       "gt",
       "gte",
       "lt",
       "lte",
       "before",
       "after",
       "on_or_before",
       "on_or_after",
       "checked",
       "unchecked",
       "past_week",
       "next_week",
       "this_month"
      ]
     },
     "value": {}
    },
    "required": [
     "property",
     "op"
    ],
    "additionalProperties": false
   }
  }
 },
 "required": [
  "databaseId"
 ],
 "additionalProperties": false
}
```

### `brain_create_page`

Add a row to a database. properties keyed by column name. New select options are created automatically. content is the row's body (markdown).

```json
{
 "type": "object",
 "properties": {
  "databaseId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "properties": {
   "default": {},
   "type": "object",
   "propertyNames": {
    "type": "string"
   },
   "additionalProperties": {},
   "description": "Values keyed by column name or id, e.g. { \"Name\": \"Acme\", \"Amount\": 1200, \"Status\": \"Late\" }"
  },
  "content": {
   "type": "string"
  },
  "icon": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 8
    },
    {
     "type": "null"
    }
   ]
  },
  "format": {
   "default": "names",
   "description": "names: properties keyed by column name (default). ids: values keyed by property id",
   "type": "string",
   "enum": [
    "ids",
    "names"
   ]
  }
 },
 "required": [
  "databaseId",
  "properties",
  "format"
 ],
 "additionalProperties": false
}
```

### `brain_get_page`

Read one row with all its values (including computed ones) and its body text.

```json
{
 "type": "object",
 "properties": {
  "pageId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "format": {
   "default": "names",
   "description": "names: properties keyed by column name (default). ids: values keyed by property id",
   "type": "string",
   "enum": [
    "ids",
    "names"
   ]
  }
 },
 "required": [
  "pageId",
  "format"
 ],
 "additionalProperties": false
}
```

### `brain_update_page`

Update a row's values (keyed by column name or id), icon, or body. Pass null to clear a value.

```json
{
 "type": "object",
 "properties": {
  "pageId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "properties": {
   "type": "object",
   "propertyNames": {
    "type": "string"
   },
   "additionalProperties": {},
   "description": "Values keyed by column name or id, e.g. { \"Name\": \"Acme\", \"Amount\": 1200, \"Status\": \"Late\" }"
  },
  "content": {
   "description": "Markdown or Tiptap JSON body",
   "anyOf": [
    {
     "type": "string"
    },
    {
     "type": "object",
     "propertyNames": {
      "type": "string"
     },
     "additionalProperties": {}
    }
   ]
  },
  "icon": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 8
    },
    {
     "type": "null"
    }
   ]
  },
  "format": {
   "default": "names",
   "description": "names: properties keyed by column name (default). ids: values keyed by property id",
   "type": "string",
   "enum": [
    "ids",
    "names"
   ]
  }
 },
 "required": [
  "pageId",
  "format"
 ],
 "additionalProperties": false
}
```

### `brain_update_cell`

Set one cell. property is a column name or id.

```json
{
 "type": "object",
 "properties": {
  "pageId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "property": {
   "type": "string"
  },
  "value": {}
 },
 "required": [
  "pageId",
  "property",
  "value"
 ],
 "additionalProperties": false
}
```

### `brain_bulk_update_rows`

Update many rows at once: [{ pageId, properties }].

```json
{
 "type": "object",
 "properties": {
  "updates": {
   "maxItems": 500,
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "pageId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
     },
     "properties": {
      "type": "object",
      "propertyNames": {
       "type": "string"
      },
      "additionalProperties": {},
      "description": "Values keyed by column name or id, e.g. { \"Name\": \"Acme\", \"Amount\": 1200, \"Status\": \"Late\" }"
     }
    },
    "required": [
     "pageId",
     "properties"
    ],
    "additionalProperties": false
   }
  }
 },
 "required": [
  "updates"
 ],
 "additionalProperties": false
}
```

### `brain_bulk_create_pages`

Add many rows at once (up to 1000).

```json
{
 "type": "object",
 "properties": {
  "databaseId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "rows": {
   "maxItems": 1000,
   "type": "array",
   "items": {
    "type": "object",
    "propertyNames": {
     "type": "string"
    },
    "additionalProperties": {},
    "description": "Values keyed by column name or id, e.g. { \"Name\": \"Acme\", \"Amount\": 1200, \"Status\": \"Late\" }"
   }
  }
 },
 "required": [
  "databaseId",
  "rows"
 ],
 "additionalProperties": false
}
```

### `brain_delete_page`

Move a row to the trash.

```json
{
 "type": "object",
 "properties": {
  "pageId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "pageId"
 ],
 "additionalProperties": false
}
```

### `brain_bulk_delete_pages`

Move many rows to the trash.

```json
{
 "type": "object",
 "properties": {
  "pageIds": {
   "maxItems": 1000,
   "type": "array",
   "items": {
    "type": "string",
    "format": "uuid",
    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
   }
  }
 },
 "required": [
  "pageIds"
 ],
 "additionalProperties": false
}
```

### `brain_restore_page`

Restore a trashed row.

```json
{
 "type": "object",
 "properties": {
  "pageId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "pageId"
 ],
 "additionalProperties": false
}
```

### `brain_duplicate_page`

Copy a row (values and body).

```json
{
 "type": "object",
 "properties": {
  "pageId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "pageId"
 ],
 "additionalProperties": false
}
```

### `brain_move_page`

Reorder a row by setting its position (rows sort by position when a view has no sort).

```json
{
 "type": "object",
 "properties": {
  "pageId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "position": {
   "type": "number"
  }
 },
 "required": [
  "pageId",
  "position"
 ],
 "additionalProperties": false
}
```

### `brain_create_view`

Add a view to a database. type: table, board, list, calendar, gallery, timeline. config: { filters, filterMode, sorts, groupBy (property id, required for board), visible (property ids), dateProperty (calendar/timeline), endDateProperty (timeline), cardCover }.

```json
{
 "type": "object",
 "properties": {
  "databaseId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "name": {
   "type": "string",
   "maxLength": 100
  },
  "type": {
   "default": "table",
   "type": "string",
   "enum": [
    "table",
    "board",
    "list",
    "calendar",
    "gallery",
    "timeline"
   ]
  },
  "config": {
   "type": "object",
   "propertyNames": {
    "type": "string"
   },
   "additionalProperties": {}
  },
  "private": {
   "type": "boolean"
  }
 },
 "required": [
  "databaseId",
  "name",
  "type"
 ],
 "additionalProperties": false
}
```

### `brain_update_view`

Update a view: name, type, config (merged).

```json
{
 "type": "object",
 "properties": {
  "viewId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "name": {
   "type": "string",
   "maxLength": 100
  },
  "type": {
   "type": "string",
   "enum": [
    "table",
    "board",
    "list",
    "calendar",
    "gallery",
    "timeline"
   ]
  },
  "config": {
   "type": "object",
   "propertyNames": {
    "type": "string"
   },
   "additionalProperties": {}
  }
 },
 "required": [
  "viewId"
 ],
 "additionalProperties": false
}
```

### `brain_delete_view`

Delete a view. A database keeps at least one view.

```json
{
 "type": "object",
 "properties": {
  "viewId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "viewId"
 ],
 "additionalProperties": false
}
```

### `brain_list_views`

List a database's views.

```json
{
 "type": "object",
 "properties": {
  "databaseId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "databaseId"
 ],
 "additionalProperties": false
}
```

### `brain_create_template`

Save a row template for a database: preset values and body. isDefault applies it to every new row.

```json
{
 "type": "object",
 "properties": {
  "databaseId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "name": {
   "type": "string"
  },
  "properties": {
   "default": {},
   "type": "object",
   "propertyNames": {
    "type": "string"
   },
   "additionalProperties": {},
   "description": "Values keyed by column name or id, e.g. { \"Name\": \"Acme\", \"Amount\": 1200, \"Status\": \"Late\" }"
  },
  "content": {
   "type": "string"
  },
  "isDefault": {
   "default": false,
   "type": "boolean"
  }
 },
 "required": [
  "databaseId",
  "name",
  "properties",
  "isDefault"
 ],
 "additionalProperties": false
}
```

### `brain_list_templates`

List a database's row templates.

```json
{
 "type": "object",
 "properties": {
  "databaseId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "databaseId"
 ],
 "additionalProperties": false
}
```

### `brain_apply_template`

Create a new row from a template.

```json
{
 "type": "object",
 "properties": {
  "templateId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "templateId"
 ],
 "additionalProperties": false
}
```

### `brain_delete_template`

Delete a row template.

```json
{
 "type": "object",
 "properties": {
  "templateId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "templateId"
 ],
 "additionalProperties": false
}
```

### `brain_duplicate_database`

Copy a database: schema, views and (optionally) rows.

```json
{
 "type": "object",
 "properties": {
  "databaseId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "withRows": {
   "default": true,
   "type": "boolean"
  }
 },
 "required": [
  "databaseId",
  "withRows"
 ],
 "additionalProperties": false
}
```

### `brain_search_workspace`

Full-text search across docs, databases, folders, sites and database rows you can see.

```json
{
 "type": "object",
 "properties": {
  "query": {
   "type": "string",
   "minLength": 1
  },
  "limit": {
   "default": 20,
   "type": "integer",
   "minimum": 1,
   "maximum": 50
  }
 },
 "required": [
  "query",
  "limit"
 ],
 "additionalProperties": false
}
```

### `brain_list_activity`

Recent activity in the workspace: who created, changed or deleted what.

```json
{
 "type": "object",
 "properties": {
  "limit": {
   "default": 50,
   "type": "integer",
   "minimum": 1,
   "maximum": 200
  }
 },
 "required": [
  "limit"
 ],
 "additionalProperties": false
}
```

### `brain_list_credential_providers`

The services you can connect from Integrations, with what secret each needs.

```json
{
 "type": "object",
 "properties": {},
 "additionalProperties": false
}
```

### `brain_list_credentials`

Integrations you can use: your own plus ones shared with the whole workspace. Secrets are never returned.

```json
{
 "type": "object",
 "properties": {
  "category": {
   "type": "string"
  }
 },
 "additionalProperties": false
}
```

### `brain_create_credential`

Connect a service with a pasted secret: an LLM key (anthropic, openai, google, xai), gmail, smtp, slack, telegram, notion, or http (any API). ChatGPT and SuperGrok subscriptions use brain_start_subscription_login instead. scope only_me keeps it private; workspace lets everyone's chats and agents use it.

```json
{
 "type": "object",
 "properties": {
  "provider": {
   "type": "string"
  },
  "label": {
   "type": "string",
   "maxLength": 100
  },
  "secret": {
   "type": "string",
   "minLength": 1
  },
  "scope": {
   "default": "only_me",
   "type": "string",
   "enum": [
    "only_me",
    "workspace"
   ]
  },
  "meta": {
   "default": {},
   "type": "object",
   "propertyNames": {
    "type": "string"
   },
   "additionalProperties": {}
  },
  "skipTest": {
   "default": false,
   "type": "boolean"
  }
 },
 "required": [
  "provider",
  "secret",
  "scope",
  "meta",
  "skipTest"
 ],
 "additionalProperties": false
}
```

### `brain_start_subscription_login`

Start connecting a ChatGPT or SuperGrok subscription so chats and agents run on the person's own plan instead of an API key or workspace credits. Returns a URL and a short code for the person to approve; then call brain_finish_subscription_login every `interval` seconds with the loginToken.

```json
{
 "type": "object",
 "properties": {
  "provider": {
   "type": "string",
   "enum": [
    "chatgpt",
    "supergrok"
   ]
  }
 },
 "required": [
  "provider"
 ],
 "additionalProperties": false
}
```

### `brain_finish_subscription_login`

Check a subscription sign-in started with brain_start_subscription_login. Returns status pending until the person approves the code, then connects the subscription and returns it.

```json
{
 "type": "object",
 "properties": {
  "provider": {
   "type": "string",
   "enum": [
    "chatgpt",
    "supergrok"
   ]
  },
  "loginToken": {
   "type": "string",
   "minLength": 1
  },
  "label": {
   "type": "string",
   "maxLength": 100
  },
  "scope": {
   "default": "only_me",
   "type": "string",
   "enum": [
    "only_me",
    "workspace"
   ]
  },
  "defaultModel": {
   "type": "string",
   "maxLength": 100
  }
 },
 "required": [
  "provider",
  "loginToken",
  "scope"
 ],
 "additionalProperties": false
}
```

### `brain_update_credential`

Rename an integration, change who can use it, update its settings, or rotate its secret.

```json
{
 "type": "object",
 "properties": {
  "credentialId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "label": {
   "type": "string",
   "maxLength": 100
  },
  "scope": {
   "type": "string",
   "enum": [
    "only_me",
    "workspace"
   ]
  },
  "meta": {
   "type": "object",
   "propertyNames": {
    "type": "string"
   },
   "additionalProperties": {}
  },
  "secret": {
   "type": "string",
   "minLength": 1
  }
 },
 "required": [
  "credentialId"
 ],
 "additionalProperties": false
}
```

### `brain_set_credential_sharing`

Share an integration with the whole workspace, or make it only yours.

```json
{
 "type": "object",
 "properties": {
  "credentialId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "scope": {
   "type": "string",
   "enum": [
    "only_me",
    "workspace"
   ]
  }
 },
 "required": [
  "credentialId",
  "scope"
 ],
 "additionalProperties": false
}
```

### `brain_delete_credential`

Disconnect an integration. Agents that use it will fail until it is reconnected.

```json
{
 "type": "object",
 "properties": {
  "credentialId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "credentialId"
 ],
 "additionalProperties": false
}
```

### `brain_list_skills`

List skills: workspace (yours), installed (from the marketplace), system (built in), or marketplace (public skills you can install).

```json
{
 "type": "object",
 "properties": {
  "tab": {
   "default": "usable",
   "type": "string",
   "enum": [
    "usable",
    "workspace",
    "installed",
    "system",
    "marketplace"
   ]
  }
 },
 "required": [
  "tab"
 ],
 "additionalProperties": false
}
```

### `brain_get_skill`

Read a skill, including its body and SKILL.md source.

```json
{
 "type": "object",
 "properties": {
  "skillId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "skillId"
 ],
 "additionalProperties": false
}
```

### `brain_create_skill`

Create a workspace skill, either from a full SKILL.md file (skillMd) or from fields. It becomes an MCP prompt and a / command in chat.

```json
{
 "type": "object",
 "properties": {}
}
```

### `brain_update_skill`

Edit a workspace skill. Pass skillMd to replace it wholesale, or individual fields.

```json
{
 "type": "object",
 "properties": {
  "skillId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "skillMd": {
   "type": "string"
  },
  "name": {
   "type": "string",
   "maxLength": 64,
   "pattern": "^[a-z0-9][a-z0-9-]*$"
  },
  "displayName": {
   "type": "string",
   "maxLength": 100
  },
  "description": {
   "type": "string",
   "maxLength": 500
  },
  "type": {
   "default": "general",
   "type": "string",
   "enum": [
    "general",
    "editor"
   ]
  },
  "version": {
   "default": "1.0.0",
   "type": "string"
  },
  "tags": {
   "default": [],
   "type": "array",
   "items": {
    "type": "string"
   }
  },
  "body": {
   "type": "string",
   "maxLength": 100000
  }
 },
 "required": [
  "skillId"
 ],
 "additionalProperties": false
}
```

### `brain_delete_skill`

Delete a workspace skill or uninstall an installed one.

```json
{
 "type": "object",
 "properties": {
  "skillId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "skillId"
 ],
 "additionalProperties": false
}
```

### `brain_set_skill_sharing`

Publish a workspace skill to the marketplace (isPublic true) or take it down.

```json
{
 "type": "object",
 "properties": {
  "skillId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "isPublic": {
   "type": "boolean"
  }
 },
 "required": [
  "skillId",
  "isPublic"
 ],
 "additionalProperties": false
}
```

### `brain_install_skill`

Install a public marketplace skill into this workspace. It stays read-only and tracks the source.

```json
{
 "type": "object",
 "properties": {
  "skillId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "skillId"
 ],
 "additionalProperties": false
}
```

### `brain_duplicate_skill`

Copy any skill you can see into an editable workspace skill.

```json
{
 "type": "object",
 "properties": {
  "skillId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "name": {
   "type": "string"
  }
 },
 "required": [
  "skillId"
 ],
 "additionalProperties": false
}
```

### `brain_create_api_token`

Create a personal API token for MCP clients (Claude Code, Claude Desktop, Cursor). The token is shown once.

```json
{
 "type": "object",
 "properties": {
  "name": {
   "type": "string",
   "minLength": 1,
   "maxLength": 80
  }
 },
 "required": [
  "name"
 ],
 "additionalProperties": false
}
```

### `brain_list_api_tokens`

List your API tokens for this workspace (secrets are never shown again).

```json
{
 "type": "object",
 "properties": {},
 "additionalProperties": false
}
```

### `brain_revoke_api_token`

Revoke an API token. Clients using it stop working immediately.

```json
{
 "type": "object",
 "properties": {
  "tokenId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "tokenId"
 ],
 "additionalProperties": false
}
```

### `brain_get_usage_summary`

AI usage for this workspace: tokens and cost by model and source over the last N days, and the credit balance.

```json
{
 "type": "object",
 "properties": {
  "days": {
   "default": 30,
   "type": "integer",
   "minimum": 1,
   "maximum": 365
  }
 },
 "required": [
  "days"
 ],
 "additionalProperties": false
}
```

### `brain_list_chats`

Your recent AI chats in this workspace.

```json
{
 "type": "object",
 "properties": {
  "limit": {
   "default": 30,
   "type": "integer",
   "minimum": -9007199254740991,
   "maximum": 100
  }
 },
 "required": [
  "limit"
 ],
 "additionalProperties": false
}
```

### `brain_get_chat`

Messages of one of your chats.

```json
{
 "type": "object",
 "properties": {
  "chatId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "chatId"
 ],
 "additionalProperties": false
}
```

### `brain_delete_chat`

Delete one of your chats.

```json
{
 "type": "object",
 "properties": {
  "chatId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "chatId"
 ],
 "additionalProperties": false
}
```

### `brain_list_models`

Models available to you, based on connected keys and subscriptions. auto picks the best one you can use.

```json
{
 "type": "object",
 "properties": {},
 "additionalProperties": false
}
```

### `brain_list_agents`

List agents in the workspace with status, triggers and last run.

```json
{
 "type": "object",
 "properties": {},
 "additionalProperties": false
}
```

### `brain_get_agent`

Read an agent: script, status, triggers, last run.

```json
{
 "type": "object",
 "properties": {
  "agentId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "agentId"
 ],
 "additionalProperties": false
}
```

### `brain_create_agent`

Create an agent (a sandboxed JS script that reads and writes the workspace). Starts as a draft; set status active to approve it. Write the script yourself or call brain_generate_agent_script.

```json
{
 "type": "object",
 "properties": {
  "name": {
   "type": "string",
   "minLength": 1,
   "maxLength": 100
  },
  "description": {
   "default": "",
   "type": "string",
   "maxLength": 4000
  },
  "script": {
   "type": "string",
   "maxLength": 200000
  },
  "model": {
   "default": "auto",
   "type": "string"
  }
 },
 "required": [
  "name",
  "description",
  "model"
 ],
 "additionalProperties": false
}
```

### `brain_update_agent`

Update an agent: name, description, script, model, or status (draft, active, paused). Setting active approves the script to run on its triggers.

```json
{
 "type": "object",
 "properties": {
  "agentId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "name": {
   "type": "string",
   "minLength": 1,
   "maxLength": 100
  },
  "description": {
   "type": "string",
   "maxLength": 4000
  },
  "script": {
   "type": "string",
   "maxLength": 200000
  },
  "model": {
   "type": "string"
  },
  "status": {
   "type": "string",
   "enum": [
    "draft",
    "active",
    "paused"
   ]
  },
  "vmId": {
   "description": "Run on this machine instead of the shared sandbox; null to move back",
   "anyOf": [
    {
     "type": "string",
     "format": "uuid",
     "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    {
     "type": "null"
    }
   ]
  }
 },
 "required": [
  "agentId"
 ],
 "additionalProperties": false
}
```

### `brain_delete_agent`

Delete an agent with its triggers and run history.

```json
{
 "type": "object",
 "properties": {
  "agentId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "agentId"
 ],
 "additionalProperties": false
}
```

### `brain_generate_agent_script`

Write (or rewrite) an agent's script from a plain-language description, using the workspace's real databases and columns. Saves it as a draft for the user to review and approve.

```json
{
 "type": "object",
 "properties": {
  "agentId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "instructions": {
   "type": "string",
   "minLength": 3,
   "maxLength": 8000
  }
 },
 "required": [
  "agentId",
  "instructions"
 ],
 "additionalProperties": false
}
```

### `brain_set_trigger`

Add or update a trigger. type: manual; cron (config.cron, UTC, e.g. "0 9 * * 1-5"); event (config.databaseId, config.events [row.created,row.updated,row.deleted,cell.changed], config.property, config.value); webhook (config.mode sync|async); agent_change (fires when another agent changes rows; same filters as event).

```json
{
 "type": "object",
 "properties": {
  "agentId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "triggerId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "type": {
   "type": "string",
   "enum": [
    "manual",
    "cron",
    "event",
    "webhook",
    "agent_change"
   ]
  },
  "config": {
   "default": {},
   "type": "object",
   "propertyNames": {
    "type": "string"
   },
   "additionalProperties": {}
  }
 },
 "required": [
  "agentId",
  "type",
  "config"
 ],
 "additionalProperties": false
}
```

### `brain_delete_trigger`

Remove a trigger from an agent.

```json
{
 "type": "object",
 "properties": {
  "triggerId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "triggerId"
 ],
 "additionalProperties": false
}
```

### `brain_run_agent`

Run an agent now (manual trigger). Drafts can be run to test them. wait=true returns the result (up to 2 minutes).

```json
{
 "type": "object",
 "properties": {
  "agentId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "input": {},
  "wait": {
   "default": true,
   "type": "boolean"
  }
 },
 "required": [
  "agentId",
  "wait"
 ],
 "additionalProperties": false
}
```

### `brain_run_agent_by_name`

Run an agent by its name.

```json
{
 "type": "object",
 "properties": {
  "name": {
   "type": "string"
  },
  "input": {},
  "wait": {
   "default": true,
   "type": "boolean"
  }
 },
 "required": [
  "name",
  "wait"
 ],
 "additionalProperties": false
}
```

### `brain_list_runs`

Run history of an agent, newest first.

```json
{
 "type": "object",
 "properties": {
  "agentId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "limit": {
   "default": 30,
   "type": "integer",
   "minimum": -9007199254740991,
   "maximum": 200
  }
 },
 "required": [
  "agentId",
  "limit"
 ],
 "additionalProperties": false
}
```

### `brain_get_run`

One run: status, output, logs, tokens, error.

```json
{
 "type": "object",
 "properties": {
  "runId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "runId"
 ],
 "additionalProperties": false
}
```

### `brain_cancel_run`

Stop a running run.

```json
{
 "type": "object",
 "properties": {
  "runId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "runId"
 ],
 "additionalProperties": false
}
```

### `brain_list_agent_versions`

Previous scripts of an agent, newest first.

```json
{
 "type": "object",
 "properties": {
  "agentId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "agentId"
 ],
 "additionalProperties": false
}
```

### `brain_restore_agent_version`

Put back a previous script. The current one is kept as a version.

```json
{
 "type": "object",
 "properties": {
  "agentId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "versionId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "agentId",
  "versionId"
 ],
 "additionalProperties": false
}
```

### `brain_get_sharing`

Who can access an item: people with their role, whole-workspace access, and public links.

```json
{
 "type": "object",
 "properties": {
  "resourceType": {
   "default": "node",
   "type": "string",
   "enum": [
    "node",
    "agent",
    "credential",
    "skill",
    "vm",
    "project"
   ]
  },
  "resourceId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "resourceType",
  "resourceId"
 ],
 "additionalProperties": false
}
```

### `brain_share_with_people`

Share an item with people by email. Anyone not in the workspace joins as a guest who sees only what is shared with them. role: view, edit or full.

```json
{
 "type": "object",
 "properties": {
  "resourceType": {
   "default": "node",
   "type": "string",
   "enum": [
    "node",
    "agent",
    "credential",
    "skill",
    "vm",
    "project"
   ]
  },
  "resourceId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "emails": {
   "minItems": 1,
   "maxItems": 50,
   "type": "array",
   "items": {
    "type": "string",
    "format": "email",
    "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
   }
  },
  "role": {
   "default": "view",
   "type": "string",
   "enum": [
    "view",
    "edit",
    "full"
   ]
  },
  "message": {
   "type": "string",
   "maxLength": 1000
  }
 },
 "required": [
  "resourceType",
  "resourceId",
  "emails",
  "role"
 ],
 "additionalProperties": false
}
```

### `brain_change_access`

Change one person's role on an item.

```json
{
 "type": "object",
 "properties": {
  "grantId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "role": {
   "type": "string",
   "enum": [
    "view",
    "edit",
    "full"
   ]
  }
 },
 "required": [
  "grantId",
  "role"
 ],
 "additionalProperties": false
}
```

### `brain_remove_access`

Remove one person's access to an item.

```json
{
 "type": "object",
 "properties": {
  "grantId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "grantId"
 ],
 "additionalProperties": false
}
```

### `brain_set_workspace_access`

Give everyone in the workspace access to a private item (role view, edit or full), or take it away (role null).

```json
{
 "type": "object",
 "properties": {
  "resourceType": {
   "default": "node",
   "type": "string",
   "enum": [
    "node",
    "agent",
    "credential",
    "skill",
    "vm",
    "project"
   ]
  },
  "resourceId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "role": {
   "anyOf": [
    {
     "type": "string",
     "enum": [
      "view",
      "edit",
      "full"
     ]
    },
    {
     "type": "null"
    }
   ]
  }
 },
 "required": [
  "resourceType",
  "resourceId",
  "role"
 ],
 "additionalProperties": false
}
```

### `brain_create_share_link`

Publish a doc, database or view as a read-only public link at /s/<id>. askForEmail makes visitors enter their email first (you see who viewed).

```json
{
 "type": "object",
 "properties": {
  "resourceType": {
   "default": "node",
   "type": "string",
   "enum": [
    "node",
    "view"
   ]
  },
  "resourceId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "askForEmail": {
   "default": false,
   "type": "boolean"
  }
 },
 "required": [
  "resourceType",
  "resourceId",
  "askForEmail"
 ],
 "additionalProperties": false
}
```

### `brain_update_share_link`

Turn ask-for-email on or off for a public link.

```json
{
 "type": "object",
 "properties": {
  "shareId": {
   "type": "string"
  },
  "askForEmail": {
   "type": "boolean"
  }
 },
 "required": [
  "shareId",
  "askForEmail"
 ],
 "additionalProperties": false
}
```

### `brain_revoke_share_link`

Turn off a public link. Anyone holding it loses access.

```json
{
 "type": "object",
 "properties": {
  "shareId": {
   "type": "string"
  }
 },
 "required": [
  "shareId"
 ],
 "additionalProperties": false
}
```

### `brain_list_viewers`

Who opened a public link that asks for email, newest first.

```json
{
 "type": "object",
 "properties": {
  "shareId": {
   "type": "string"
  }
 },
 "required": [
  "shareId"
 ],
 "additionalProperties": false
}
```

### `brain_list_sites`

Sites in the workspace with their public address and pages.

```json
{
 "type": "object",
 "properties": {},
 "additionalProperties": false
}
```

### `brain_create_site`

Create a site with a starter home page. Sites are HTML/CSS/JS files that can read shared databases with window.brain.data.list(dbId) and collect form posts into a database.

```json
{
 "type": "object",
 "properties": {
  "name": {
   "type": "string",
   "minLength": 1,
   "maxLength": 100
  },
  "parentId": {
   "anyOf": [
    {
     "type": "string",
     "format": "uuid",
     "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    {
     "type": "null"
    }
   ]
  },
  "files": {
   "type": "object",
   "propertyNames": {
    "type": "string",
    "pattern": "^[\\w./-]+$"
   },
   "additionalProperties": {
    "type": "string",
    "maxLength": 500000
   }
  }
 },
 "required": [
  "name"
 ],
 "additionalProperties": false
}
```

### `brain_get_site`

A site with all its pages and files.

```json
{
 "type": "object",
 "properties": {
  "siteId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "siteId"
 ],
 "additionalProperties": false
}
```

### `brain_update_site`

Rename a site or set the custom domain it should answer on.

```json
{
 "type": "object",
 "properties": {
  "siteId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "name": {
   "type": "string",
   "minLength": 1,
   "maxLength": 100
  },
  "customDomain": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 253
    },
    {
     "type": "null"
    }
   ]
  }
 },
 "required": [
  "siteId"
 ],
 "additionalProperties": false
}
```

### `brain_create_site_page`

Add a page to a site at a path such as /about.

```json
{
 "type": "object",
 "properties": {
  "siteId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "path": {
   "type": "string",
   "pattern": "^\\/[\\w/-]*$"
  },
  "title": {
   "default": "New page",
   "type": "string",
   "maxLength": 200
  },
  "files": {
   "type": "object",
   "propertyNames": {
    "type": "string",
    "pattern": "^[\\w./-]+$"
   },
   "additionalProperties": {
    "type": "string",
    "maxLength": 500000
   }
  }
 },
 "required": [
  "siteId",
  "path",
  "title"
 ],
 "additionalProperties": false
}
```

### `brain_get_site_page`

One site page with its files.

```json
{
 "type": "object",
 "properties": {
  "sitePageId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "sitePageId"
 ],
 "additionalProperties": false
}
```

### `brain_set_site_page_files`

Replace or merge files of a site page (index.html, style.css, app.js, ...). merge=true keeps files you don't pass. Saves a version first.

```json
{
 "type": "object",
 "properties": {
  "sitePageId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "files": {
   "type": "object",
   "propertyNames": {
    "type": "string",
    "pattern": "^[\\w./-]+$"
   },
   "additionalProperties": {
    "type": "string",
    "maxLength": 500000
   }
  },
  "merge": {
   "default": true,
   "type": "boolean"
  },
  "title": {
   "type": "string"
  },
  "note": {
   "type": "string",
   "maxLength": 200
  }
 },
 "required": [
  "sitePageId",
  "files",
  "merge"
 ],
 "additionalProperties": false
}
```

### `brain_delete_site_page_file`

Delete one file from a site page.

```json
{
 "type": "object",
 "properties": {
  "sitePageId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "path": {
   "type": "string"
  }
 },
 "required": [
  "sitePageId",
  "path"
 ],
 "additionalProperties": false
}
```

### `brain_delete_site_page`

Delete a site page. The home page (/) can't be deleted.

```json
{
 "type": "object",
 "properties": {
  "sitePageId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "sitePageId"
 ],
 "additionalProperties": false
}
```

### `brain_publish_site`

Publish every page of a site as it is now. Visitors see the published copy; edits stay private until the next publish.

```json
{
 "type": "object",
 "properties": {
  "siteId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "siteId"
 ],
 "additionalProperties": false
}
```

### `brain_unpublish_site`

Take a site offline.

```json
{
 "type": "object",
 "properties": {
  "siteId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "siteId"
 ],
 "additionalProperties": false
}
```

### `brain_list_site_page_versions`

Saved versions of a site page, newest first.

```json
{
 "type": "object",
 "properties": {
  "sitePageId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "sitePageId"
 ],
 "additionalProperties": false
}
```

### `brain_restore_site_page_version`

Restore a site page to a saved version.

```json
{
 "type": "object",
 "properties": {
  "sitePageId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "versionId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "sitePageId",
  "versionId"
 ],
 "additionalProperties": false
}
```

### `brain_ai_edit_site_page`

Have the AI rewrite a site page from an instruction (restyle it, add a section, write copy, wire a form to a database). Saves a version first.

```json
{
 "type": "object",
 "properties": {
  "sitePageId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "instruction": {
   "type": "string",
   "minLength": 2,
   "maxLength": 8000
  },
  "model": {
   "default": "auto",
   "type": "string"
  }
 },
 "required": [
  "sitePageId",
  "instruction",
  "model"
 ],
 "additionalProperties": false
}
```

### `brain_list_mailboxes`

Mailboxes you can send newsletters from: connected Gmail/SMTP accounts plus the platform sender.

```json
{
 "type": "object",
 "properties": {},
 "additionalProperties": false
}
```

### `brain_send_page_by_email`

Send a doc as a personalised email. Recipients: a list of emails, or a databaseId (one email per row, every column usable as {{Column}} in the doc and subject, plus {{First Name}}). Set test=true to send only to yourself. Unsubscribed addresses are skipped.

```json
{
 "type": "object",
 "properties": {
  "docId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "subject": {
   "type": "string",
   "minLength": 1,
   "maxLength": 300
  },
  "fromCredentialId": {
   "anyOf": [
    {
     "type": "string",
     "format": "uuid",
     "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    {
     "type": "null"
    }
   ]
  },
  "to": {
   "maxItems": 5000,
   "type": "array",
   "items": {
    "type": "string",
    "format": "email",
    "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
   }
  },
  "databaseId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "emailProperty": {
   "type": "string"
  },
  "viewId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "includeHeaderImage": {
   "default": true,
   "type": "boolean"
  },
  "includeUnsubscribe": {
   "default": true,
   "type": "boolean"
  },
  "test": {
   "default": false,
   "type": "boolean"
  }
 },
 "required": [
  "docId",
  "subject",
  "includeHeaderImage",
  "includeUnsubscribe",
  "test"
 ],
 "additionalProperties": false
}
```

### `brain_list_email_sends`

Email logs: every newsletter sent, with sent, failed and opened counts.

```json
{
 "type": "object",
 "properties": {
  "docId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "limit": {
   "default": 50,
   "type": "integer",
   "minimum": -9007199254740991,
   "maximum": 200
  }
 },
 "required": [
  "limit"
 ],
 "additionalProperties": false
}
```

### `brain_get_email_send`

One newsletter send with every recipient's status and open time.

```json
{
 "type": "object",
 "properties": {
  "sendId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "sendId"
 ],
 "additionalProperties": false
}
```

### `brain_list_vms`

Machines in the workspace with size, status, assigned agents and how many runs are on each right now. A machine starts when an agent runs on it and stops after, unless kept warm.

```json
{
 "type": "object",
 "properties": {},
 "additionalProperties": false
}
```

### `brain_create_vm`

Create a machine for agents that need more time, memory or isolation. size: small (1 vCPU, 2 GB), medium (2 vCPU, 4 GB), large (4 vCPU, 8 GB). keepWarm keeps it up between runs.

```json
{
 "type": "object",
 "properties": {
  "name": {
   "type": "string",
   "minLength": 1,
   "maxLength": 80
  },
  "size": {
   "default": "small",
   "type": "string",
   "enum": [
    "small",
    "medium",
    "large"
   ]
  },
  "keepWarm": {
   "default": false,
   "type": "boolean"
  },
  "concurrency": {
   "default": 1,
   "type": "integer",
   "minimum": 1,
   "maximum": 16
  },
  "scope": {
   "default": "workspace",
   "type": "string",
   "enum": [
    "only_me",
    "workspace"
   ]
  }
 },
 "required": [
  "name",
  "size",
  "keepWarm",
  "concurrency",
  "scope"
 ],
 "additionalProperties": false
}
```

### `brain_update_vm`

Rename a machine or change its size, keep-warm, concurrency or who can use it.

```json
{
 "type": "object",
 "properties": {
  "vmId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "name": {
   "type": "string",
   "minLength": 1,
   "maxLength": 80
  },
  "size": {
   "type": "string",
   "enum": [
    "small",
    "medium",
    "large"
   ]
  },
  "keepWarm": {
   "type": "boolean"
  },
  "concurrency": {
   "type": "integer",
   "minimum": 1,
   "maximum": 16
  },
  "scope": {
   "type": "string",
   "enum": [
    "only_me",
    "workspace"
   ]
  }
 },
 "required": [
  "vmId"
 ],
 "additionalProperties": false
}
```

### `brain_start_vm`

Start a machine now (otherwise it starts on its own when an agent runs on it).

```json
{
 "type": "object",
 "properties": {
  "vmId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "vmId"
 ],
 "additionalProperties": false
}
```

### `brain_stop_vm`

Stop a machine. Runs in progress on it are cancelled by the provider.

```json
{
 "type": "object",
 "properties": {
  "vmId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "vmId"
 ],
 "additionalProperties": false
}
```

### `brain_delete_vm`

Delete a machine. Agents on it go back to the shared sandbox.

```json
{
 "type": "object",
 "properties": {
  "vmId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "vmId"
 ],
 "additionalProperties": false
}
```

### `brain_list_projects`

AI projects in this workspace.

```json
{
 "type": "object",
 "properties": {},
 "additionalProperties": false
}
```

### `brain_get_project`

One AI project: goal, plan (spec) and the items it created.

```json
{
 "type": "object",
 "properties": {
  "projectId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "projectId"
 ],
 "additionalProperties": false
}
```

### `brain_plan_project`

Turn a goal into a project plan: the databases, docs, agents, skills, sites and integrations it needs. Nothing is created until brain_build_project.

```json
{
 "type": "object",
 "properties": {
  "goal": {
   "type": "string",
   "minLength": 5,
   "maxLength": 4000
  },
  "projectId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "feedback": {
   "type": "string",
   "maxLength": 4000
  }
 },
 "required": [
  "goal"
 ],
 "additionalProperties": false
}
```

### `brain_build_project`

Create everything in a planned project inside a new folder. Agents are created as drafts for you to review and approve.

```json
{
 "type": "object",
 "properties": {
  "projectId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "projectId"
 ],
 "additionalProperties": false
}
```

### `brain_publish_project`

Share a built project in the marketplace so other workspaces can install and remix it. withRows includes up to 200 rows per database as examples.

```json
{
 "type": "object",
 "properties": {
  "projectId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "withRows": {
   "default": false,
   "type": "boolean"
  },
  "madeBy": {
   "type": "string",
   "maxLength": 100
  }
 },
 "required": [
  "projectId",
  "withRows"
 ],
 "additionalProperties": false
}
```

### `brain_unpublish_project`

Remove a project from the marketplace. Existing installs keep working.

```json
{
 "type": "object",
 "properties": {
  "projectId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "projectId"
 ],
 "additionalProperties": false
}
```

### `brain_marketplace_projects`

Projects you can install: featured ones and ones other workspaces shared.

```json
{
 "type": "object",
 "properties": {
  "search": {
   "type": "string"
  }
 },
 "additionalProperties": false
}
```

### `brain_install_project`

Install a marketplace project (featured:<slug> or a project id) into this workspace. You get your own copy to change.

```json
{
 "type": "object",
 "properties": {
  "projectId": {
   "type": "string"
  }
 },
 "required": [
  "projectId"
 ],
 "additionalProperties": false
}
```

### `brain_delete_project`

Delete a project record. The databases, docs and agents it created stay.

```json
{
 "type": "object",
 "properties": {
  "projectId": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  }
 },
 "required": [
  "projectId"
 ],
 "additionalProperties": false
}
```