Skip to navigation

Find a phrase in a document or a text file

View as Markdown

Find a phrase in a document, a skill or a text file, without reading all of it. Give docId or fileId. Returns each matching line with its line number and the lines around it. The match ignores case. Use the returned text as oldText in edit_doc, edit_skill or edit_file. To read more lines, use read_lines.

Authentication

AuthorizationBearer

A Basement key (bsmt_...), from Agents, Connect in the app.

Request

This endpoint expects an object.
querystringRequired
The phrase to find, on one line
docIdstringOptional

The document ID from list_docs

fileIdstringOptional

The file ID from list_files, list_skills or search

contextLinesdoubleOptional

Lines to return before and after each match (default 2, maximum 10)

limitdoubleOptional

Max matches (default 20, maximum 50)

Response

The tool's answer.
totalLinesinteger
totalMatchesinteger
matcheslist of objects

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error
500
Internal Server Error