Skip to main content
Glama

surface_relevant_context

Retrieve past memory entries by topic and tags, then surface the top relevant entries as a structured context brief to inform the current task.

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?

No annotations are provided, so the description carries full burden. It discloses that the tool searches memory_entries, ranks by relevance, and returns top N entries formatted as a context brief. However, it does not specify whether it is read-only, requires permissions, or any side effects. The description is adequate but not fully transparent.

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: a one-sentence intro followed by bulleted parameter explanations. It is front-loaded with the purpose, and every sentence adds value with no redundancy.

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 tool has 3 parameters and an output schema (not shown but present), the description covers the main behavior and parameter semantics. It lacks detail on the return format, but the output schema likely covers that. The description is sufficient for an agent to use the tool correctly.

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?

The input schema has 0% description coverage, so the description's parameter documentation adds significant value. It explains 'topic' as topic/task description, 'tags' as optional comma-separated tags, and 'top_n' as max entries with default 5. This is clear and helps the agent understand how to use 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 the tool's verb ('Retrieve'), resource ('past memory entries'), and purpose ('return a structured context brief'). It distinguishes from siblings like 'get_topic_memory' by specifying that it searches by topic and optional tags, ranks by relevance, and formats top N for injection into working context.

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 when to use (when you need relevant past memory entries for a topic) but does not explicitly state when not to use it or compare with alternatives like 'search_memory' or 'semantic_search'. Usage context is clear but lacks exclusion criteria.

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_PH'

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