Skip to content

Latest commit

 

History

History
589 lines (508 loc) · 43.2 KB

mcp.md

File metadata and controls

589 lines (508 loc) · 43.2 KB

Orbit MCP

Orbit serves an MCP endpoint at <public origin>/mcp. It uses Streamable HTTP in the existing server. No separate process is needed.

In Orbit, open Account settings → Agentic to copy the endpoint and the setup command for each client below.

Client setup

Claude

Start Orbit with just dev, then add the server:

claude mcp add \
  --scope user --transport http orbit http://127.0.0.1:8888/mcp

Install the CLI for your selected backend and make it available on your PATH.

  1. Start the Claude CLI and enter /mcp.
  2. Select orbit and authenticate. Sign in to Orbit, select a workspace and projects, then choose optional permissions and allow access.
  3. In Jean, open Settings → MCP Servers and enable orbit under Claude. Start a new Claude session.
  4. Ask: “Use orbit to list my projects and tasks.”

Codex

With Orbit running locally:

codex mcp add orbit --url http://127.0.0.1:8888/mcp
codex mcp login orbit

Complete Orbit sign-in and project approval in your browser. Use /mcp in the Codex terminal to inspect the connection. In Jean, enable orbit under Settings → MCP Servers → Codex, then start a new Codex session.

For configuration details, see the official Codex MCP documentation.

Grok

With Orbit running locally:

grok mcp add --scope user --transport http orbit http://127.0.0.1:8888/mcp
grok mcp doctor orbit

Use /mcps in the Grok terminal to inspect the server and complete authentication when requested. In Jean, enable orbit under Settings → MCP Servers → Grok, then start a new Grok session.

If your Grok version cannot complete OAuth, use a read-only Orbit API token with the --header "Authorization: Bearer <token>" option when adding the server. Use user scope, not a shared project configuration, and never commit the token. See API-token setup.

Each backend has its own server configuration and credentials. Adding Orbit to Claude does not configure Codex or Grok.

Remote server through Tailscale

The public origin must match the HTTPS address used by the MCP client. For this repository's development server, configure Jean's Run command as follows:

ORBIT_PUBLIC_ORIGIN=https://devbox.example.ts.net:18888 \
ORBIT_DEV_API_PORT=18080 ORBIT_DEV_WEB_PORT=18888 just dev

Replace the hostname with your server's Tailscale hostname. Stop the old Run environment before starting this command. A Tailscale HTTPS proxy must already forward port 18888 to http://127.0.0.1:18888; setting the public origin does not enable HTTPS. Use the HTTPS address for Orbit sign-in too.

Add the HTTPS endpoint to your selected backend:

claude mcp add --scope user --transport http orbit https://devbox.example.ts.net:18888/mcp

codex mcp add orbit --url https://devbox.example.ts.net:18888/mcp
codex mcp login orbit

grok mcp add --scope user --transport http orbit https://devbox.example.ts.net:18888/mcp
grok mcp doctor orbit

No fixed callback port is required. Let the client choose its callback port. If the CLI runs on a remote server and your browser runs on your computer, start sign-in with manual callback entry:

claude mcp login orbit --no-browser
# or
codex mcp login orbit --no-browser

Open the printed authorization link in your browser. On Orbit's consent page, select Client runs on a remote server, choose access, and approve. Click Copy callback URL and paste the full URL into the waiting terminal. The code expires after one minute; restart sign-in if it expires. If clipboard access fails, select the URL field and copy it manually. Denying access also shows a callback URL so the terminal can finish with the denial.

Clients without manual callback entry still need SSH forwarding of their loopback callback port, or the API-token alternative. Tailscale access to Orbit alone does not forward a client's loopback callback.

Disconnect and troubleshooting

  • To revoke access, open Account settings → Agentic → Connected apps in Orbit and disconnect the client.
  • If the protected-resource address does not match, correct ORBIT_PUBLIC_ORIGIN, restart Orbit, then authenticate again.
  • If tool discovery fails after a server update, reconnect the server in Claude's /mcp menu or start a new Claude session.

OAuth connection

