Skip to main content
Glama

memory_search

Read-only

Search shared semantic memory before starting work to find prior decisions and avoid duplication. Retrieve entries by meaning, not keywords.

Instructions

Search shared memory by meaning. Call this before starting work.

Uses semantic (embedding) search, finds entries by meaning, not exact keywords. Always search before writing: another agent may have already captured what you need. Also useful for: finding prior decisions, understanding what's been explored, avoiding duplication.

Args: q: What you're looking for, in natural language. project: Restrict to a project. Defaults to MCP_PROJECT if set. tag: Restrict to entries with this tag. limit: How many results (default 10, max 50). max_content_length: Truncate each entry's content to this many characters. Use when pulling results into an LLM context and large entries would dominate. Full content still accessible via memory_get.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesWhat you're looking for, in natural language.
tagNoRestrict to entries with this tag.
limitNoHow many results (default 10, max 50).
projectNoRestrict to a project. Defaults to MCP_PROJECT if set.
max_content_lengthNoTruncate each entry's content to this many characters. Use when pulling results into an LLM context and large entries would dominate. Full content still accessible via memory_get.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.26.1
    • addedInput schema / properties / max_content_length
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Truncate each entry's content to this many characters. Use when pulling results into an LLM context and large entries would dominate. Full content still accessible via memory_get.",
      +  "title": "Max Content Length"
      +}
  2. Addedv0.17.0
  3. Removedv0.16.1
  4. Addedv0.9.0
  5. Removedv0.7.0
  6. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already set readOnlyHint=true and destructiveHint=false, and the description does not contradict them. It adds value by explaining semantic matching behavior and the truncation behavior of max_content_length, including that full content remains accessible via memory_get. No hidden side effects or additional constraints are disclosed, but none are evidently needed 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.

Conciseness4/5

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

The description is well structured with a clear lead sentence, usage guidance, and an Args list. Some minor redundancy exists between 'Search shared memory by meaning' and 'Uses semantic (embedding) search,' and the Args section duplicates schema descriptions, but the overall size is appropriate for a five-parameter tool.

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?

The description covers when to use the tool, why it matters, how the search behaves, and all parameter semantics. It also mentions the relationship to memory_get for retrieving full content. With an output schema present, this is sufficiently complete for an agent to select and invoke the tool correctly.

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%, and the description's Args section essentially restates the same parameter descriptions in prose. This adds little meaning beyond the schema, so the baseline of 3 applies. The only minor extra is clarifying the practical rationale for max_content_length in LLM contexts.

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 shared memory by meaning.' It further distinguishes the tool from exact-keyword lookup by stating it uses semantic embedding search, and clarifies the shared-memory context. This clearly differentiates it from sibling tools like memory_list and memory_get.

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 gives explicit usage guidance: 'Call this before starting work' and 'Always search before writing.' It also explains when it is useful, such as finding prior decisions and avoiding duplication. It does not explicitly compare against memory_list as an alternative, but the guidance is clear enough for an agent to know when to call it.

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