Skip to main content
Glama

query_associative_memory

Read-only

Search stored code patterns by code snippet to retrieve similar examples and identify known bugs or antipatterns from prior execution outcomes.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_kNoNumber of nearest neighbors to return.
compactNoWhether to return compact match objects to reduce prompt token footprint.
query_codeYesThe code query to search against associative memory (accepts 'query_code', 'query', or 'code').

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.7
    • addedInput schema / properties / compact
      Added value: +{
      +  "default": false,
      +  "description": "Whether to return compact match objects to reduce prompt token footprint.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / query_code / description
      Previous value: -"The code query to search against associative memory."New value: +"The code query to search against associative memory (accepts 'query_code', 'query', or 'code')."
  2. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so no behavioral contradiction exists. The description adds useful context by naming the similarity technique, which implies approximate nearest-neighbor search behavior, but it does not disclose output shape, ordering, or exactness properties beyond what the schema and annotations imply.

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 a single, well-structured sentence with no filler. It front-loads the core action and object before adding the algorithmic detail, and every word earns its place.

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?

For a read-only search tool with fully documented parameters, this is mostly sufficient for invocation. However, there is no output schema and no explicit return-shape guidance, and the lack of sibling differentiation leaves a real gap in the agent's ability to confidently select this tool over inspect_memory_state.

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 parameters are already well documented in the schema. The tool description itself adds no extra parameter context, which is acceptable given the schema baseline of 3.

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?

The description names a specific verb ('searches') and resource ('stored code patterns'), and adds the distinctive Fly-LSH sparse binary Hamming similarity approach. It is clear and not tautological, though it does not explicitly differentiate itself from similar-looking siblings like inspect_memory_state.

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?

No guidance is given about when to use this tool versus check_code_reflex, inspect_memory_state, remember_code_outcome, or reset_memory. The description states what the tool does but leaves the agent to infer selection criteria from the tool name and sibling names.

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