sgbr_autocomplete
sgbr_autocompleteCompletes a partial term into grouped title, author, or subject suggestions for books-as-data searches, not filter values.
Instructions
Complete a partial term into title, author, or subject search phrases. These are not filter values: author and subject suggestions come from a different vocabulary than filters.author / filters.subject_heading read, so as filters most return a clean zero and the rest match the wrong entity (a namesake, a printing house). Take filter values from sgbr_facet_values (for authors: facet="author", scope="author", the surname as query), which also ranks the most frequent name first — prefix-ranked suggestions can miss the dominant form entirely. Returns grouped suggestion lists, plus exact_term_records when scope is a single group (the backend reports no count for scope="all"): that counts records matching your query as a complete term, not the suggestions — a partial prefix scores 0 beside a full suggestion list, so never read it as "no records".
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": {
"query": "<query>"
},
"name": "sgbr_autocomplete"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max suggestions per group (max 25). | |
| query | Yes | A partial term (prefix) to complete, e.g. "Burck". Matched against title/author/subject index terms. | |
| scope | No | Which suggestion group(s) to return: "all" (title + author + subject), or one of them. | all |
| full_text_only | No | If true, suggest only from items that have machine-readable full text. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| scope | Yes | ||
| warnings | No | ||
| suggestions | Yes | ||
| full_text_only | Yes | ||
| exact_term_records | Yes |