Basic Memory
Reference

MCP Tools Reference

Current MCP tool reference for Basic Memory local and cloud usage.
This is a technical reference for developers and AI integrations. For a conceptual overview of what Basic Memory can do, see What is Basic Memory.

This page lists core Basic Memory MCP tools and their current parameters.

Project resolution order is: constrained project env -> explicit project parameter -> default_project fallback.

Common parameters

Most tools accept these optional parameters. They are not repeated in every table below.

ParameterTypeDefaultNotes
projectstringresolved via fallbackProject name. Constrained project env → explicit parameter → default_project config
project_idstringProject external UUID from list_memory_projects. Prefer this when the same project name exists in more than one workspace
output_format"text" or "json""text"Machine-readable JSON output. build_context defaults to "json"; most other tools default to "text"

workspace is not a universal parameter. It appears on the note-writing tools (write_note, edit_note) and on the tools that create or delete cloud projects. For ordinary read, search, and schema calls, use project or project_id.


Knowledge tools

write_note

Create or update a markdown note.

ParameterTypeRequiredNotes
titlestringYesNote title
contentstringYesMarkdown body
directorystringYesRelative folder path. Since v0.23.2, each segment resolves to a unique existing case-insensitive folder match
tagsliststring or stringNoComma-separated string accepted
note_typestringNoDefault note. Sets the type frontmatter field (e.g., person, meeting, decision)
metadataobject or JSON stringNoExtra frontmatter fields merged into the note's YAML header
overwritebooleanNoDefault follows write_note_overwrite_default config (false unless changed). Pass true to replace an existing note; without it, writing to an existing path returns an error
workspacestringNoCloud workspace to write into (name or tenant ID)

The note_type parameter controls the type field in frontmatter, which is used for schema resolution and filtering. The metadata parameter accepts any key-value pairs that get written directly into the note's frontmatter — useful for custom fields like status, priority, or due_date.

Aliases accepted for directory: folder, dir, and path.

Folder casing resolution uses known indexed directories, so local and Cloud writes behave identically. Exact matches win; a unique case-insensitive match reuses the existing spelling; no match creates the folder as requested; and existing case-variant siblings keep exact-match behavior.

read_note

Read note content by title/permalink/memory URL.

ParameterTypeRequiredNotes
identifierstringYesTitle, permalink, or memory://...
pageintegerNoPagination page number
page_sizeintegerNoResults per page
include_frontmatterbooleanNoDefault false. When true, includes YAML frontmatter in output
review_modestructured or rawNoCloud only; default structured. Returns clean prose and typed review threads, or exact persisted CriticMarkup in raw mode

On Cloud, structured JSON also returns revision_checksum and a review object containing summary counts and typed comment/suggestion items. Use that checksum for review decisions and for ordinary edits while review work is open. Raw mode is an inspection escape hatch; agents should not author or mutate CriticMarkup directly.

edit_note

Edit an existing note incrementally.

ParameterTypeRequiredNotes
identifierstringYesExact note identifier
operationstringYesappend, prepend, find_replace, replace_section, insert_before_section, insert_after_section
contentstringYesNew content
sectionstringConditionalRequired for replace_section, insert_before_section, insert_after_section
find_textstringConditionalRequired for find_replace
expected_replacementsintegerNoDefault 1
replace_subsectionsbooleanNoFor replace_section; default true replaces nested subsections. Set false to preserve them
metadataobjectNoMerge frontmatter fields independently of the body operation; provided keys overwrite or add values
workspacestringNoCloud workspace containing the note (name or tenant ID)
expected_checksumstringNoCloud reviewed notes require the checksum from structured read_note; stale or intersecting edits are rejected

replace_section now follows Markdown heading levels. By default, a selected section extends through the next heading of the same or higher level, so replacing an ## section also replaces its nested ### subsections. Set replace_subsections=false to stop at the next heading of any level and keep nested subsections.

metadata preserves unrelated frontmatter and the note body. It ignores title, type, and permalink, which have dedicated handling, and does not support deleting keys.

On Cloud, edit_note preserves active review markers byte-for-byte. If an edit would change an anchored review range, it fails with the blocking review ID; use review_note to resolve or decide that item first. write_note(overwrite=true) is a full replacement and may remove review state.

review_note (Cloud)

Manage comments and suggestions on an existing Markdown note. Always begin with read_note(review_mode="structured", output_format="json"), and do not write CriticMarkup directly.