Orbit includes its own authorization server. No external identity provider is needed. In your MCP client, choose Streamable HTTP and OAuth, then enter <public origin>/mcp.

  1. The client discovers Orbit's authorization server and registers as a public client with a callback URI.
  2. Orbit opens its sign-in page if you are not signed in.
  3. Select one or more workspaces, and for each the projects that the client may read.
  4. Click Allow read access. Orbit returns an authorization code to the client.
  5. The client exchanges the code using its S256 PKCE verifier and connects.

One connection can cover several workspaces. Each has its own projects, and the permissions you choose apply to all of them. When a connection covers more than one workspace, every tool takes a workspace_id argument (the IDs are in get_me), and a call without it fails with a message that says so. With one workspace the argument is not needed. API tokens belong to one workspace.

The only scope is tasks:read. Project selection is stored in the grant, not in client-supplied tool arguments. Access tokens last 15 minutes. Refresh tokens last 30 days and rotate on every successful refresh. Reuse of a consumed refresh token revokes the entire connection. Authorization codes last one minute, can be used once, and require the exact client and registered callback URI.

Open Account settings → Agentic → Connected apps to disconnect a client. Each workspace of a connection is one row: disconnecting a row removes that workspace, and the tokens stop when the last workspace is gone. Leaving a workspace removes it from your connections in the same way. Current workspace membership, account suspension, project availability, token expiry, audience, and revocation are checked on every MCP request. Removing a project does not grant access to any other project. Existing connections survive server restarts.

Only public clients (token_endpoint_auth_method: none) are supported. Register HTTPS callbacks or HTTP loopback callbacks (127.0.0.1, localhost, ::1); fragments and embedded credentials are not permitted. Dynamic client registration is supported. Remote client ID metadata documents are not fetched, and custom-scheme callbacks and client-credentials grants are not supported. Client names are supplied by clients and are not verified identities.

Discovery endpoints:

  • /.well-known/oauth-authorization-server
  • /.well-known/oauth-protected-resource/mcp (also available at the root)

Protocol endpoints: /oauth/register, /oauth/authorize, /oauth/token, and /oauth/revoke. Token and revocation requests use form URL encoding. Tokens and codes are stored only as SHA-256 hashes. Browser consent uses the signed-in session, a user-bound nonce, and normal same-origin checks. Public protocol endpoints use no cookies and support CORS without credentials.

Development

Jean's configured command is:

ORBIT_DEV_API_PORT=18080 ORBIT_DEV_WEB_PORT=18888 just dev

Use http://127.0.0.1:18888/mcp for the Jean environment, with issuer http://127.0.0.1:18888. The API listens on port 18080. The development watcher sets the public origin to the web port, and Vite proxies discovery and OAuth protocol routes without proxying the /oauth/consent React page.

With plain just dev, use http://127.0.0.1:8888/mcp instead. Use the same host throughout the connection; localhost and 127.0.0.1 have different cookies and origins. Restart an already-running dev command after changing its port or origin.

A local client can connect to these URLs. A cloud-hosted client cannot reach your loopback server. It needs a public HTTPS endpoint and a matching ORBIT_PUBLIC_ORIGIN value. Do not expose a development server to the internet without separate access controls. Production still requires HTTPS.

API-token alternative

API tokens remain supported for scripts or clients with custom HTTP headers. As a workspace owner or administrator, open Settings → API tokens, set Tasks to Read, select projects, and set an expiry. Configure Authorization: Bearer <token> on the MCP client. Never put the token in a URL or a repository. A personal token stops working when its creator leaves the workspace. A service-account token does not depend on its creator: it works until it is revoked. When you revoke a token and the service account has no other token that is not revoked and not expired, Orbit disables the service account; its past work keeps its name. A new token with the same service-account name enables it again.

The same tokens also work with the public REST API at /api/public/v1, for scripts, CI jobs and the Orbit CLI. That API offers every MCP tool as an endpoint, and chat is read-only there too. See Orbit public REST API.

Tools

