Skip to main content
Glama

memory_search

Search shared long-term memory for saved preferences, conventions, decisions, and bug fixes; filter by project, agent, category, or tag to reuse past context before tasks or decisions.

Instructions

Search the shared long-term memory (Notion or Obsidian, used by Cline, OpenCode, Claude Code, GitHub Copilot, Hermes). Returns matching memories with id, title, content, agent, category, tags. Semantic and hybrid vector matches also include match.excerpt with Unicode start/end offsets. Set response to compact to omit full content and return an excerpt; use memory_get for full content. USE THIS at the start of a task with relevant keywords, and before making decisions, to reuse saved preferences, conventions, and past decisions.

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
tagNoExact tag name to filter by
modeNoSemantic and hybrid modes require a fresh local cachekeyword
agentNoOnly memories saved by this agent
limitNo
queryYesSearch text; semantic and hybrid modes also match related meaning
projectNoOnly memories for this project/repository
categoryNo
responseNoCompact omits full content; full preserves the existing responsefull
currentProjectNoUse the current Git repository as project scope when project is omitted

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.7.0
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed5 schema fields changedv1.6.0
    • addedInput schema / properties / currentProject
      Added value: +{
      +  "default": false,
      +  "description": "Use the current Git repository as project scope when project is omitted",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / mode
      Added value: +{
      +  "default": "keyword",
      +  "description": "Semantic and hybrid modes require a fresh local cache",
      +  "enum": [
      +    "keyword",
      +    "semantic",
      +    "hybrid"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / project
      Added value: +{
      +  "description": "Only memories for this project/repository",
      +  "maxLength": 120,
      +  "type": "string"
      +}
    • changedInput schema / properties / query / description
      Previous value: -"Keywords/phrase to match in title, content, and tags"New value: +"Search text; semantic and hybrid modes also match related meaning"
    • addedInput schema / properties / response
      Added value: +{
      +  "default": "full",
      +  "description": "Compact omits full content; full preserves the existing response",
      +  "enum": [
      +    "full",
      +    "compact"
      +  ],
      +  "type": "string"
      +}
  3. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it does disclose the return shape, the extra match.excerpt with Unicode offsets for semantic/hybrid matches, and the compact-mode behavior. It does not mention permissions/auth, ranking or result ordering, or behavior when nothing matches, which are meaningful gaps for a search tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four front-loaded sentences that lead with what the tool searches and what it returns before the behavioral and usage notes. The 'Set response to compact to omit full content and return an excerpt' clause and the long list of consuming agents are somewhat redundant against the schema, but nothing is seriously wasteful.

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

Completeness4/5

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

With nine parameters and no output schema, the description usefully compensates by describing the returned fields and the excerpt structure. It leaves out result ordering, empty-result behavior, and the cache prerequisite for semantic/hybrid modes (only in the schema), so it is strong but not fully self-sufficient.

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 78%, so the schema already documents most parameters including mode, agent, project, and response. The description adds real nuance about mode (vector matches carry excerpts) and reinforces the response=compact tradeoff, but it largely restates the schema's own compact/full wording rather than adding new guidance.

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?

States a specific verb+resource ('Search the shared long-term memory') with the backing stores named, and enumerates what a result contains (id, title, content, agent, category, tags). It also distinguishes itself from memory_get by assigning full-content retrieval to that sibling, so an agent can tell the two apart without opening the schemas.

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?

Gives explicit when-to-use guidance: 'at the start of a task with relevant keywords' and 'before making decisions, to reuse saved preferences, conventions, and past decisions.' It names one alternative (memory_get for full content) but does not address when to prefer memory_recent, or when keyword vs semantic mode is the right choice beyond what the schema says.

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