ParameterTypeRequiredNotes
identifierstringYesExact title, permalink, file path, external ID, or memory:// URL
commandcomment, suggest, reply, resolve, accept, or rejectYesOne review lifecycle action
anchorobjectConditionalRequired for comment and suggest. exact is a single-line prose selection; optional prefix, suffix, or one-based occurrence disambiguates repeated text
bodystringConditionalRequired for comment and reply; optional final reply when resolving a comment
suggestion_kindaddition, deletion, or replacementConditionalRequired for suggest
replacementstringConditionalRequired for addition and replacement suggestions; omit for deletion
review_idstringConditionalRequired for reply, resolve, accept, and reject; obtain it from structured read_note or a prior mutation response
expected_checksumstringConditionalRequired for accept and reject; optional stale-write guard for other commands

comment and suggest create attributed review records and return their IDs. reply works on comments or suggestions. resolve closes a comment without changing its anchored prose and can include a final reply. accept applies a pending suggestion; reject keeps the original prose. Every mutation is atomic and returns the new revision_checksum.

# Create a replacement suggestion
review_note(
  identifier="Launch plan",
  command="suggest",
  anchor={"exact": "Ship the beta on Friday."},
  suggestion_kind="replacement",
  replacement="Ship the beta after the security review."
)

# After a fresh structured read, accept it
review_note(
  identifier="Launch plan",
  command="accept",
  review_id="suggestion-id",
  expected_checksum="checksum-from-read-note"
)

See Comments and Suggestions for the complete human-and-agent workflow.

move_note

Move a note or directory.

ParameterTypeRequiredNotes
identifierstringYesNote or directory identifier
destination_pathstringConditionalTarget path. Mutually exclusive with destination_folder; parent folders receive v0.23.2 casing resolution
destination_folderstringConditionalTarget folder — moves note into folder preserving filename. Mutually exclusive with destination_path; each segment can reuse a unique case-insensitive folder match
is_directorybooleanNoDefault false. Set to true to move an entire directory

Folder casing resolution applies to note destinations, not directory renames. The response reports the actual landing path after a case-corrected move. Case-only folder renames and merging already duplicated case variants remain separate operations.

delete_note

Delete a note or directory.

ParameterTypeRequiredNotes
identifierstringYesNote or directory
is_directorybooleanNoSet to true to delete an entire directory and its contents

read_content

Read a file's content by path or permalink. Text files return as plain text; images are resized/optimized for display; other binary files return base64-encoded (subject to size limits). Useful for non-markdown files like images, PDFs, or attachments.

ParameterTypeRequiredNotes
pathstringYesFile path, permalink, or memory://... URL. Aliases: file_path, filepath, file

view_note

Render a note as a formatted artifact for display in MCP clients. Returns the note content in a presentation-friendly format.

ParameterTypeRequiredNotes
identifierstringYesNote title, permalink, or memory://... URL

open_basic_memory (Cloud)

Open the interactive Pocketbook in a compatible client. Use this when the user wants to see, browse, navigate, or interact with Basic Memory visually. Use read_note, search_notes, or list_directory instead when the assistant only needs data for its answer.

The default workspace and project resolve automatically. Do not call list_memory_projects first unless the user asks for project metadata or wants a non-default location.

ParameterTypeRequiredNotes
viewnotes, note, folders, search, or graphNoDefault notes. Destination screen
workspacestringNoWorkspace slug, name, or tenant ID. Omit for the default
projectstringNoProject name or qualified workspace/project name. Omit for the default
project_idstringNoExact external project UUID. Takes precedence over project
directorystringNoInitial folder for notes, folders, note, or search views
identifierstringConditionalRequired for view="note"; optional for view="graph" to focus a note. Accepts a title, permalink, memory:// URL, or exact note UUID
querystringNoInitial query for view="search" only
graph_modeoverview or fullNoDefault overview. Used only with view="graph"
note_modeview or editNoDefault view. Use edit to open a note directly in the editor; used only with view="note"

Examples:

open_basic_memory()
open_basic_memory(view="search", query="authentication")
open_basic_memory(view="folders", directory="research")
open_basic_memory(view="note", identifier="memory://main/plans/api", note_mode="edit")
open_basic_memory(view="graph", identifier="Architecture", graph_mode="full")

