Skip to main content
Glama
keshrath

agent-knowledge

by keshrath

knowledge_search

Search past sessions and knowledge entries using hybrid TF-IDF and semantic similarity, with scoped filters for errors, plans, configs, tools, files, and decisions.

Instructions

Search across sessions AND knowledge entries. Returns {mode, sessions, knowledge}. General mode (no scope): hybrid TF-IDF + semantic over both sources, with optional MMR diversity and category boost. Scoped mode (scope set): sessions-only filtered recall for a specific domain (errors, plans, configs, tools, files, decisions).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mmrNoApply Maximal Marginal Relevance re-ranking to knowledge results (default: false). Trades a small amount of top-1 relevance for diversity in the top-K.
roleNoFilter by message role (default: all, ignored when scope is set)
queryYesSearch query -- supports keywords and phrases
scopeNoSearch scope (optional): errors (stack traces), plans (architecture, TODOs), configs (settings, env vars), tools (MCP tool calls), files (file paths, code refs), decisions (trade-offs, choices), all (no filter). When set, response mode switches to "scoped" and results are sessions-only.
rankedNoUse TF-IDF ranking (default: true, ignored when scope is set). Set false for regex mode.
explainNoWhen true, each knowledge hit carries `score_components` (bm25, decay, maturity, confidence, category_boost, mmr_penalty).
projectNoRestrict search to sessions from this project
categoryNoKnowledge category hint (optional). By default applied as a boost (non-matching kept, matching +25%). Pass category_mode="filter" for the legacy hard-filter behavior.
semanticNoBlend semantic vector similarity with TF-IDF (default: true). Falls back to pure TF-IDF if embeddings unavailable.
mmr_lambdaNoMMR tradeoff 0-1 (default: 0.7). 1.0 = pure relevance; 0.0 = pure diversity.
max_resultsNoMaximum number of results to return (default: 20)
category_modeNoHow `category` is applied to knowledge results (default: "boost"). "boost" keeps all entries but gives matching-category entries a 25% score boost; "filter" restricts to matching category only.
Behavior5/5

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

With no annotations, the description carries the full burden of behavioral disclosure, and it excels. It reveals the return shape ({mode, sessions, knowledge}), explains the hybrid ranking (TF-IDF + semantic), discloses fallback behavior (pure TF-IDF if embeddings unavailable), details the boost/filter semantics of category, and even mentions the 'score_components' breakdown when explain=true. This is comprehensive transparency for a read-only search tool.

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 dense but well-organized: it leads with the core action and return format, then systematically explains the two modes and key behaviors. Every sentence adds distinct information (modes, ranking, fallback, category handling) with no filler. It is long, but each phrase earns its place given the tool's complexity.

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

Completeness5/5

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

For a tool with 12 parameters, 4 enums, and no output schema, the description covers the critical decision points: mode selection, source scope, ranking approach, category application, and MMR parameter meaning. It explains the return envelope and the score breakdown for explain mode. No essential usage context appears missing; the schema handles parameter-level details, and the description supplies the higher-level orchestration model.

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 coverage is 100%, so each parameter is already described. The description adds meaningful context beyond the schema by explaining how scope switches modes, how category boost/filter interacts with category_mode, the MMR tradeoff (lambda 1.0 = pure relevance, 0.0 = diversity), and that 'role' is ignored in scoped mode. This is valuable semantic glue, though it doesn't cover every parameter explicitly – some are only in the schema.

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 specific verb and resource: 'Search across sessions AND knowledge entries.' It immediately clarifies the dual-source nature and then distinguishes two modes (general vs. scoped) with clear scope semantics. This cleanly differentiates it from sibling tools like knowledge_session or knowledge_graph, which are likely more specialized.

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 provides explicit guidance on when to use general mode (no scope) vs. scoped mode ('scope' set), including that scoped mode is sessions-only and filtered by domain. It mentions the behavior of parameters like 'role' being ignored when scope is set. However, it does not name any sibling tools as alternatives or give exclusion conditions, so the guidance is strong but not complete.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/keshrath/agent-knowledge'

If you have feedback or need assistance with the MCP directory API, please join our Discord server