Skip to main content
Glama

Search NC memory

search_memories
Read-onlyIdempotent

Ad-hoc semantic search of the NC memory store over the hybrid recall path (vector + KG entity-pivot + ACL). Scoped to whatever is asked for, rather than to the session as a whole, so it reaches material the session's initial recall did not return. For higher-fidelity retrieval, pass user_query_full = the user's complete verbatim request; search then matches on it instead of the shorter query. Returns truncated summaries and memory_ids; get_memory_detail resolves one to full content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query (fallback when user_query_full is absent)
topicsNoOptional comma-separated distinct topics; 2+ topics fan out into a per-topic grouped search.
max_resultsNoMax results to return (default 5, max 20)
use_full_queryNoWhether to search on user_query_full when present. Defaults true.
conversation_idNo
user_query_fullNoThe user's COMPLETE, untruncated request, verbatim. When provided, search matches on this instead of `query`.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
errorNoPresent when the call did not succeed. An object carries `type` and `message` (and often a `timestamp`); Utils.formatError bodies set it to `true` with the reason in the top-level `message`.
queryNo
messageNo
successYes
fanned_outNo
provenanceNoPer-source result counts for the hybrid strategy.
request_idNo
user_factsNoThe caller's stored user facts, injected on the first recall per (conversation_id, program_tool). Absent on later calls in the same conversation.
topic_countNo
total_foundNoExactly the length of data.memories after filtering and truncation.
persona_hintNoSuggests a get_persona_definition call when a persona is relevant; null otherwise.
execution_timeNo
hybrid_strategyNoWhich retrieval strategy answered (e.g. "vector_kg_hybrid").
kg_contributionNoKnowledge-graph contribution summary when the KG took part.
vector_results_countNo
user_facts_updated_atNo
knowledge_results_countNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "data": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "memories": {
      +          "items": {
      +            "additionalProperties": true,
      +            "description": "A memory in its recall projection: a summary of at most 1200 characters plus routing metadata. Call get_memory_detail with `memory_id` for the full context.",
      +            "properties": {
      +              "attribution": {
      +                "description": "Present only alongside shared_by."
      +              },
      +              "client_project": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "company_client": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "conversation_id": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "memory_id": {
      +                "description": "Pass to get_memory_detail for the full body.",
      +                "type": "string"
      +              },
      +              "persona": {
      +                "description": "Persona the memory was stored under (e.g. \"carlos\").",
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "shared_by": {
      +                "description": "Present only on a teammate's team-visible memory: who shared it."
      +              },
      +              "summary": {
      +                "description": "Distilled summary, at most 1200 characters.",
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "timestamp": {
      +                "description": "Unix epoch (milliseconds on most rows, seconds on legacy rows) or an ISO-8601 string.",
      +                "type": [
      +                  "number",
      +                  "string",
      +                  "null"
      +                ]
      +              }
      +            },
      +            "required": [
      +              "memory_id"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "topic_groups": {
      +          "description": "Present when the recall fanned out by topic: each group names the memory_ids in data.memories that belong to it.",
      +          "items": {
      +            "additionalProperties": true,
      +            "properties": {
      +              "memory_ids": {
      +                "items": {
      +                  "type": "string"
      +                },
      +                "type": "array"
      +              },
      +              "topic": {
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "error": {
      +      "description": "Present when the call did not succeed. An object carries `type` and `message` (and often a `timestamp`); Utils.formatError bodies set it to `true` with the reason in the top-level `message`.",
      +      "type": [
      +        "object",
      +        "boolean",
      +        "string"
      +      ]
      +    },
      +    "execution_time": {
      +      "type": [
      +        "number",
      +        "string"
      +      ]
      +    },
      +    "fanned_out": {
      +      "type": "boolean"
      +    },
      +    "hybrid_strategy": {
      +      "description": "Which retrieval strategy answered (e.g. \"vector_kg_hybrid\").",
      +      "type": "string"
      +    },
      +    "kg_contribution": {
      +      "description": "Knowledge-graph contribution summary when the KG took part."
      +    },
      +    "knowledge_results_count": {
      +      "type": "integer"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "persona_hint": {
      +      "description": "Suggests a get_persona_definition call when a persona is relevant; null otherwise.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "provenance": {
      +      "additionalProperties": true,
      +      "description": "Per-source result counts for the hybrid strategy.",
      +      "type": "object"
      +    },
      +    "query": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "request_id": {
      +      "type": "string"
      +    },
      +    "success": {
      +      "type": "boolean"
      +    },
      +    "topic_count": {
      +      "type": "integer"
      +    },
      +    "total_found": {
      +      "description": "Exactly the length of data.memories after filtering and truncation.",
      +      "type": "integer"
      +    },
      +    "user_facts": {
      +      "description": "The caller's stored user facts, injected on the first recall per (conversation_id, program_tool). Absent on later calls in the same conversation.",
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "user_facts_updated_at": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "vector_results_count": {
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "success"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already mark the tool as read-only, idempotent, and non-destructive. The description adds meaningful behavioral detail beyond that: the hybrid retrieval path (vector + KG entity-pivot + ACL), scoped matching behavior, truncated summaries, and the relationship between query and user_query_full. It does not contradict the annotations.

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?

Three sentences, each earning its place: core purpose and scope, parameter guidance for fidelity, and return-format with a resolution path. The most important scoping information is front-loaded, with no redundant filler.

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 search tool with six parameters, an output schema, and safety annotations, the description covers what an agent needs to invoke it correctly: what it searches, how it differs from session recall, when to use the full query, what it returns, and how to get full content via get_memory_detail. Nothing essential is missing.

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 coverage is 83%, so the schema already documents most parameters. The description adds real value by explaining the semantic distinction between query and user_query_full: user_query_full is the verbatim request used for higher-fidelity matching, while query is the fallback. This goes beyond the schema's individual field 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 opens with a specific verb and resource: 'Ad-hoc semantic search of the NC memory store over the hybrid recall path'. It also distinguishes itself from session-level recall by stating it is 'scoped to whatever is asked for' and reaches material the initial session recall missed, which separates it from siblings like recall_context.

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

Usage Guidelines4/5

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

The description gives clear usage context: use it for ad-hoc retrieval beyond session recall, and for higher-fidelity retrieval pass user_query_full verbatim. It also points to get_memory_detail as the follow-up for full content. However, it does not explicitly name alternatives or state when not to use this tool.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources