Skip to main content
Glama
books-as-data
by kintopp

sgbr_autocomplete

sgbr_autocomplete
Read-onlyIdempotent

Completes 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

NameRequiredDescriptionDefault
limitNoMax suggestions per group (max 25).
queryYesA partial term (prefix) to complete, e.g. "Burck". Matched against title/author/subject index terms.
scopeNoWhich suggestion group(s) to return: "all" (title + author + subject), or one of them.all
full_text_onlyNoIf true, suggest only from items that have machine-readable full text.

Output Schema

NameRequiredDescriptionDefault
queryYes
scopeYes
warningsNo
suggestionsYes
full_text_onlyYes
exact_term_recordsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.30.2

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover read-only, idempotent, open-world and non-destructive traits, and the description goes well beyond them: it discloses that exact_term_records counts records matching the query as a complete term rather than counting suggestions, and that the backend reports no count for scope="all". It also warns that a partial prefix yields 0 beside a full suggestion list, preventing a serious misinterpretation of the response.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and the strongest warning are front-loaded, and nearly every clause carries a distinct trap or routing instruction. It is dense and runs long with stacked caveats in the final sentence, so it is efficient but not maximally scannable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite an output schema existing, the description supplies the interpretive guidance an agent needs about exact_term_records and the missing count for scope="all" — exactly the kind of nuance a schema cannot convey. For a four-parameter, read-only suggestion tool, nothing needed to call or interpret it is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: it clarifies that the prefix is matched against title/author/subject index terms and that the author/subject vocabulary differs from the filter vocabulary. It also ties scope to output shape by noting exact_term_records appears only when scope is a single group, giving scope more semantic weight than the enum alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource: 'Complete a partial term into title, author, or subject search phrases,' which immediately separates it from sgbr_search (record retrieval) and sgbr_facet_values (filter vocabulary). The scope of the output (grouped title/author/subject suggestions) is stated in the first clause, so an agent can identify the tool without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when NOT to use it ('These are not filter values') and names the correct alternative with concrete invocation details for sgbr_facet_values (facet="author", scope="author", surname as query). It even explains why the alternative wins (prefix-ranked suggestions can miss the dominant name form), which is a full when/when-not/alternative treatment.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.