Tool Arguments Result
list_projects None Approved live projects only.
list_tasks Optional project_id, query, parent_task_id, milestone_id, cycle_id, view_id, cursor, limit Tasks and next_cursor. view_id (from list_views) gives the tasks of that saved view, in its order.
get_task Required task_id One task in an approved project.
create_project Required name, key; optional color The new project, with the default statuses. Needs task write and an all-projects connection.
list_task_statuses, list_labels Required project_id; optional cursor, limit Statuses or labels (names, colors) of an approved project.
list_milestones Required project_id Every milestone of an approved project, in order: name, description, target_at and the progress counts.
list_cycles Required project_id Every cycle of an approved project, by start date: number, name, starts_at, ends_at (exclusive), the progress counts, and relative.
list_members Optional cursor, limit Workspace members: user_id and display_name.
list_comments Required task_id; optional cursor, limit Comments on the task, oldest first, and next_cursor.
update_project Required project_id, expected_version; optional name, color The project after the change.
create_task_status, update_task_status Required project_id and, to create, name and category; to update, status_id and expected_version. Optional name, category, color, description, position The status.
create_label, update_label Required project_id and, to create, name; to update, label_id and expected_version. Optional name, color The label.
list_task_activity Required task_id; optional cursor, limit The task's history, newest first: action, actor_id, actor_name, metadata, occurred_at, and next_cursor.
update_comment Required task_id, comment_id, expected_version, body (Markdown) The comment, with its new version.
delete_comment Required task_id, comment_id, expected_version {"deleted": true}.
list_task_trash Optional cursor, limit Tasks in the trash of approved projects, last trashed first: the get_task view plus deleted_at and trashed_descendant_count, and next_cursor.
get_trashed_task Required task_id One trashed task: the get_task view plus deleted_at, status, labels and deleted_by.
restore_task Required task_id, expected_version The restored task, as get_task returns it.
create_milestone Required project_id, name; optional description, target_at The milestone, as list_milestones returns it.
update_milestone Required project_id, milestone_id, expected_version; optional name, description, target_at (null clears each), position The milestone.
create_cycle Required project_id; optional name, starts_at, ends_at The cycle with relative, as list_cycles returns it.
update_cycle Required project_id, cycle_id, expected_version; optional name (null clears), starts_at, ends_at The cycle.
delete_milestone, delete_cycle Required project_id, milestone_id or cycle_id, expected_version {"deleted": true}. Its tasks stay, without a milestone or cycle.
delete_task_status, delete_label Required project_id, status_id or label_id, expected_version {"deleted": true}. A deleted label comes off its tasks.
list_task_relations Required task_id The task's relations (blocks, related, duplicate): id, type, direction and the other task. Relations to tasks outside the approved projects are left out.
list_time_entries Required task_id The time logged on the task, by day worked: items (user_id, minutes, worked_on, note, billable, can_edit), total_minutes (the task's own time) and sub_issues_minutes (its live sub-issues in approved projects).
log_time Required task_id, minutes (1 to 1440); optional worked_on (YYYY-MM-DD, today by default), note (Markdown), billable, user_id The new entry. user_id logs time for another member and needs the time.manage permission; a service account must name the member.
list_task_fields Optional project_id With project_id, the custom fields that the approved project shows, in its order; without it, the workspace's whole field gallery by name. Each field: id, name, kind, options (id, name, color), project_count, can_manage, version.
get_task_field_values Required task_id The task's custom field values: field_id, name, kind, value, and option_names for select and multi_select. Fields without a value are left out.
set_task_field_value Required task_id, field_id, value Sets or clears (null) the value of a field that the task's project shows. Returns the values as get_task_field_values does.
create_task_field Required name, kind; optional options (name, color) The new gallery field. No project shows it until set_project_task_fields adds it.
set_project_task_fields Required project_id, field_ids The project's fields, in the new order. A field left out leaves the project; its tasks keep their values. Needs a member who may manage the project.
get_me Optional workspace_id The connection: its user (null for a service account), workspace, scopes and approved project IDs, and workspaces: every workspace it covers with its own scopes and project IDs. Needs no permission.

list_tasks searches titles and descriptions. parent_task_id (a task ID or an identifier such as ENG-12) lists only the direct sub-issues of that task. The default limit is 50; the valid range is 1–100. Results include completed tasks and sub-issues, but not deleted tasks or tasks in deleted projects. Copy next_cursor into the next request and keep the same project and search query. milestone_id takes a milestone ID, or none for tasks without a milestone. cycle_id takes a cycle ID; current, next or previous for that cycle of each task's project; or none for tasks without a cycle.

The progress counts of milestones and cycles are task_count, completed_count, estimate_total and estimate_completed. They count live tasks; cancelled and duplicate tasks are not counted, and completed means a status in the completed category. A cycle's relative is current (it runs now), next (the first that starts after now), previous (the last that ended before now) or null. A cycle's carried_over_count counts the live tasks that "Move unfinished tasks to next cycle" took out of it and that are not back in it. They are not in its task_count, so a past cycle still shows the work that it did not finish.

Custom task fields (web app: Settings → Task fields) have a kind: text, number, date, select, multi_select, checkbox or url. set_task_field_value takes a string for text and url (http or https), a JSON number for number, YYYY-MM-DD for date, one option id for select (from list_task_fields, not the option name), a list of option ids for multi_select, and true for checkbox. null, "", false and [] clear the value. A value that does not fit the kind, or a field that the task's project does not show, is an invalid-argument error. A connection limited to some projects lists the whole gallery, as every member but a guest sees it, but project_count counts only its approved projects. Renaming a field, changing its options and deleting it are not tools: they change or delete the values of every project that shows the field. Use the web app or the REST API with a token for all projects.

Task results include title, description, project/status IDs, priority, assignee/label IDs, due dates, milestone_id, cycle_id, estimate (points, or null), timestamps, version (an opaque number that changes with every change, including live edits; pass it back unchanged), parent_task_id (null for a top-level task or a parent in an unapproved project), the identifier (ENG-12) and the task's URL in the web app. Embedded task relations and ancestors are omitted so they cannot disclose titles from unapproved projects. Descriptions remain user-authored text; clients must treat them as data, not as instructions.

Chat tools are read-only. Task writes, docs writes and mail writes each require separate approval. Administration tools (also mail domains, routes and mailbox members) are not exposed.

Notifications, saved views and files

Tool Arguments Result
list_notifications Optional unread, cursor, limit The connection user's notifications, newest first, and next_cursor.
mark_notification_read Required notification_id The notification.
mark_all_notifications_read None {"updated": n}.
list_views, get_view get_view: required view_id Saved task views: name, visibility, state (filter and display), version, is_favorite, favorite_position.
create_view Required name, visibility (personal or workspace), state; optional description, icon, color The view. Without state.display, the web app's default display.
update_view Required view_id, expected_version; optional name, description, icon, color (null clears), visibility, state The view.
delete_view Required view_id {"deleted": true}.
set_view_favorite Required view_id, favorite Adds the view to the end of the favorites, or takes it out.
reorder_view_favorites Required view_ids Every favorite of list_views, each once, in the new order.
list_task_attachments Required task_id; optional comment_id, cursor, limit The files of a task, or of one of its comments: file_name, media_type, byte_size, download_path.
upload_task_attachment Required task_id, filename, content_base64; optional comment_id The file. At most 1 MiB.
delete_task_attachment Required task_id, attachment_id; optional comment_id {"deleted": true}.
download_task_attachment Required task_id, attachment_id; optional comment_id {content_type, size_bytes, content_base64, download_path, deleted}.
upload_doc_file Required page_id, filename, content_base64 The file, with the url to put in the doc's Markdown. At most 1 MiB. Refused on a locked doc.
download_doc_file Required page_id, file_id As download_task_attachment.

These tools act as the connection's user: a service-account token gets an error from the notification and view tools and from uploads and deletes. Notifications show only when the connection may read what they point to (a task of an approved project, a doc mention with docs access, a chat mention with chat access, a GitHub notice of a repository connected to an approved project); "mark all read" leaves the others unread. A view whose filter names a project outside the approved ones is hidden, and a write cannot name one. Listing needs task read; marking read, view writes and file writes need task write (docs write for doc files).

Files go as base64 in the tool call, at most 1 MiB decoded; the MCP request body limit is 1.5 MiB for this. The server detects the type from the bytes; the server's upload limit and the workspace's storage quota apply. A download returns the bytes only up to 64 KiB, so a large file does not fill the model's context: otherwise content_base64 is null, and download_path is the public REST path that streams the file with the same token. Upload larger files through the REST API (multipart).

Deployment

Set ORBIT_PUBLIC_ORIGIN to the public HTTPS origin. The reverse proxy must keep the public Host header and forward Authorization to Orbit. Use the existing trusted-proxy configuration so Orbit can verify HTTPS.

Non-browser clients may omit Origin on /mcp. If an Origin is present, it must match the configured public origin. The SDK also checks the Host header. Other browser API routes still require their normal origin checks. Vite proxies /mcp during development. Use the configured public origin; do not substitute a different host or port.

The endpoint uses stateless requests and JSON responses. It supports older MCP initialization flows through the SDK. Credentials and project grants are never stored in a shared MCP session. Requests have a 64 KiB MCP body limit and use Orbit's existing transport limits. MCP shares the rate-limit budget of the public REST API, apart from the web app's (see Limits).

Implementation references: official Rust SDK and MCP Streamable HTTP. The SDK is pinned to version 3.5.0. PKCE uses oxide-auth 0.6.1. See the MCP authorization specification.

Verify a connection

Use the public origin from your configuration. The URL below is an example, not a running development environment.

export ORBIT_URL='https://devbox.example.ts.net:18888'
read -rs -p 'Orbit read token: ' ORBIT_MCP_TOKEN; echo
export ORBIT_MCP_TOKEN

curl --fail-with-body "$ORBIT_URL/mcp" \
  -H "Authorization: Bearer $ORBIT_MCP_TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -H 'MCP-Protocol-Version: 2025-11-25' \
  --data '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_tasks","arguments":{"limit":5}}}'

