Skip to main content
Glama

telys_search_lexical

Read-onlyIdempotent

Find exact keyword matches with BM25 lexical search when semantic search is fuzzy, retrieving identifiers and rare tokens by query from collections with a built lexical index.

Instructions

On-device BM25 lexical (keyword) search — exact-term matching for identifiers and rare tokens where semantic search is fuzzy. Requires the collection to have been created with lexical=True AND telys_build_lexical to have run, otherwise the call fails. Required: collection, query. Optional: top_k (default 5), where (single-key equality filter), explain (default false; include per-hit score explanations). Fails when the collection does not exist or the lexical index was never built.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
top_kNo
whereNooptional single-key equality filter
explainNo
collectionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive behavior. The description adds valuable behavioral context beyond that: the dependency on collection creation with lexical=True, the need for telys_build_lexical to have run, and the exact failure modes when the collection or index is missing. This meaningfully fills gaps that annotations do not cover.

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 compact and front-loaded: the core behavior and key differentiator appear first, followed by prerequisites, parameters, and failure conditions. Every sentence earns its place; there is no filler or redundancy with the schema.

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 search tool with five parameters and no output schema, the description covers the essential operational context: purpose, prerequisites, failure modes, and parameter semantics. It does not describe the return shape or pagination, but for a keyword search this is a modest gap given the annotations already convey safety.

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 description coverage is only 20%, so the description carries the load. It explains the required collection and query, assigns meanings to optional top_k and explain (including 'per-hit score explanations'), and reinforces the where parameter's single-key equality filter. It adds useful semantic detail beyond the bare schema, though it does not describe value formats or constraints for collection/query.

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 states a specific verb and resource: on-device BM25 lexical search. It explicitly contrasts with fuzzy semantic search, and the detail about exact-term matching for identifiers and rare tokens helps distinguish it from the sibling telys_search. It also names the required prerequisites, making the tool's role unambiguous.

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

Usage Guidelines4/5

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

The description gives clear context on when to use lexical search (exact-term matching where semantic search is fuzzy) and lists the hard prerequisites (lexical=True and telys_build_lexical must have run). It does not explicitly name the alternative sibling telys_search, but the semantic-vs-lexical contrast provides sufficient usage guidance.

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