Skip to main content
Glama

query_associative_memory

Searches stored code patterns by Hamming similarity to find similar code matches for a query, helping identify bugs, antipatterns, or reusable snippets from associative memory.

Instructions

Searches stored code patterns using Fly-LSH sparse binary Hamming similarity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_kNoNumber of nearest neighbors to return.
query_codeYesThe code query to search against associative memory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It implies a non-mutating read via 'Searches' and names a similarity metric, but says nothing about ranking semantics, result format, latency/scale limits, or empty-result behavior. Naming the algorithm is not the same as disclosing observable behavior.

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 padding, which is appropriately sized for a two-parameter tool. It loses a point only because the algorithm name occupies space without informing the caller's decision.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema and no annotations, so the description is the only source of return-value information, yet it never says what a match looks like, how scores are represented, or that top_k bounds the result count. For a search tool returning ranked neighbors, that is a meaningful gap.

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% for both parameters, so the schema already documents query_code and top_k (including its default of 5). The description adds no parameter-level meaning beyond that, which is the baseline 3 when the schema does the work.

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 ('Searches') and resource ('stored code patterns'), so an agent can tell it is a read/query tool distinct from write-oriented siblings like remember_code_outcome and reset_memory. The trailing 'Fly-LSH sparse binary Hamming similarity' is unexplained jargon that adds little recognition value, and it does not differentiate from the potentially overlapping check_code_reflex.

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 guidance on when to use this tool versus the four siblings, and no stated prerequisites or triggering conditions. The agent must infer from the name alone that this is the retrieval counterpart to remember_code_outcome.

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