See Pocketbook for the user workflow.


Search and context tools

search_notes

Main search tool with text, vector, and hybrid modes plus structured filters.

ParameterTypeRequiredNotes
querystringNoSearch query. Optional for metadata-only searches. Supports tag: shorthand (e.g., "tag:security")
pageintegerNoDefault 1
page_sizeintegerNoDefault 10
search_typestringNoDefault None — resolves to hybrid when semantic search is enabled, text otherwise. Options: text, title, permalink, vector, semantic, hybrid
note_typesliststring or stringNoCase-insensitive frontmatter type filter (e.g., ["person", "meeting"]). Aliases: note_type, types
entity_typesliststring or stringNoKnowledge graph result filter: entity, observation, relation. Alias: entity_type
categoriesliststring or stringNoExact observation category filter (e.g., ["decision", "rule"]). When provided without entity_types, results default to observations.
after_datestringNoDate/time filter (ISO format)
metadata_filtersobject or JSON stringNoStructured metadata filters
tagsliststringNoTag filter shorthand
statusstringNoStatus shorthand
min_similarityfloatNoOverrides global semantic_min_similarity threshold per query
search_all_projectsbooleanNoDefault false. Search stays scoped to the resolved project; set true to search across every accessible project and workspace

The search_type parameter controls the search strategy. hybrid is the default — it combines keyword and semantic search. text is keyword-only. vector and semantic are equivalent — pure meaning-based similarity. See Semantic Search for details on each mode.

Search results expose each note's stable external_id in JSON and Markdown output. Use it for web-app deep links or exact follow-up operations instead of parsing a title or permalink.

Cloud search projects reviewed notes as clean prose rather than CriticMarkup. JSON note results include review_summary counts (open_comments, resolved_comments, pending_suggestions, and total_pending). If a stale search fragment splits or exposes review markup during asynchronous index reconciliation, Cloud omits that hit instead of returning ambiguous storage bytes.

Use categories for observation categories such as [decision], [rule], or [follow-up]. metadata_filters only checks note frontmatter, so metadata_filters={"category": "decision"} matches a frontmatter field named category, not observation categories. The singular category is accepted as an alias, and comma-separated strings work (categories="decision,rule"). Matching is exact, and categories only exist on observations — explicitly passing entity_types=["entity"] alongside categories returns nothing.

Parameter aliases.search_notes accepts q, search, or text as aliases for query; all_projects for search_all_projects; page_number for page; and limit / per_page for page_size. Search responses also include a result total for pagination.

build_context

Build context graph from a memory URL. Traverses the knowledge graph from a starting entity, following relations to a configurable depth.

ParameterTypeRequiredNotes
urlstringYesmemory:// URL or path
depthstring or integerNoTraversal depth (default 1). Use 2 or 3 for broader context
timeframestringNoTime window filter (default 7d). Accepts formats like 7d, 1 week, 30d, 3 months
pageintegerNoDefault 1
page_sizeintegerNoDefault 10
max_relatedintegerNoMaximum related entities per level (default 10)
output_formatstringNoDefault "json". Also accepts "text" for human-readable output

TimeFrame examples:

ValueMeaning
7dLast 7 days
30dLast 30 days
1 weekLast week
3 monthsLast 3 months
1 yearLast year

recent_activity

Recent activity in one project or cross-project discovery mode. When no project can be resolved at all (no parameter, no default project), it returns activity across all projects (discovery mode); otherwise it uses the resolved project.

Entity rows include external_id so clients can address the exact note returned.

ParameterTypeRequiredNotes
typestring or liststringNoFilter by result type: "entity", "relation", "observation"
depthintegerNoRelation traversal depth for context
timeframestringNoTime window (e.g., 7d, 30d, 1 week)
pageintegerNoDefault 1
page_sizeintegerNoDefault 10

Project and filesystem tools

list_memory_projects

List projects and project stats. Returns name, path, default status, note count, external project ID, and sync/workspace metadata for each project. In cloud mode, this discovers projects across every accessible workspace, not just the current one — so a team's projects show up without switching workspaces first.

ParameterTypeRequiredNotes
output_format"text" or "json"NoUse "json" when an agent needs exact project_id values for later tool calls

create_memory_project

Create a project.

ParameterTypeRequiredNotes
project_namestringYesName for the new project
project_pathstringYesFilesystem path for the project
set_defaultbooleanNoDefault false. Set to true to make this the default project
workspacestringNoCloud workspace name or slug to create the project in (cloud only)

