Skip to main content
Glama

query_layer

Read-onlyIdempotent

Retrieve memories from a chosen layer (episodic, semantic, procedural, and others) using structured filters such as importance, timestamp range, or content text search.

Instructions

Query a specific memory layer with structured filters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
layerYesMemory layer to query
optionsNoQuery options with structured filters

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds essentially nothing behavioral beyond 'structured filters' — no note on superseded/expired handling, layer semantics, or result shape — even though the schema's include_superseded text shows there is non-trivial behavior worth surfacing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler or redundancy. It is efficient, though its brevity borders on under-specification for a tool with a nested options object and six-valued enum.

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?

With annotations covering safety and a fully documented schema, nothing critical is missing to invoke the tool, but for a layered retrieval tool surrounded by recall siblings the description leaves the agent without routing or layer-semantics context. Adequate, not complete.

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?

Schema description coverage is 100%, including detailed enum, filter, ordering, and include_superseded semantics, so the schema does the heavy lifting and the baseline is 3. The description adds no extra parameter meaning beyond what the schema already documents.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (query), a specific resource (a memory layer), and the mechanism (structured filters), which is much clearer than a restated title. However, it does nothing to distinguish itself from the many sibling recall tools (recall, semantic_recall, corpus_recall), so an agent cannot tell from the description alone which one to pick for a layered/filtered query.

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

Usage Guidelines2/5

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

There is no explicit when-to-use guidance, no mention of alternatives, and no conditions that select this tool over the recall-family siblings. The phrase 'structured filters' weakly implies the use case (filter-driven retrieval), but nothing tells the agent when filtering is preferred over semantic recall.

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