Replace a piece of a document
Replace one piece of text in a document’s markdown body, without sending the full body. Give oldText exactly as it is in the document (read it with read_doc). oldText must occur one time. Basement records a new version that you can restore. You cannot change agent-memory documents (isAgentMemory in list_docs). Requires write access.
Authentication
AuthorizationBearer
A Basement key (bsmt_...), from Agents, Connect in the app.
Request
This endpoint expects an object.
docId
The document ID from list_docs
oldText
The text to replace, exactly as it is in the document
newText
The new text. An empty string deletes oldText
changeSummary
One line on what changed and why
Response
The tool's answer.
ok
noop
true when the text was already the same
versionCount
The document's new version
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error
500
Internal Server Error