Skip to main content
Glama

search_unified

Search across short-term and long-term memory with unified ranking. Filter by tags, adjust weights, and paginate results to find specific memories.

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

Behavior5/5

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

With no annotations provided, the description carries the full burden and does so admirably. It discloses pagination behavior, the structure of the returned dictionary, validation errors (ValueError), and the fact that results are unified across STM/LTM with ranking. This goes well beyond the schema and gives the agent actionable behavioral expectations.

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 (Pagination, Args, Returns, Examples, Raises). It front-loads the core purpose, then provides necessary detail without verbosity. Every sentence adds value, and the examples are illustrative without being 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 covers all practical aspects: what it does, when to paginate, parameter constraints, return format, example invocations, and error conditions. It is complete enough for an agent to invoke the tool correctly without additional context.

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?

Schema coverage is 0%, but the Args section compensates fully. It adds constraints not present in the schema, such as query max 50,000 chars, tags max 50, limit range (1-100), stm/ltm_weight ranges (0.0-2.0), window_days range (1-3650), and min_score range (0.0-1.0). The examples also clarify parameter usage in context.

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 first line 'Search across both STM and LTM with unified ranking' uses a specific verb (search), names both resources (STM and LTM), and highlights the unified ranking aspect. This clearly differentiates it from sibling search_memory, which likely targets a single memory type.

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 establishes clear context: this tool searches both STM and LTM, which implicitly guides when to use it. It also provides pagination advice ('increment page to see more results'). However, it does not explicitly name alternatives or state when not to use it, stopping short of full exclusion guidance.

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/cortexgraph'

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