Skip to main content
Glama

n2_context_search

Search Brain memory and Ledger entries to find relevant past context for AI agents. Use keyword or semantic search with recency weighting to support session continuity and handoffs.

Instructions

Search across Brain memory and Ledger entries for relevant past context. Uses keyword matching with recency weighting.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "n2_context_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesSearch query (keywords, space-separated)
sourcesNoSources to search: "brain", "ledger". Default: all.
semanticNoEnable semantic search via Ollama embeddings (default: auto from config)
maxResultsNoMax results (default: 10)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv9.2.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, "Search" suggests a non-mutating read but does not explicitly establish safety or side effects. "Keyword matching with recency weighting" usefully discloses retrieval and ranking behavior, but result shape, error behavior, and how semantic mode changes that mechanism remain unexplained.

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?

Two short sentences front-load the purpose and retrieval mechanism without filler or unnecessary repetition. The length is appropriate for a simple four-parameter search tool.

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

Completeness3/5

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

The description and fully documented schema are sufficient for a basic invocation, with only query required and every option explained in the schema. With no output schema or annotations, however, the definition still leaves result contents, ranking and semantic-search interaction, and selection versus closely related memory/search siblings unclear.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents query syntax, source values and defaults, semantic search, and result limits. The keyword-matching statement gives some intuition for query construction, but the description adds no substantial parameter-specific guidance or clarification of how semantic=true interacts with keyword queries.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description specifies the operation ("Search"), resources ("Brain memory and Ledger entries"), and goal ("relevant past context"). It does not distinguish this tool from sibling retrieval tools such as n2_brain_read, n2_kv_search, or n2_mimir_recall.

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

Usage Guidelines3/5

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

The phrase "for relevant past context" implies use when retrieving historical context across Brain and Ledger. There is no explicit when-to-use or when-not-to-use guidance, prerequisite, or routing to alternatives for single-source or specialized searches.

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