Skip to main content
Glama

memory_query_structured

Read-only

Filter and retrieve memories by scope, namespace, tags, importance, and creation date with sorting, pagination, and field projection.

Instructions

Structured query over memory PROPERTIES (the agent's "Bases/Dataview"): filter currently-valid, top-level memories by scope/namespace/department/document_type/language/tags (AND)/min_importance/created_at range, sort by created_at|updated_at|importance_score|title, paginate, and project specific fields. Exact, deterministic retrieval that complements fuzzy memory_search — use it for "all decision memories in namespace=acme with importance>0.7, newest first".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNo
sortNo
limitNo
offsetNo
fieldsNoReturn only these fields (projection)
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the bar is lower. The description adds useful behavioral context: it operates on 'currently-valid, top-level memories', is 'exact, deterministic', and lists filtering criteria. It does not contradict annotations and provides additional transparency about the tool's scope and nature.

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 two sentences with no wasted words. The first sentence is comprehensive but well-structured, and the second provides usage guidance. It front-loads the purpose and uses clear, direct language.

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's complexity (5 parameters, nested objects, no output schema), the description covers the main capabilities well. It explains filtering, sorting, pagination, and field projection. It does not describe the return format, but that is partially mitigated by the schema's lack of output schema. Overall, it is sufficiently complete for an agent to understand and use the tool.

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 low (20%), but the description compensates by listing the filter criteria (scope, namespace, department, document_type, language, tags with AND, min_importance, created_at range) and sort options (created_at, updated_at, importance_score, title). It also mentions pagination and projection. The description adds significant meaning beyond the schema's minimal descriptions.

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 it's a structured query over memory properties, listing specific operations (filter, sort, paginate, project) and distinguishing from fuzzy memory_search. It uses specific verbs and resources, and the distinction from siblings is explicit.

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

Usage Guidelines5/5

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

The description provides explicit guidance: 'Exact, deterministic retrieval that complements fuzzy memory_search' and gives a concrete example ('all decision memories in namespace=acme with importance>0.7, newest first'). It clearly tells when to use this tool versus the sibling 'memory_search'.

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/YonasValentin/mcp-memory-graph'

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