Replace a piece of a text file
Replace one piece of text in a text file, without sending the full content. Give oldText exactly as it is in the file (read it with read_file). oldText must occur one time. Basement saves a new version. For a file that is not text, use write_file. Requires write access.
Authentication
AuthorizationBearer
A Basement key (bsmt_...), from Agents, Connect in the app.
Request
This endpoint expects an object.
fileId
The file ID from list_files, list_skills or search
oldText
The text to replace, exactly as it is in the file
newText
The new text. An empty string deletes oldText
Response
The tool's answer.
versionCount
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error
500
Internal Server Error