delete_project

Remove a project from Basic Memory. Note files are retained by default.

ParameterTypeRequiredNotes
project_namestringYesName of the project to remove
delete_notesbooleanNoDefault false. Set to true to delete local files or purge every active cloud object under the project's storage prefix
workspacestringNoCloud workspace selector. From a local stdio MCP session, provide this to route deletion to cloud unless the session is already explicitly cloud-routed

Cloud purge behavior applies when the MCP session is hosted or factory-routed to cloud, explicitly cloud-routed, or given a workspace selector. From a local stdio MCP session, delete_notes=true alone does not switch this tool to cloud routing; pass workspace to ensure the hosted project and objects are targeted. Hosted deletion is asynchronous. The tool response reports the project deletion status and background job ID when the cloud backend queues the work. With delete_notes=false, cloud objects are retained even though the project and its indexed database rows are removed. With delete_notes=true, the background job removes indexed and unindexed objects under the exact project prefix before completing the hard delete. Existing snapshots follow their separate retention lifecycle.

list_directory

List directory contents with optional depth, glob filter, and sorting.

ParameterTypeRequiredNotes
dir_namestringNoDirectory path to list (root if omitted)
depthintegerNoHow many levels deep to list
file_name_globstringNoGlob pattern to filter returned files (e.g., *.md, schemas/*). Nonmatching directories are still traversed within depth
sortstringNoOrdering: title_asc, title_desc, updated_asc, or updated_desc. Omit for the default filename ordering
pageintegerNoOne-indexed page; default 1
page_sizeintegerNoNodes per page; default 10, maximum 200. Aliases: limit, per_page
output_format"text" or "json"NoJSON includes structured pagination metadata

Large listings are bounded. Continue with the next page instead of assuming one response contains every file. File nodes include external_id in both text and JSON output.

Glob filtering applies to returned nodes, not traversal. For example, depth=2 with file_name_glob="*.md" still finds Markdown files inside a folder whose own name does not match *.md.

Explicit sorts (v0.23) order folders before files, apply deterministically before pagination, and use note titles for title_* modes. Folders have no canonical update timestamp, so updated_* modes keep folders name-ascending while still listing them first.

list_workspaces

List available cloud workspaces. Returns workspace names and tenant IDs for the authenticated user.


Schema tools

Tools for defining, validating, and evolving note structure. See Schema System for concepts and workflow.

schema_validate

Validate notes against their schema. Pass note_type to validate all notes of a type, or identifier to validate a specific note.

ParameterTypeRequiredNotes
note_typestringConditionalNote type to validate (e.g., person). One of note_type or identifier required
identifierstringConditionalSpecific note path or permalink to validate
output_format"text" or "json"NoMachine-readable validation report

schema_infer

Analyze existing notes of a type and suggest a schema based on common patterns.

ParameterTypeRequiredNotes
note_typestringYesNote type to analyze (e.g., person)
thresholdfloatNoMinimum field frequency for inclusion (default 0.25)
output_format"text" or "json"NoMachine-readable inference report

schema_diff

Compare a schema definition against actual note usage to detect drift.

ParameterTypeRequiredNotes
note_typestringYesNote type to compare (e.g., person)
output_format"text" or "json"NoMachine-readable drift report

Diagnostics

basic_memory_diagnostics

Return a read-only Markdown report for support and installation troubleshooting. It takes no parameters and includes:

  • Basic Memory package and API versions;
  • Python, operating-system, and architecture details; and
  • the config path and current config contents with secrets and URL credentials redacted.
v0.23 removes the canvas, cloud_info, and release_notes MCP tools. Use the Cloud documentation, GitHub release notes, and your editor's native visualization features instead. See Upgrade to v0.23.

ChatGPT compatibility tools

These are compatibility wrappers for ChatGPT's MCP implementation, which uses a simplified two-tool interface by default. v0.23 gates them by MCP client identity: only OpenAI clients can call them.

  • search(query) — Search across the knowledge base. Equivalent to search_notes with default parameters.
  • fetch(id) — Retrieve full document content by permalink. Equivalent to read_note.

Non-OpenAI MCP clients receive a clear rejection and must call search_notes and read_note directly.

See the ChatGPT integration guide for usage details and limitations.