Skip to main content
Glama

relevant_memories

Find memories whose frontmatter paths glob-match the given file, surfacing only the context to load before editing.

Instructions

Return memories whose frontmatter 'paths:' globs match the given file.

Memories can be auto-attached to specific parts of a project by adding a 'paths:' field to their frontmatter (e.g. 'paths: internal/auth/**, cmd/server/*.go'). This tool surfaces only the memories relevant to a given file — much smaller than list_memories when many memories exist.

Call this when starting work on a file to discover context the LLM should load before editing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoFile path. Either absolute or relative to the workspace.
workspaceNoAbsolute workspace path. Defaults to the daemon's resolved workspace.
Behavior4/5

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

No annotations are provided, so the description carries full burden. It explains the matching mechanism (frontmatter 'paths:' globs), gives concrete examples of glob patterns, and states the behavioral outcome: 'surfaces only the memories relevant to a given file.' It does not detail return format or edge cases, but given the simplicity of the tool, this is adequate transparency.

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?

The description is concise and well-structured: first sentence states the core function, second provides context and an example, third gives usage guidance. Every sentence contributes value with no redundancy or filler.

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?

There is no output schema, but the description sufficiently explains the matching logic, the use case, and how it relates to list_memories. It does not verbosely describe return format, but given the memory tools family this is acceptable. The description is complete enough for an agent to know when to use it and what to expect.

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 coverage is 100% (both parameters have descriptions). The description adds no parameter-level information beyond what the schema already states; the example glob patterns apply to memory frontmatter, not the tool's parameters. Per calibration, baseline 3 is appropriate when schema covers all parameters.

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 clearly states what the tool does: 'Return memories whose frontmatter 'paths:' globs match the given file.' It uses a specific verb and resource, and explicitly distinguishes itself from sibling tools like list_memories by emphasizing it returns a much smaller set. This makes the purpose unambiguous.

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?

Provides explicit usage guidance: 'Call this when starting work on a file to discover context the LLM should load before editing.' It also contrasts with list_memories ('much smaller than list_memories when many memories exist'), implicitly indicating when this tool is preferable and hinting at an alternative.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/plumbkit/plumb'

If you have feedback or need assistance with the MCP directory API, please join our Discord server