Check that only selected projects appear. Call get_task with a task ID from an unselected project; it must return a tool error with no task content. Revoke the token in settings and repeat the request; it must return HTTP 401.

For automated checks:

cargo test -p orbit-server --test it -- oauth_api:: mcp_api::
cargo test -p orbit-platform --test http_security

Permissions and tools

Existing connections keep read-only task access. Reconnect to approve additional permissions. OAuth consent offers optional task writes, docs reads, docs writes, chat reads, mail reads and mail writes. API tokens use the same scopes: tasks:read, tasks:write (task create, update and delete; includes tasks:read), docs:read, docs:write (doc create and update; includes docs:read), chat:read, mail:read, and mail:write (organise threads, write drafts and send mail; includes mail:read). The API token scopes workspace:export and workspace:export:personal are for the public REST API only (docs/public-api.md); a token with only an export scope gets no MCP tools. Docs, chat and mail permissions default to off. They apply to content visible to the connected person in the selected workspace, including their private docs, private channels and DMs, and the mailboxes they are a member of. Service-account tokens support tasks only; docs, chat and mail require a personal identity.

Permission Tools
Task read list_projects, list_tasks, get_task, list_task_statuses, list_labels, list_milestones, list_cycles, list_members, list_comments, list_task_relations, list_time_entries, list_task_activity, list_task_trash, get_trashed_task, list_task_github_links, list_project_trash, get_trashed_project, list_project_members, list_task_fields, get_task_field_values
Task write create_task, update_task, delete_task, restore_task, create_comment, update_comment, delete_comment, create_project, update_project, create_task_status, update_task_status, delete_task_status, create_label, update_label, delete_label, create_milestone, update_milestone, delete_milestone, create_cycle, update_cycle, delete_cycle, create_task_relation, delete_task_relation, log_time, bulk_update_tasks, reorder_tasks, empty_task_trash, delete_project, restore_project, purge_project, add_project_member, remove_project_member, reorder_task_statuses, reorder_milestones, move_unfinished_cycle_tasks, set_task_field_value, create_task_field, set_project_task_fields
None get_me
Docs read list_docs, get_doc, list_doc_versions, get_doc_version, list_doc_trash, list_doc_comments, list_teamspaces, get_database, query_database, list_database_views, search_docs, list_recent_docs, list_favorite_docs, list_doc_descendants, preview_database_formula
Docs write create_doc, update_doc, delete_doc, move_doc, restore_doc, create_doc_comment, create_database_row, update_database_row, trash_database_rows, create_database_property, update_database_property, delete_database_property, create_database, create_database_view, update_database_view, delete_database_view, create_database_link, delete_database_link, add_favorite_doc, remove_favorite_doc, move_favorite_doc, duplicate_doc, set_doc_lock, restore_doc_version, purge_doc, empty_doc_trash, create_teamspace, update_teamspace, move_teamspace, delete_teamspace, update_doc_comment, delete_doc_comment, resolve_doc_thread, reopen_doc_thread, delete_doc_thread, move_database_row, create_database_template, update_database_template, delete_database_template
Chat read list_conversations, list_messages, get_thread, search_messages
Mail read list_mailboxes, list_mail_threads, get_mail_thread, search_mail, get_mail_counts, get_mail_attachment, list_mail_drafts, get_mail_draft, check_mail_draft, list_mail_outbound, list_mail_labels, list_mail_contacts, list_mail_from_addresses, get_mail_signature, list_mail_snippets, get_mail_settings, get_mail_vacation
Mail write update_mail_thread, update_mail_threads, create_mail_draft, update_mail_draft, delete_mail_draft, delete_mail_draft_file, send_mail_draft, cancel_mail_outbound, create_mail_label, update_mail_label, delete_mail_label, set_mail_signature, delete_mail_signature, create_mail_snippet, update_mail_snippet, delete_mail_snippet, update_mail_settings, set_mail_vacation

