Docs. Build on Cortex from code, an AI client, or a page.
Agents
An agent is a small JavaScript module that runs server-side in a sandbox when a trigger fires: on a schedule, when a row changes, on a webhook, or when another agent changes data. It talks to the workspace through the s16 object. Every run is recorded with its logs, output, AI tokens and the reason it stopped.
Agent scripts are JavaScript modules: export default async function ({ event, s16 }) { ... }.
They run server-side in a sandbox: no setTimeout, no fetch, no require. Every call below is async (await it) except s16.log.
- s16.db.listDatabases() -> [{ id, name, rowCount }]
- s16.db.queryDatabase(databaseId, { filters: [{ property, op, value }], sorts: [{ property, direction }], search, limit }) -> { rows: [{ id, title, properties: { <column name>: value } }], total }
ops: equals, not_equals, contains, not_contains, is_empty, is_not_empty, gt, gte, lt, lte, before, after, checked, unchecked, past_week, next_week, this_month
- s16.db.getPage(pageId) -> { id, title, properties, text }
- s16.db.createPage(databaseId, { <column name>: value }, markdownBody?) -> row
- s16.db.updatePage(pageId, { <column name>: value }) -> row
- s16.db.deletePage(pageId)
- s16.docs.get(docId), s16.docs.create({ title, content: markdown, parentId? }), s16.docs.append(docId, markdown)
- s16.ai({ prompt } | { messages, system }, json?: boolean) -> string, or parsed JSON when json: true
- s16.http(url, { method, headers, body, credential: "<integration label>" }) -> { status, ok, text, json }
- s16.slack.post(text, { channel? }), s16.telegram.send(text, { chatId? }), s16.email.send({ to, subject, html })
- s16.apify(actorId, input) -> dataset items (needs an integration labelled "apify")
- s16.store.get(key), s16.store.set(key, value), s16.store.delete(key): state kept between runs
- s16.tools.<brain_tool_name>(input): any workspace tool, e.g. s16.tools.brain_create_database({ name })
- s16.log(...values): appears in the run history
event: { type: "manual" | "cron" | "webhook" | "row.created" | "row.updated" | "row.deleted" | "cell.changed", ... }.
For cell.changed: { databaseId, pageId, property, value, previous }. For webhook: { body, query, headers }.
Values are keyed by column name. Dates are YYYY-MM-DD. Return a small JSON value as the run output.// Notify Slack when a deal moves to "Approved".
export default async function ({ event, s16 }) {
if (event.type !== "cell.changed" || event.property !== "Status" || event.value !== "Approved") return
const deal = await s16.db.getPage(event.pageId)
await s16.slack.post(`Deal approved: ${deal.title} ($${deal.properties.Amount})`)
s16.log("Posted", deal.title)
}Scripts have no timers, no fetch and no require; the network is reached only through s16.http, which can inject a stored integration's secret so scripts never hold keys. Agents that need more time, memory or isolation can run on their own machine.
Connect MCP
Create a token in Settings, Developer. Then point your client at the MCP endpoint with a Bearer header.
claude mcp add --transport http cortex https://<your-host>/api/mcp \ --header "Authorization: Bearer YOUR_TOKEN"
Every tool in the reference below is exposed, and every skill in the workspace appears as an MCP prompt. Download the SKILL.md bundle so your client knows the whole surface without being told each time.
Skills
A skill is one markdown file with YAML frontmatter. In chat it is a /command; over MCP it is a prompt. $ARGUMENTS is replaced with what the caller passes.
--- name: draft-status-update displayName: Draft status update description: Pulls last week's database changes and drafts a Monday email type: general # or editor version: 1.0.0 tags: [reporting, weekly] --- # Draft a status update Use brain_list_activity for the last 7 days, summarise in 4 to 6 bullets, lead with the biggest win. Audience: $ARGUMENTS
Database endpoints
Every database a share exposes has an address: the share link plus the database id. Read it as JSON, CSV or a calendar feed; post a row with a plain HTML form from a published site.
GET /s/<shareId>/data/<databaseId> JSON { database, rows, nextCursor }
GET /s/<shareId>/data/<databaseId>.csv CSV with column names as the header
GET /s/<shareId>/data/<databaseId>.ics one event per row with a date
POST /s/<shareId>/data/<databaseId> create a row (form post or JSON)
?limit=100&cursor=0&search=text&fields=id,id
&sort=Name:asc (repeatable)
&filter=Status:equals:Live (repeatable, ANDed)
.ics: &title=Name&start=Starts&end=Ends&location=Venue&description=NotesThe share id is the credential, so a link in a public page is public. A share can only serve databases it references, only rows its view allows, and never more than the publisher can see. Writes are allowed only when a published page has a form that posts to that database. Reads are limited to 600 and writes to 30 per 5 minutes per visitor.
Formulas
Formula columns use prop("Column"), operators + - * / % ^ == != < > <= >= and or not, a ? b : c, let(name, value, expr) and these functions:
Tool reference
141 tools. The same tools power the app, the AI chat, MCP clients and s16.tools.* in agents.
brain_list_workspaces
List the workspaces you belong to, with your role in each.
{
"type": "object",
"properties": {},
"additionalProperties": false
}brain_create_workspace
Create a new workspace. You become its owner. Returns workspace.
{
"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.
{
"type": "object",
"properties": {},
"additionalProperties": false
}brain_update_workspace_settings
Rename the workspace or change its icon. Owner or admin only.
{
"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.
{
"type": "object",
"properties": {
"conventions": {
"type": "string",
"maxLength": 20000
}
},
"required": [
"conventions"
],
"additionalProperties": false
}brain_list_members
List workspace members with name, email and role.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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).
{
"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.
{
"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.
{
"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).
{
"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.
{
"type": "object",
"properties": {},
"additionalProperties": false
}brain_restore_item
Restore an item from the trash.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"type": "object",
"properties": {},
"additionalProperties": false
}brain_get_database
Read a database's schema: columns (id, name, type, config) and views.
{
"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.
{
"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).
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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).
{
"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.
{
"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.
{
"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.
{
"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 }].
{
"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).
{
"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.
{
"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.
{
"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.
{
"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).
{
"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).
{
"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 }.
{
"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).
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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).
{
"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.
{
"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.
{
"anyOf": [
{
"type": "object",
"properties": {
"skillMd": {
"type": "string",
"minLength": 10
}
},
"required": [
"skillMd"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"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": [
"name",
"description",
"type",
"version",
"tags",
"body"
],
"additionalProperties": false
}
]
}brain_update_skill
Edit a workspace skill. Pass skillMd to replace it wholesale, or individual fields.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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).
{
"type": "object",
"properties": {},
"additionalProperties": false
}brain_revoke_api_token
Revoke an API token. Clients using it stop working immediately.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"type": "object",
"properties": {},
"additionalProperties": false
}brain_list_agents
List agents in the workspace with status, triggers and last run.
{
"type": "object",
"properties": {},
"additionalProperties": false
}brain_get_agent
Read an agent: script, status, triggers, last run.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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).
{
"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.
{
"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).
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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).
{
"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).
{
"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.
{
"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.
{
"type": "object",
"properties": {
"shareId": {
"type": "string"
}
},
"required": [
"shareId"
],
"additionalProperties": false
}brain_list_viewers
Who opened a public link that asks for email, newest first.
{
"type": "object",
"properties": {
"shareId": {
"type": "string"
}
},
"required": [
"shareId"
],
"additionalProperties": false
}brain_list_sites
Sites in the workspace with their public address and pages.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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).
{
"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.
{
"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.
{
"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.
{
"type": "object",
"properties": {},
"additionalProperties": false
}brain_get_project
One AI project: goal, plan (spec) and the items it created.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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
}