add_file
ChatGPTSave a file the user attached in the chat into a Space as a new file. Use it only when the user asks to save, add or upload a file to Mempipe. Pass the attachment as file and choose path: the file's own name at the Space root, unless the user named a folder. Adds PDF (.pdf), Markdown (.md) and CSV (.csv); the extension must match the file's contents. Missing folders are created; an existing path fails and nothing is overwritten, so pick another name. Returns JSON {path, size_bytes, content_type, resource_version}. A PDF or Markdown file is then processed for reading and search, which takes a moment; read_document reports when it is ready. To save text you wrote yourself, use write_file instead. Requires write access, granted at consent.
app_read_view_object
ChatGPTFor the Mempipe App only. Reads one text object from a file's served derived view, as GET …/views/{view_key}/objects/{object_path} does. Returns JSON {path, view_key, object_path, artifact_id, resource_version, content_type, text}; resource_version is null when the served object no longer matches the file's current content.
delete_file
ChatGPTDelete one file from a Space. Use it only when the user asks to delete or remove that file. Pass the file's path and, as expected_version, the resource_version from a fresh read_text_file or inspect_file of it: the delete lands only if the file has not changed since, and otherwise fails without deleting. Folders are refused; delete the files in them one at a time. A deleted file leaves the Space's listings and search at once. Returns JSON {path, deleted, resource_version}. Requires write access, granted at consent.
glob
ChatGPTFind files in the Space matching a glob pattern. Returns one Space-relative file path per line, sorted alphabetically (or (no matches) when empty). Standard glob syntax: * matches any chars except /; ** (as a complete segment) matches any chars including /; ? matches one char except /; [abc] / [a-z] / [!abc] are character classes; {a,b,c} is alternation; \* is a literal star. Examples: docs/**/*.md, **/README.md, data/2026-[0-9]/*.csv, notes/{personal,work}/*.md. Result capped at 500 entries; narrow the pattern for larger trees.
grep
ChatGPTSearch file contents in the Space with grep. pattern is a regular expression by default (set regex false for a literal substring). Returns JSON {hits, next_cursor, read_document_guidance?}. Each hit carries {path, line_no?, line_count?, page_no?, text, citation_url?, freshness?}; current hits omit freshness, while non-current hits carry its complete object. To read from a current document hit, pass its path and 1-based line_no directly to read_document. Scope with glob (e.g. docs/**/*.md), path, or file_type (e.g. md); case is sensitive|insensitive|smart (default smart). Size the page with limit (default/max 200); when next_cursor is non-null, pass it back as cursor. A pattern with no indexable run of ≥3 alphanumerics (or any punctuation) is refused unless scoped by a filter. Empty hits means no matches in the available index — never proof the Space lacks the content; a SEARCH_NOT_READY error means documents exist but search coverage is unavailable. Use the glob tool to search by filename instead, search for natural-language ranking.
inspect_file
ChatGPTInspect a known file path: what it is, which representations are currently served, and the exact next tool invocations. Returns a bounded JSON descriptor: content_type, size_bytes and resource_version (the file's current version, the expected_version that write_file takes, and delete_file where it is served, for any file type); representations — the currently served ways to read the file (original = exact raw bytes, document = derived citable text, tabular = queryable dataset; derived entries carry freshness); and operations — {representation, tool, arguments} entries you can call as-is or edit (e.g. a query preview's SQL). Pure metadata: reads no content and triggers no derivation. An absent representation is not currently served — the corresponding read tool remains authoritative for why, and new uploads usually derive within a minute. Use it after list_directory/glob/grep/search, when you know a path but not how to use it.
list_directory
ChatGPTList the children of a directory in the Space. Returns one entry per line, prefixed with [FILE] or [DIR]. Use "" or "/" for the Space root. Result capped at 200 entries — a larger folder's listing is incomplete; glob can still find files by pattern.
list_spaces
ChatGPTList the Spaces this connection can read. Returns JSON {spaces: [{org, space, name, org_name, max_file_bytes}], can_write}: pass an entry's org and space to a Space-scoped tool to work in that Space. max_file_bytes is the largest file that Space's plan accepts. can_write says whether this connection may add, replace and delete files; when it is false and the user asks to save or delete, tell them to reconnect Mempipe and tick write access at consent. Call it first, and again when a Space you expect is missing. An account with no Spaces gets a message naming where to create one.
open_mempipe
ChatGPTOpen Mempipe's document library. Select a Space, search existing documents, read evidence, open returned source citations and add files. Without an interactive UI, call list_spaces, then search and read_document with the chosen org and space.
query
ChatGPTRun a read-only SQL SELECT over the Space's derived tables. Send inline sql referencing files by Space-relative path with mp_table('data/sales.csv') — up to 8 references per query, joins across them included — or send file (a saved .sql path) to run that query by reference: the server strips its SQL Frontmatter and runs the body, with relative mp_table('./…') addresses resolving beside the file. context (with sql only) anchors relative addresses at that file's directory. Returns JSON {columns, rows, truncated, freshness} — the same result shape as REST POST …/query. Rows are capped (truncated true when cut; no pagination — aggregate or filter instead) and the serialized result is byte-budgeted. freshness says whether a served table lags its file's current content. A file whose table is still deriving fails with VIEW_NOT_READY — retry once derivation completes.
read_document
ChatGPTRead a file's derived document representation — the rendered, citable text the workbench displays — as a bounded line window. Works for any format that derives a document (Markdown, PDF); use read_text_file for a file's exact raw content instead. Returns JSON: text is the window, line-numbered; each node_spans entry {citation_url, node_id, line_no, line_count, kind, page_no?} names the citable node covering those lines — copy its absolute citation_url exactly. Page with line_no/max_lines via next_line_no. For a current grep/search hit, pass its path and line_no directly to this tool; a hit carrying freshness may address an older document generation. A follow-up read serves the currently served derived text and carries its own freshness. freshness describes the served snapshot: stale true means it lags the file's current content — if revalidating is true a refresh is in flight (re-read shortly); if false this is the last available representation, so disclose the staleness rather than retrying blindly. A DOCUMENT_NOT_READY error means derivation is still pending — retry shortly.
read_document_asset
ChatGPTLook at one figure from a document you have read. read_document renders figures as Markdown image references (); pass that exact URL as asset, with the same path you read. Returns a JSON block — path, asset, mime_type, size_bytes, freshness, plus a short-lived url (valid for expires_in_seconds) that fetches the image bytes directly — followed by the image itself as an image block when it is small enough to inline (inline true). A larger figure comes back URL-only with a note: fetch the url if your host can read an image file; the URL expires, so it is for fetching now, not for citing. Only figures the document registers are readable — asset is matched whole, never resolved as a file path, so this cannot reach other files in the Space (read_text_file reads those). freshness describes the document snapshot served right now, the one a read_document call made now would report; an earlier read may have seen a different generation. Call it only for a figure you actually need to see; text is cheaper.
read_text_file
ChatGPTRead a file's EXACT current text — the raw stored bytes as UTF-8. Returns JSON {path, resource_version, text}. text is numbered (1: text…) and byte-exact: each line keeps the file's own terminator (LF or CRLF, and whether the file ends with a newline), so stripping the N: prefixes reconstructs the file byte for byte — preserve the terminator style and the trailing-newline state when you edit. Use view_range ([start, end], 1-indexed, -1 = to end) to read a slice of lines. Use read_document instead when you need citable evidence. resource_version is the exact version the returned text came from.
resolve_wiki_name
ChatGPTResolve a bare wiki name ([[Note]]) to the file the user-facing renderer opens — the canonical resolution, not an alphabetical pick. For [[Note#Heading|Alias]], pass name: "Note" — the text inside the brackets excluding brackets, fragment, and alias. Path-shaped links ([[docs/Note]], [[./Note]]) bypass this tool: append .md when the final segment has no extension; resolve ./ or ../ against the linking file's directory and other slashed targets from Space root; then pass the normalized path to read_document or read_text_file. Ranking: shallowest depth wins; within the winning depth, files under the from file's folder, then an exact match of the typed form, break ties. An extensionless name gets .md appended (the wiki default). Returns JSON: the winning path; ambiguous (true when multiple winning-depth candidates exist and the winner is not the sole exact-spelling match — disclose the alternatives when it matters); candidates (winner first; remaining winning-depth candidates, capped at 20). Names match whole filenames only (case- and Unicode-form-forgiving, accent-sensitive) — use glob for pattern discovery.
search
ChatGPTSearch the Space for passages that answer a question, in your own words: ranking matches meaning as well as keywords. Returns JSON {next_offset, vectors_unavailable?, read_document_guidance?, hits}, hits most relevant first. Each hit is a passage of a file: {path, line_no, line_count, page_no?, text, score, freshness?, citations}. text is the passage's exact lines, numbered N: line. citations has one {citation_url, line_no, page_no?} per unit of the passage: cite the entry whose lines hold your claim. current hits omit freshness, while non-current hits carry its complete object. To read around a hit, pass its path and line_no directly to read_document. mode is hybrid (default), vector or bm25; when hybrid search cannot reach its embedding model it ranks by keywords and sets vectors_unavailable. Scope with glob, path, or file_type; size the page with limit (default 10, max 20) and page with offset, passing a non-null next_offset back. Empty hits means no matches in the available index — never proof the Space lacks the content; a SEARCH_NOT_READY error means documents exist but search coverage is unavailable. Use grep for exact regex/literal matching.
write_file
ChatGPTCreate a text file in the Space, or replace one in full — expected_version pins which. OMIT expected_version to create a new file: missing folders are created automatically, and an existing path fails (nothing is overwritten). PASS expected_version to replace an existing file: use the resource_version from a fresh read_text_file of that file, apply your change to that exact text, and write the complete result — a write is the FULL content, never a diff, and search snippets or read_document's derived text are never an edit base (a partial-knowledge overwrite loses the rest of the file). Replacement keeps the file's identity, so links and citations to it keep working. Returns JSON {path, created, size_bytes, resource_version}; resource_version is the file's new version — a follow-up edit to content you just wrote can pass it directly as expected_version (the full text you wrote is a valid edit base); after anything else, re-read first. A replace fails without writing when the file changed after your read, or was renamed, moved, or deleted — re-read (or re-locate) the file, re-apply your change to its current text, and write with the new resource_version; never resend the same write. Writable types: Markdown (.md), SQL (.sql), Vega-Lite chart specs (.vl.json); the file's content type is set from the extension. Content is capped at 256 KiB. Use this only when the user asks you to draft, save, or update a file (a report, note, or query) — answering a question never requires a write. In authored Markdown, cite Space evidence with a standard Markdown link whose destination is a returned citation_url; copy that URL exactly. Embed a live file with ![[path]] — a .csv renders as a table, a .sql as its query result, a .vl.json as a chart. Requires the mcp:write scope, granted separately at consent; without it this tool is not listed and a call is refused.