Skip to main content
Glama

search

Read-only

Retrieve persisted memory from agent or tenant scopes using full-text search. Provide a human-readable reason to access plaintext results, enabling cross-agent discovery or targeted recall.

Instructions

Search persisted memory across agent scopes using full-text matching. Governance: requires reason (10–200 chars) because results contain plaintext content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum results to return (1–50, default: 20).
queryYesSearch query — natural language or keywords.
scopeNoExplicit search scope. "agent" (default, fail-closed) = limits search to the given agent_id (or the token agent). "tenant" = cross-agent search within the authenticated tenant. If omitted with agent_id present, "agent" is inferred; if both omitted, the token agent is used (verified-token scope).
reasonYesREQUIRED (10–200 chars). Audit policy: MEMORY_EXPORT_GOVERNANCE_V1. Human-readable justification for retrieving PLAINTEXT memory. Without this parameter the call WILL fail with code -32602. Example: "Checking prior migration decisions for the user."
agent_idNoAgent identifier (canonical or alias). Used only when scope="agent" or scope is inferred.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYes
scopeYes
resultsYes
Behavior4/5

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

The description adds governance context ('requires reason (10–200 chars) because results contain plaintext content'), which goes beyond the readOnlyHint annotation. It discloses a behavioral constraint (compliance requirement). No contradiction with annotations. It does not, however, detail all edge cases or failure modes.

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?

Two precise sentences with no wasted words. The first sentence captures the core purpose, and the second adds necessary governance context. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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, high schema coverage, and annotations, the description is mostly adequate. However, it lacks guidance on how this tool differs from sibling search/retrieval tools (e.g., 'recall', 'list_memories') and does not mention the behavior when scope is not specified (handled in schema but not in description). This gap makes it incomplete for optimal agent selection.

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?

The input schema has 100% description coverage, so the baseline is 3. The description does not add any parameter-specific meaning beyond what the schema already provides. The mention of 'reason' in the description is purely a restatement of schema information.

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 verb ('Search'), the resource ('persisted memory'), the method ('full-text matching'), and the scope ('across agent scopes'). This is specific and distinguishes it from siblings like 'list_memories' (which lists without searching) or 'save_memory' (write operation).

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 this tool is for searching memory but provides no explicit guidance on when to use it versus alternatives (e.g., list_memories, recall). It does not state when not to use it or how it compares to other tools. The scope parameter description in the schema adds some context but is not part of the description itself.

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/SynapseLayer/synapse-layer'

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