Skip to main content
Glama
arunkumars-mf

mem0-agent-memory

search_by_metadata

Filter stored agent memories by metadata fields like type, priority, status, user, or custom attributes. Retrieves matching memories with pagination, enabling targeted lookup without semantic search.

Instructions

Search memories by metadata fields without semantic search.

OPTIONAL: 'user_id' OR 'agent_id' (if neither provided, auto-detects current user) OPTIONAL: 'type' - filter by metadata type (e.g., "decision", "preference", "task_completion") OPTIONAL: 'priority' - filter by priority (e.g., "high", "medium", "low") OPTIONAL: 'status' - filter by status (e.g., "complete", "in_progress", "blocked") OPTIONAL: 'custom_filters' - dict of additional metadata key-value pairs to match OPTIONAL: 'page' - page number for pagination (default: 1) OPTIONAL: 'page_size' - results per page (default: 50, max: 100)

Returns: Memories matching all specified filters with pagination.

Examples:

  • Find decisions: {"type": "decision"}

  • Find high priority: {"priority": "high"}

  • Find blocked items: {"status": "blocked"}

  • Custom filter: {"custom_filters": {"category": "api"}}

  • Paginated: {"type": "documentation", "page": 2, "page_size": 20}

Note: Uses native Qdrant filtering when available, falls back to post-filtering for other backends.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo
typeNo
statusNo
user_idNo
verboseNo
agent_idNo
priorityNo
page_sizeNo
custom_filtersNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.3.2

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden. It discloses useful behaviors: auto-detecting the current user when user_id/agent_id are absent, AND-style matching across filters, pagination behavior, and backend-specific filtering strategy. It does not explicitly state read-only semantics, but the word 'search' strongly implies it and no side effects are suggested.

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-organized with a clear opening sentence, grouped OPTIONAL parameter bullets, a returns line, concrete examples, and a backend note. Every part serves a purpose and the structure makes the information easily scannable for an agent.

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?

For a tool with 9 optional parameters and no schema descriptions, the description is nearly complete: it explains filters, pagination defaults, user/agent scoping, and example invocations. The main gap is the omitted 'verbose' parameter, which prevents full self-sufficiency in all contexts.

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 description coverage is 0%, so the description must compensate. It documents nearly every parameter with types, defaults, constraints, and examples, adding substantial meaning beyond the raw schema. However, the 'verbose' parameter is not mentioned at all, leaving one parameter undocumented.

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 uses a specific verb and resource: 'Search memories by metadata fields' and immediately distinguishes the tool from semantic search. This makes its role clear and separates it from siblings like search_memories without needing to inspect schemas.

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 phrase 'without semantic search' clearly implies the intended use case: metadata-based lookup rather than semantic similarity. It gives usage examples for common filters, though it does not explicitly name an alternative tool for semantic search or state when not to use this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/arunkumars-mf/mem0-agent-memory'

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