Skip to main content
Glama

Query Persistent Agent Memory Triplet Store

query_memory_store
Read-onlyIdempotent

Query local agent memory to retrieve semantic triples, causal reasoning chains, and MinHash entity clusters, helping you recall past decisions and trace dependencies without modifying stored records.

Instructions

Queries semantic triples, causal reasoning graphs, and MinHash entity clusters from the local agent memory store, distinguishing from 'manage_memory_store' and 'search_codebase' by retrieving episodic reasoning relations rather than modifying memory records or searching repository code.

Parameters:

  • query: Entity identifier, concept keyword, or natural language query to look up in the persistent semantic memory graph.

  • query_mode: Query strategy: 'semantic' for knowledge triple and relation lookup; 'causal_chain' for temporal cause-and-effect traces; 'minhash' for sub-microsecond entity similarity clustering.

  • project_root: Workspace root directory where the local memory store JSON file is located (defaults to current directory).

Behavior:

  • Mutability: Strictly read-only; queries persistent memory store without altering stored knowledge, weights, or timestamps.

  • Idempotency: Deterministic; returns consistent knowledge relations for identical queries on the same memory state.

  • Privacy & Network: 100% offline local graph and MinHash index lookup; zero cloud synchronization or network traffic.

  • Performance & Resources: Query latency <10ms for 10,000 triples using <25MB RAM; thread-safe.

  • Auth: Zero authentication, API keys, or cloud credentials required.

  • Return Structure: Emits Markdown report with extracted semantic triples, knowledge relationships, or causal inference chains.

  • Error Handling: Returns clean empty graph notice if the queried entity does not exist in the codebook without raising exceptions.

Usage Guidelines:

  • When to use: Recall past agent decisions, query knowledge graph entity relations, or trace causal dependency chains across reasoning sessions.

  • When NOT to use: Do not use for storing, consolidating, or deleting memory stores (use 'manage_memory_store' instead); do not use for searching source code in the repository (use 'search_codebase' instead).

Returns: Markdown report with extracted semantic triples, graph relationships, or causal inference chains.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "query_memory_store"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesEntity name, concept, or search query to look up in the memory store.
query_modeNoQuery strategy: 'semantic' for triple & relation lookup, 'causal_chain' for temporal cause-and-effect traces, 'minhash' for sub-microsecond entity similarity clusters.semantic
project_rootNoWorkspace root where memory store is located (default: current directory)..

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv7.3.2
  2. Removedv7.0.1
  3. Addedv7.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the annotations (which already declare readOnly, idempotent, closed-world, non-destructive), it adds genuinely new behavioral facts: sub-10ms latency at 10k triples, <25MB RAM, thread-safety, zero auth/credentials, and graceful empty-result handling instead of exceptions. It loses a point because the Mutability and Idempotency bullets merely restate readOnlyHint and idempotentHint rather than adding context.

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

Conciseness3/5

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

The header-based structure is easy to scan and the tool-selection framing is front-loaded, but there is visible duplication: 'Return Structure' repeats the standalone 'Returns:' line verbatim, and the mutability/idempotency bullets repeat annotation data. Trimming those two redundancies would make every sentence earn its place.

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?

For a read-only 3-parameter query tool with a full output schema and complete annotations, the description covers selection, mode semantics, performance envelope, auth, error behavior, and privacy. Nothing an agent needs to call it correctly is missing.

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%, so the schema already documents all three parameters with the same enum-free mode descriptions and defaults. The description's parameter block is largely a paraphrase of the schema, adding only the 'natural language query' phrasing for `query`; with high coverage the baseline of 3 applies.

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?

States a specific verb (Queries) and three concrete resources (semantic triples, causal reasoning graphs, MinHash entity clusters) scoped to the local agent memory store. It explicitly differentiates itself from 'manage_memory_store' and 'search_codebase' in the first sentence, so an agent can route correctly without opening any schema.

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?

Contains dedicated 'When to use' and 'When NOT to use' sections naming both alternative tools and the conditions that select them (storing/consolidating/deleting → manage_memory_store; repository code search → search_codebase). Nothing about tool selection is left to inference.

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