Skip to main content
Glama

Search Memories

memory-search

Search long-term memories to retrieve relevant facts, preferences, decisions, and rules using natural-language queries and filters. Return JSON or formatted text for prompt injection.

Instructions

Search long-term memories. Returns relevant facts, preferences, decisions, and rules. Set format=true to get pre-formatted output for prompt injection.

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": "memory-search"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagNoFilter by exact tag match. Consumer-defined (e.g. "cortex_type:action_item").
queryYesNatural language search query.
topicNoFilter by topic.
domainNoFilter by domain/project.
formatNoIf true, returns formatted text grouped by cognitive layer instead of JSON.
maxResultsNoMax results (default: 10, max: 500).
graphRerankNoGraph-aware rerank mode. Default is `"lite"`: 1-hop expansion + score boost (HippoRAG-lite, fast, self-no-ops without graph data). `false` = pure similarity ranking. `"ppr"` = full Personalized PageRank walk from query-seed entities (Gutiérrez et al, NeurIPS 2024 — more accurate on multi-hop QA at modest extra cost). PPR falls back to lite when the graph has < 4 entities or > 500 nodes.
budgetTokensNoToken budget for the returned set. Greedy fill by score × importance, stops before exceeding the budget. Alternative to maxResults for context-slot callers.
cognitiveLoadNoFrom Persona. "high" returns top 3 only.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. 'Search' strongly implies a read-only operation and the description names the kinds of results returned, but it does not explicitly confirm no side effects, describe auth/permission requirements, or explain ranking/result-ordering behavior.

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?

Three short sentences with no wasted wording. The core purpose is front-loaded, and the format=true hint is clearly separated and easy to act on.

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?

For a nine-parameter retrieval tool with no annotations and no output schema, the description covers purpose and returned content categories but omits usage guidance, ranking-mode context, and explicit safety/read-only disclosure. It is adequate but incomplete relative to the tool's complexity.

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 100%, so the schema already documents all nine parameters. The description adds caller-level meaning for format=true ('pre-formatted output for prompt injection') that goes beyond the schema's technical explanation, though it does not clarify any other parameter.

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 states a specific verb ('Search') and resource ('long-term memories'), then enumerates the returned content types (facts, preferences, decisions, rules). It does not differentiate this tool from retrieval-oriented siblings such as memory-kg-query, so it falls short of a 5.

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

Usage Guidelines2/5

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

The description gives no when-to-use or when-not-to-use guidance and names no alternative tools. The only actionable guidance is a parameter tip for format=true, which does not help an agent choose between this and other memory-search or memory-query tools.

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