Skip to main content

Knowledge

MCP tools for the Knowledge module. See the Knowledge module docs for permissions and data model.

search-knowledge​

Search knowledge

Arguments​

ArgumentTypeRequiredDescription
project_idstringnoLimit search to a specific project
querystringnoSearch query text. Runs a vector query and a full-text query over each store and fuses the rankings; the full-text channel matches exact tokens and phrases, the vector channel everything else.
min_similaritynumbernoMinimum raw cosine similarity_score a vector candidate must reach to take part in ranking, applied before fusion. Only applies when query is provided. Lexical candidates are deliberately exempt: a result that literally contains the searched token is the evidence, and dropping it for a low cosine is the failure hybrid search exists to prevent. Not a floor on score, whose fused value encodes rank position rather than similarity.
rrf_knumbernoThe k in the reciprocal rank fusion term 1 / (k + rank), which sets how steeply a result's contribution decays with its position in each ranked list. A smaller value weights the very top of each list more heavily. Defaults to the deployment's KNOWLEDGE_RRF_K, itself 60 by default. Only applies when query is provided.
recency_half_life_daysnumbernoHalf-life, in days, of a recency decay applied to memory store results after fusion: a result's score is multiplied by 2 ^ (-age_in_days / recency_half_life_days), where age is measured from its updated_at. Document results are never decayed. 0 — the default, and the default of the deployment's KNOWLEDGE_RECENCY_HALF_LIFE_DAYS — disables the blend entirely; it is a switch, not a lower bound, and sending 0 turns off a deployment-wide decay for this one request. Accepts fractions (0.5 is twelve hours). How many ranks a given half-life costs depends on rrf_k. Only applies when query is provided. No value is known to be safe in general: every half-life measured against the reference corpus that lifted recency-sensitive queries also cost relevance-sensitive ones, which is why this ships disabled. Measure against your own corpus before setting it — see the Retrieval Quality guide.
limitnumbernoMaximum number of results to return (default 10). A value above 100 is clamped to 100 — the ceiling bounds the vector scan this one request performs, so a larger limit returns everything there is up to that many rows rather than being refused.
include_documentsbooleannoSet false to leave the document store out of this search. A query names no store, so it reaches both; the store-specific filters narrow within a store rather than choosing between them. This is the switch, and a filter naming the other store never overrides it. false for both stores is 400.
include_memoriesbooleannoSet false to leave the memory store out of this search. The mirror of include_documents, for a caller that wants documents alone.
memory_store_idsarray<string>noSearch memories within these specific memory stores
document_pathsarray<string>noFilter results to documents whose file path starts with one of these prefixes
document_idsarray<string>noFilter results to specific document IDs
tagsanynoFilter results to documents and memories whose tags contain every one of these key-value pairs (exact, case-sensitive match). Scopes both stores, so passing it alone searches both — as query does. For memories it matches at memory granularity: a memory is returned when its parent memory store's tags match or its own do.
metadataanynoFilter document results by their metadata bag. A document-store filter: a memory carries no such bag, so passing it alone searches documents, as document_paths does.