search
Find passages in the TLG by substring, simple regex, or multiple co-occurring patterns; scope by author, work, or corpus and control Greek accent matching.
Instructions
Brute-force text search of the TLG for one or more patterns (substring match; put spaces around a pattern to match whole words). Greek in Unicode: give all accents for strict matching or none for accent-insensitive matching. Simple regex (alternation, character classes, ? + *) is allowed. With several patterns, hits are passages where min_matches of them co-occur within the context. To find every inflected form of a word use morph_search instead. Unscoped searches cover the whole TLG and can take a while.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"patterns": "<patterns>"
},
"name": "search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max passages to return (default 20). | |
| works | No | Specific works per author: {"0557": ["002"]} = Epictetus, Enchiridion. Find numbers with list_works. | |
| corpus | No | Name of a saved Diogenes corpus (see list_corpora). Takes precedence over authors/works. | |
| offset | No | Skip this many passages (for paging). | |
| reject | No | Discard hits whose context contains this pattern. | |
| authors | No | TLG author numbers to search all works of, e.g. ["0557"]. Find numbers with list_authors. | |
| context | No | Context per hit: "sentence" (default), "clause", "phrase", "paragraph", or a number of lines. | |
| patterns | Yes | One or more search patterns. | |
| count_only | No | Return only counts, no passage text. | |
| min_matches | No | With several patterns: how many must occur together ("all" by default). |