Connecting AI assistants
MCP tools
A connected assistant gets fourteen tools. Every tool except list_brains and create_brain takes a brain argument, the id of the brain or its slug. Paths are relative to the root of the brain and use /, for example Clients/Martin/brief.md.
Finding your way
| Tool | What it does |
|---|---|
list_brains | Brains the assistant can access: id, slug, name, its permission level and the number of readable files. |
list_directory | Folders and files under a folder (path, default: the root; recursive, default: false), with size, hash, last change and permission level. |
get_links | Outgoing links, backlinks and unresolved wiki links of a note. |
recent_changes | Latest changes in a brain (limit, default 20): path, operation, author, interface, AI client and time (UTC). |
Reading and searching
| Tool | What it does |
|---|---|
read_note | Text of a note with its content hash, last modification time and author. |
search | Full-text search (query; limit, default 10, at most 50): path, title and a plain-text excerpt. |
semantic_search | Search by meaning rather than by exact words, across languages (query; limit, default 10, at most 50): path, title, the most relevant passage and a similarity score. Only on instances where semantic search is enabled; elsewhere it answers with an error that tells the assistant to use search. |
Writing
| Tool | What it does |
|---|---|
write_note | Creates a note or replaces its whole content. With expected_hash, the write is refused if the note changed since it was read. |
edit_note | Replaces an exact piece of text (old_text → new_text). The text must occur exactly once unless replace_all is set. |
append_note | Adds text at the end of a note; creates the note if it does not exist. |
create_folder | Creates an empty folder and its missing parents. |
move_path | Moves or renames a note or a folder. Fails if something already exists at the destination. Wiki links pointing to the moved notes are not rewritten. |
delete_path | Deletes a note, or a folder and everything in it; returns the number of files deleted. |
create_brain | Creates a new, empty brain (name) owned by the user, and opens it to the assistant with read and write access. Refused unless the user ticked Can create new brains on the consent screen. |
Safeguards
edit_noteandappend_noteonly write if the note is still the version they read, and retry once otherwise, so a simultaneous edit by a person is never overwritten.read_noterefuses binary files and notes larger than 1 MiB; the assistant is told to usesearchinstead.semantic_searchruns entirely on the Memex server: the query and the notes are not sent to any embedding service.- Deleted or overwritten notes stay in the history of the brain and can be restored from the web app.
- When something goes wrong (note not found, no permission, conflict, no match for an edit) the tool returns an error message the assistant can read and react to.
- On a connection approved without write access, every writing tool answers with a permission error.
What the assistant may reach with these tools is decided on the consent screen: see Permissions and consent. Reference: mcp.md.