Search Documents
searchFind documents in your Scrivener project by searching content or titles, with relevance-ranked snippets. Supports full-text, semantic, and regex queries across active or trashed documents.
Instructions
Search the open project and return matching documents with relevance-ranked snippets. By default performs an intelligent full-text/semantic search of document content; set field to "title" for a fast case-insensitive title lookup, or scope to "trash" to search only trashed documents. For meaning-based "find passages about X" queries use semantic_search; to find every occurrence of a specific name or term use find_mentions. Requires an open project.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| field | No | "content" (default) searches document body text; "title" matches document titles only (fast, case-insensitive substring). | |
| query | Yes | Search query: keywords for full-text search, or a natural-language phrase for semantic search, depending on the tool. | |
| regex | No | Treat the query as a regular expression. Default false. Content search only. | |
| scope | No | "active" (default) searches the live binder; "trash" searches only trashed documents. | |
| searchIn | No | Additional metadata fields to include in content search, e.g. "synopsis", "notes". | |
| caseSensitive | No | Match case exactly. Default false. Applies to content search. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| results | Yes | Matching documents. Field set varies by search mode: content/semantic searches return id/title/snippet/score; title search returns id/title/type/path; trash search returns documentId/title/matches. |