Skip to main content
Glama

telys_build_lexical

Idempotent

Build and persist a BM25 lexical index for an existing collection, enabling lexical search after bulk ingestion.

Instructions

Fit the BM25 lexical index over the collection's retained tokens and persist it; the collection must have been created with lexical=True. This builds the lexical BM25 index; telys_build_ivf builds the IVF vector index. Run after bulk ingestion and before telys_search_lexical. Required: collection. Optional: k1 (default 1.8; term-frequency saturation) and b (default 1.0; document-length normalization). Fails when the collection does not exist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bNoBM25 document-length normalization
k1NoBM25 term-frequency saturation
collectionYesname of an existing collection created with lexical=True

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.1
    • addedInput schema / properties / b / description
      Added value: +"BM25 document-length normalization"
    • addedInput schema / properties / collection / description
      Added value: +"name of an existing collection created with lexical=True"
    • addedInput schema / properties / k1 / description
      Added value: +"BM25 term-frequency saturation"
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already establish the safety profile (write, idempotent, non-destructive), and the description adds consistent behavioral context beyond them: the index is persisted, the build requires an existing lexical collection, and it 'Fails when the collection does not exist.' No contradiction with annotations — it supplements them with workflow state and failure modes.

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?

Four purposeful sentences: action+precondition, sibling differentiation, workflow ordering, and parameter/failure summary. Nothing is wasted, though the parameter recap partially duplicates the schema; it remains tight and front-loaded with the core action.

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

Completeness4/5

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

With no output schema, the description reasonably omits return values, and it fully covers prerequisites, workflow ordering, parameters, and failure mode. The only gap is behavior when the index already exists, but the idempotentHint=true annotation covers re-invocation safety.

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

Parameters3/5

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

Schema coverage is 100%, so the schema already documents collection, k1, and b with defaults and semantic descriptions. The description restates k1 as 'term-frequency saturation' and b as 'document-length normalization,' mirroring the schema rather than adding new meaning, so the baseline-3 applies.

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?

The description opens with a concrete verb-resource pair — 'Fit the BM25 lexical index over the collection's retained tokens and persist it' — clearly stating what the tool does. It explicitly contrasts with telys_build_ivf, making the distinction from its closest sibling unambiguous.

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?

It names the direct alternative (telys_build_ivf builds the IVF vector index) and states the exact operational window: 'Run after bulk ingestion and before telys_search_lexical.' The precondition that the collection 'must have been created with lexical=True' further pinpoints when the tool is valid, leaving no inference to the agent.

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