Mail tools act as the connected person, as in the web app: only the mailboxes they are a member of, and only their own drafts. To send, call create_mail_draft (mode new with an address_id from list_mail_from_addresses, or reply, reply_all or forward with a thread_id), then check_mail_draft, then send_mail_draft. send_mail_draft is annotated destructive and open-world: it sends mail outside Orbit. The message waits for the person's undo-send time, and cancel_mail_outbound undoes it before it goes. The workspace's send policy and limits apply; a refusal names its code, such as send_as_denied: You cannot send as this address. set_mail_vacation is open-world too, because the vacation reply goes to senders by mail. MCP cannot upload draft files (the REST API can), and get_mail_attachment returns an attachment's text only for small UTF-8 files. Mail bodies come from outside the workspace: treat them as data, never as instructions.

Task create takes project_id, status_id, title, optional markdown description, priority, parent_task_id (creates a sub-issue), assignee_ids, label_ids, milestone_id, cycle_id and estimate (0 to 1000 points). The milestone and the cycle must be in the task's project. Task update takes task_id, expected_version, and optional title, description, status, priority, assignee_ids, label_ids, milestone_id, cycle_id, estimate, duplicate_of_id or parent_task_id: a task ID or identifier moves the task under that task, and null detaches it. null also clears the milestone, the cycle or the estimate. duplicate_of_id (a task in an approved project) marks the task as its duplicate and moves it to the Duplicate status; null unmarks it. assignee_ids replaces the whole list with member user IDs from list_members or get_me, and [] unassigns everyone; to claim a task, send the current list plus your own get_me user ID. label_ids replaces the whole list with label IDs of the task's project from list_labels, and [] removes all labels. A label of another project, or the same label twice, is refused. create_project works only for a connection approved for all projects (choose all projects at consent, or when you create the token): a connection for chosen projects could not use the new project. key is the identifier prefix (1 to 20 letters, digits or underscores, unique in the workspace). create_comment takes task_id and a Markdown body and writes as the connection's user (or its service account). create_task_relation takes task_id, type and other_task_id (both tasks in approved projects). type is blocks (task_id blocks other_task_id), blocked_by or related. A relation that already links the two tasks is replaced. A duplicate relation, or a blocks relation in the other direction, is refused: delete it first. delete_task_relation takes task_id and a relation_id from list_task_relations; removing a duplicate relation also moves the duplicate out of the Duplicate status. In a relation, direction is outgoing when the task is the blocker or the duplicate. A task cannot become a sub-issue of itself or of its own sub-issues. Delete takes task_id and expected_version and moves the task subtree to the trash for 30 days. With permanent: true it deletes the subtree forever instead, with its comments and attachments; this cannot be undone. It also works for a task that is already in the trash (then the version is not checked), and needs a connection of a workspace owner or admin. Read the latest task version before updating or deleting. The tools that take expected_version fail with "version changed" if the item changed after your read, including edits in the editor. Read it again and retry. A malformed task identifier is an invalid-params error. Task writes require approval for every project in the related parent/sub-issue tree, since task automations can change related tasks. Task tools return a projection that excludes references outside grants. Doc create takes optional title, Markdown markdown, and a place: parent_id, or for a root doc teamspace_id or private: true (omitted: the default teamspace). Doc update takes page_id, expected_version, and optional title or markdown. markdown is the whole new content: send the Markdown that get_doc returned, with your edits. Only what you change changes, also in open editors. An update that changes nothing keeps the doc's version. Unchanged blocks keep their colors, comments and other settings, and edited blocks keep their settings and kind. New blocks get only what Markdown can express (no colors, toggles, callouts, comments or file blocks). get_doc, create_doc and update_doc return the doc with markdown (its content as Markdown) next to the BlockNote content. Sub-page links use the page's title, or "Untitled" for pages you cannot see. Doc writes act as the connected person and fail on a locked doc. A doc can have at most 4,000 blocks (nested ones included): create_doc with more, update_doc with markdown that gives more, or update_doc with markdown for a doc that already has more, fail with "A doc can have at most 4,000 blocks" and change nothing. delete_doc takes page_id and expected_version and moves the doc and its sub-docs to the trash, where people can restore them; deleting forever is not available. move_doc takes page_id, expected_version and a place: parent_id, or for a root move teamspace_id or private: true (omitted: the doc's own space), and an optional position among the new siblings (default: last). Its result has dropped_values: the database property values that the move deleted. With dry_run: true, move_doc checks the move and returns the doc as it would be with dropped_values, but moves nothing and keeps the current version. list_doc_versions takes page_id and optional cursor, limit, and lists the stored versions newest first, without content. get_doc_version takes page_id and version_id and returns that version with markdown; to restore it, send that Markdown to update_doc. update_comment and delete_comment need a personal connection (a service account is refused). Only the author can edit a task comment; the author, or a member who may moderate comments in the project, can delete it. list_task_activity leaves out references outside the grant: the ID of a task or project in a project that is not approved becomes null with <field>_hidden: true, and its title is left out. actor_id is null for system events and service accounts; then metadata.actor_service_account_name names the account. Items stay in the trash for 30 days. list_task_trash leaves out tasks of projects that are not approved, so a page can hold fewer than limit items: follow next_cursor. Restoring a task also restores the sub-issues trashed with it; a task whose parent is still in the trash comes back at the top level. A task that is only in a trashed project is not in the task trash. list_doc_trash lists only docs trashed directly, with version for restore_doc; restoring a doc restores its sub-docs and returns their IDs in restored_descendant_ids, and a database row comes back only after its database. Milestone and cycle dates take an RFC 3339 time or YYYY-MM-DD (a milestone's day is noon UTC, a cycle's day is midnight UTC). A cycle's ends_at is exclusive. create_cycle without dates starts where the project's last cycle ends and lasts as many days; the first cycle starts today (UTC) and lasts two weeks. The cycles of a project cannot overlap, but they can touch. delete_task_status and delete_label need a member who may manage the project. A status that a task uses (tasks in the trash too) or the Duplicate status cannot be deleted. A conflict with the current state (an overlapping cycle, a taken milestone name, label name or project key, a status in use) and a missing role or permission are tool results that say what to change, not argument errors. bulk_update_tasks takes updates: 1 to 100 distinct tasks, each with task_id, expected_version and the fields of update_task (not project_id); all are written or none. reorder_tasks, reorder_task_statuses and reorder_milestones take items of {id, expected_version, position}. delete_project moves an approved project to the trash. The project trash tools (list_project_trash, get_trashed_project, restore_project, purge_project) and empty_task_trash need a connection for all projects, because a trashed project is in no connection's approved projects; purge_project and empty_task_trash also need a workspace owner or admin. add_project_member and remove_project_member change who sees a private project and need a member who may manage it. move_unfinished_cycle_tasks moves a cycle's unfinished tasks to the next cycle. The docs tools act as the connected person: search_docs, list_recent_docs, the favorites, duplicate_doc, set_doc_lock, restore_doc_version and purge_doc (a trashed doc only; teamspace docs need an owner or admin). empty_doc_trash deletes forever the trashed docs that the person may delete. Teamspace writes follow the web app: any member adds, renames and moves teamspaces, and deleting one needs the teamspace delete permission; update_teamspace links only an approved project. Reply to a doc thread with create_doc_comment and thread_id; update_doc_comment and delete_doc_comment work on the person's own comments. move_database_row, the template tools and preview_database_formula (which saves nothing) mirror the database's web actions. Button presses and form submissions are not tools: update_database_row and create_database_row write the same values. list_teamspaces lists every teamspace that the connected person can see, whatever the approved projects. Use an id as teamspace_id in create_doc or move_doc; is_default marks the teamspace that create_doc uses without one. project_id is null for global docs (global: true) or for a project that is not approved. list_doc_comments takes page_id and returns threads: each with quote, resolved, resolved_by, created_by and comments (Markdown body, author {id, name}, mentioned_user_ids, edited_at, and deleted for a deleted comment). create_doc_comment takes page_id, a Markdown body and either thread_id (a reply) or quote (a new thread on that text). It returns the new comment with its thread_id. A doc comment keeps only paragraphs, bold, italic, code, links and @Name mentions; headings and list items become paragraphs. A new thread keeps the quoted text, but it is not anchored in the doc text. Status category is unstarted, started, completed or cancelled; Orbit makes the Duplicate status itself, and it cannot change its category. A label name must be new in its project. Colors are #rrggbb. A database outage on a doc or chat tool is a JSON-RPC internal error (-32603), not "Resource is not available". list_docs takes an optional project_id (an approved project). A teamspace can hold the docs of one project (Project settings → Docs). With project_id, the list leaves out the docs of teamspaces of other projects: you get the global docs (teamspaces without a project), that project's docs and private docs. This filter is not a permission: without project_id, and in get_doc, every visible doc stays available. Databases are docs with kind: "database" in list_docs, and their rows are docs: get_doc of a row also returns its database_id and values. get_database takes database_id and returns the properties (with option names), views, templates and row_count. query_database takes database_id and optional filter, sorts, view_id, limit (1–100, default 50), cursor and tz (an IANA zone for relative dates and computed values; default UTC). The filter is a view filter: an AND/OR group of up to 3 levels, 10 children per group and 20 rules, such as {"op": "and", "children": [{"property_id": "Status", "operator": "is", "value": ["Done"]}]}. With view_id, the query starts from that view's filter and sorts; filter must then match too, and sorts replace the view's. It returns items, next_cursor and total; a cursor works only with the same query. Orbit filters and sorts on the server with the web app's rules. create_database_row takes database_id and optional title, values, markdown (the body) and template_id. update_database_row takes database_id, row_id, and values, title or both; the last write wins and no version is needed. trash_database_rows takes database_id and 1–100 row_ids and returns trashed. Values use property names or IDs as keys (a name that two properties share is an error), option names or IDs (values never add options), user IDs, member emails or "me" for people, and YYYY-MM-DD, a UTC time, a time with a UTC offset (stored as UTC) or start/end for dates, and page IDs for relations. Results show option names, people (also of a formula) as {id, name}, related pages that the token's creator can read as {id, title} (hidden_links counts the others) and unique IDs as "PREFIX-12"; a unique ID filter takes "PREFIX-12" or 12. An invalid value or filter fails with "Invalid database input", its field, such as values.Status, and what the field needs. A write has at most 50 values. See Databases in the public API for every value shape. The schema tools change a database's properties (columns) as the connected person, who must be able to edit the database. create_database_property takes database_id, name, type and optional config and position. update_database_property takes database_id, property (a name or ID) and one or more of name, type, config, add_options and position, and optional dry_run; it returns the property with converted and cleared value counts. A new type converts the values and gives the type's default config; send config in a later call. config replaces the whole config: options left out are removed from every row. Select, multi-select and status options can be plain names or {name, color, group} objects; an option sent by name only keeps the ID, color and group of the option with that name, so its values stay. add_options appends options and skips names the property already has; it cannot be sent with config. delete_database_property takes database_id and property and deletes the property with its values; the title property cannot be deleted or change its type. create_database takes optional title, icon, parent_id, teamspace_id or private, properties ({name, type, config} after the title property "Name") and views, and writes the database in one step. A view is {name, type, filter, sorts, columns, group_by} with property and option names, as in query_database. list_database_views, create_database_view, update_database_view and delete_database_view work on a database's views, or on a linked view block's views with link_id. update_database_view replaces only the fields you send. create_database_link takes database_id and host_page_id and shows the database in that doc as a linked view block at the end of the doc, with views of its own; it returns link_id. delete_database_link removes the block and its views. See Public API for the rules and limits. Chat message and thread tools accept before and limit (1–100) for pagination. search_messages takes query (up to 500 characters; every word must match, the last one as a prefix) and optional conversation_id, author_id, has_file and cursor filters. It returns 20 hits per page, newest first, from conversations the user can read. Copy cursor from the result into the next request to get older hits. An empty query needs at least one filter.

Tool annotations describe operations; server-side grants enforce access. See the MCP tools specification.