Skip to main content
Glama

search_unified

Search both short-term and long-term memories at once with unified ranking and pagination to locate specific recollections.

Instructions

Search across both STM and LTM with unified ranking.

Pagination: Results are paginated to help you find specific memories across large result sets from both short-term and long-term memory. Use page and page_size to navigate through results. If a search term isn't found on the first page, increment page to see more results.

Args: query: Text query to search for (max 50,000 chars). tags: Filter by tags (max 50 tags). limit: Maximum total results before pagination (1-100). stm_weight: Weight multiplier for STM results (0.0-2.0). ltm_weight: Weight multiplier for LTM results (0.0-2.0). window_days: Only include STM memories from last N days (1-3650). min_score: Minimum score threshold for STM memories (0.0-1.0). page: Page number to retrieve (1-indexed, default: 1). page_size: Number of memories per page (default: 10, max: 100).

Returns: Dictionary with paginated results including: - results: List of matching memories from STM and LTM for current page - pagination: Metadata (page, page_size, total_count, total_pages, has_more)

Examples: # Get first page (10 results) search_unified(query="architecture", page=1, page_size=10)

# Get next page
search_unified(query="architecture", page=2, page_size=10)

Raises: ValueError: If any input fails validation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo
tagsNo
limitNo
queryNo
min_scoreNo
page_sizeNo
ltm_weightNo
stm_weightNo
window_daysNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It transparently explains pagination behavior, the need to increment 'page' when results are not found on the first page, and the exact return structure (results + pagination metadata). It also states validation errors (ValueError). While it doesn't explicitly mention read-only or side-effect-free behavior, that is inherent in a search operation and does not detract significantly.

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 well-structured with clear sections for pagination, arguments, return values, examples, and exceptions. It is detailed but every sentence serves a purpose; the examples and parameter constraints are essential given the schema's lack of descriptions. The front-loaded purpose and logical organization make it easy to parse, and no content feels redundant.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (9 parameters, no annotations), the description is exceptionally complete. It covers all parameters, pagination flow, return format, error handling, and provides concrete usage examples. Even though an output schema exists, the description's return summary adds context about pagination metadata. This is a well-rounded, self-sufficient description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero description coverage, so the description must fully compensate. The 'Args:' section provides comprehensive, semantics-rich explanations for all 9 parameters, including constraints (max query chars, max tags, numeric ranges, defaults) and the meaning of each weight/filter. This goes far beyond the bare schema and is exactly what an agent needs to invoke the tool correctly.

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 opens with a clear, specific action: 'Search across both STM and LTM with unified ranking.' This verb+resource combination immediately distinguishes it from sibling tools like search_memory, which likely targets a single memory store. The phrasing is neither tautological nor vague, and it sets accurate expectations for a cross-memory search.

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

Usage Guidelines4/5

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

The description clearly implies usage for combined STM/LTM search and provides detailed pagination guidance, including how to navigate large result sets and retrieve subsequent pages. However, it does not explicitly name alternatives or state when NOT to use this tool (e.g., when only one memory store is needed). This clear context without exclusions aligns with a score of 4.

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/fastmcp-me/mnemex'

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