Skip to main content
Glama

Grep memories

grep_memories
Read-onlyIdempotent

Use this when you need exact text: names, IDs, error strings, paths. Literal substring search, like grep: no AI, no ranking, newest first; use search_memories to ask a question. Results carry id, title, author, date, teams/projects, citation and lines (grep -n -C1 form: 12: match, 11- context); the first page adds counts per team, project and tag. Filters and skipped memories work as in search_memories. Page with next_cursor.

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": {
      "pattern": "<pattern>"
    },
    "name": "grep_memories"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNoOnly this kind.
limitNo1-50, default 20.
teamsNoHard filter: teams you belong to.
cursorNoThe previous call's `next_cursor`.
topicsNoHard filter: sensitive-topic keys, names or ids.
patternYesLiteral text, up to 200 characters, or a list of up to 10 (any matches). No regex or wildcards.
projectsNoHard filter: projects you belong to.
ignore_caseNoDefault true.
include_expiredNoAlso return memories past their valid_until.
include_supersededNoAlso return memories replaced by a newer one.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the description spends its budget on behavior that annotations cannot express: no AI/ranking, newest-first ordering, the exact shape of returned `lines` with grep -n -C1 semantics, per-team/project/tag `counts` on the first page only, and cursor paging. These are non-obvious execution traits an agent must know before formatting output.

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?

Front-loaded with the use case and the sibling disambiguation, then dense telegraphic clauses each carrying distinct information (ordering, result fields, line format, counts, paging). No sentence restates the tool name or the annotations.

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?

For a 10-parameter tool with an output schema, the description covers invocation intent, result shape, ordering and pagination adequately. The one gap is deferring filter and skipped-memory semantics entirely to `search_memories`, which forces the agent to cross-load a sibling definition to be fully correct.

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 individual params (kind, teams, topics, limit ranges, include_expired/superseded) are already documented and the description rightly does not repeat them. It adds cross-cutting meaning instead: `pattern` is literal with no regex or wildcards and accepts a list, and filters plus skipped-memory behavior match `search_memories` — the latter introducing a concept absent from the schema, though it defers detail to a sibling definition.

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 pair ('literal substring search' over memories, 'like grep') and explicitly contrasts itself with the semantic sibling: 'use `search_memories` to ask a question.' An agent can distinguish the two mechanisms without opening either schema.

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

Usage Guidelines5/5

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

Gives a concrete trigger ('when you need exact text: names, IDs, error strings, paths') and names the alternative tool with the condition that selects it ('to ask a question'). This is explicit when/when-not plus alternative routing, not implied usage.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources