telys_search
Reference for the telys_search MCP tool — semantic and lexical search over a Telys memory collection, with an optional single-key equality filter.
telys_search runs a semantic + lexical search over a Telys memory collection and returns the best-matching records. It is one of the 19 tools on the Telys MCP server (telys mcp), called by name over JSON-RPC 2.0 (protocol version 2025-06-18) on stdio.
The server embeds query with its default embedder (AlgentaMultigramEmbedder, a lexical multigram space), searches the named collection in the active store ($TELYS_MEMORY_PATH, default ~/.telys/memory), and returns the matching external IDs and their metadata. The client selects the tool and fills the arguments from a natural-language prompt — you rarely call it by hand.
Input schema
Required: collection, query.
collection
string
yes
—
Name of the collection to search. Must already exist in the store.
query
string
yes
—
Text query. The server embeds it with the default embedder, then searches.
top_k
integer
no
5
Maximum number of hits to return, ordered best-first.
where
object
no
—
A single-key equality filter (Eq). Exactly one key is allowed; more than one raises an error.
Output schema
The tool returns a JSON object with this shape:
collection
string
Echoes the collection that was searched.
query
string
Echoes the query text.
hits
array
Matches ordered best-first. Each item is { "id": string, "score": number, "metadata"?: object }. score is the similarity score; metadata is present only when the record was stored with metadata.
Example call
A tools/call request from the client:
Every result is wrapped so a failure never crashes the server: the payload is JSON-encoded into one text content block, and isError signals success or failure.
Decoding the text field yields the tool payload:
In practice
Once connected, drive the tool in natural language and it fills the arguments:
Errors
On failure the server returns the same envelope with isError: true and a single text block of the form <Type>: <message> — for example, searching a collection that does not exist. See MCP configuration & scoping for the full error shape and Exceptions & error codes.
See also
Tool: telys_add — write the documents this tool searches.
Search by text — the SDK equivalent, with scores and
explain.Filter results — how
Eq/ single-key filters behave.MCP configuration & scoping — store path, install scope, and result wrapping.
Last updated
Was this helpful?