Skip to main content
Glama

telys_build_lexical

Idempotent

Build a BM25 lexical index for a collection after bulk ingestion, persisting it for later lexical search. Requires the collection; tunes term-frequency saturation with k1 and length normalization with b.

Instructions

Fit the BM25 lexical index over the collection's retained tokens and persist it; the collection must have been created with lexical=True. 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
bNo
k1No
collectionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

The description adds behavioral detail beyond annotations: it discloses the failure condition when the collection doesn't exist, and notes the persistence of the index. It does not contradict annotations and aligns with idempotentHint and destructiveHint. It could mention behavior when lexical=False, but it's implied by the prerequisite.

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

Conciseness5/5

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

The description is concise, front-loads the main action, and organizes preconditions, parameters, and failure behavior in a logical order. Every sentence adds value.

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?

For a build tool with three parameters and no output schema, the description covers the core context: purpose, sequencing, prerequisites, and parameter meaning. It doesn't detail the effect on an existing index or the exact failure mode for lexical=False, but these are minor given the annotations.

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

Parameters5/5

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

Despite 0% schema description coverage, the description explains the purpose of k1 (term-frequency saturation) and b (document-length normalization) and their defaults, which the schema does not provide. This adds meaningful semantics beyond the raw type definitions.

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 clearly states the action (fitting a BM25 lexical index), the resource (collection's retained tokens), and the outcome (persist). It also names the prerequisite and sequencing, distinguishing it from other build tools like telys_build_ivf by the 'BM25 lexical' specificity.

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 to run (after bulk ingestion, before telys_search_lexical) and the required condition (collection created with lexical=True). This gives clear operational guidance without needing to inspect other tools.

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