Skip to main content
Glama

surface_relevant_context

Retrieve past memories relevant to a topic by searching with keyword and tags. Get ranked entries for injection into current working context.

Instructions

Retrieve past memory entries relevant to a topic and return a structured context brief.

Searches memory_entries by topic keyword and optional tag list, ranks by
relevance, and formats the top N entries for injection into the current
agent's working context.

Args:
    topic: The topic or task description to search for.
    tags: Optional comma-separated topic tags to include (e.g. 'methods,phd').
    top_n: Maximum number of entries to return (default 5).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYes
tagsNo
top_nNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description carries the full burden. It details searching, ranking, and formatting but omits behavior for empty results, side effects, or permissions. Adequate but not exhaustive.

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, front-loaded with purpose, and uses a structured format with bullet points for arguments. Every sentence adds value.

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?

Given the presence of an output schema, the input description is fairly complete, covering parameters and behavior. Missing edge cases like empty results or limits on top_n, but overall sufficient.

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 0%, and the description adds meaningful context: topic is 'topic or task description', tags are 'optional comma-separated', top_n has a default. Enhances understanding beyond the schema.

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 clearly states the tool retrieves past memory entries and returns a structured context brief, with a specific verb and resource. However, it does not explicitly distinguish from sibling tools like search_memory, leaving some ambiguity.

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

Usage Guidelines3/5

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

The description implies use for injecting context into the agent's working context but does not specify when to avoid this tool or contrast with alternatives. Guidance is implied but not explicit.

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/SVerITG/Metis'

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