Skip to main content
Glama

search

Read-only

Search memories by keyword. The query must use vocabulary that appears in stored labels, descriptions, or tags — not intent summaries or paraphrases. Pass node_kind (space-separated) to list or search within specific kinds — unrelated kinds that happen to match query text are excluded. Omit query with node_kind set to list matching kinds ordered by most-recently-updated. Default limit: 10. Use exact=true for identifiers (ticket numbers, short codes with hyphens) — FTS tokenises hyphens away so 'PROJ-042' is not found by default. If search returns zero or truncated results, use orient (with domain) to browse all memories, then recall by ID, then follow connections from a known memory. Returns lean results only — id, label, and a truncated why_matters excerpt; call recall(id) for full content. When a list or section has 2 or more results, each is rendered as a single compact text line — "[id] label — excerpt (domain, node_kind)" — instead of a JSON object; exactly one result is returned as a full object. exact=true is exempt — it always returns full objects, regardless of result count. state (space-separated union) post-filters results to memories with any of the given lifecycle states: none | resolved | superseded | contested. Response always includes semantic_attempted (bool: true when embed() succeeded and the vector path was entered) and semantic_best_dist (float|null: cosine distance of the top result after filtering, null when no vector rows were returned). Use these to diagnose whether Bedrock was available and how close the best match was. On failure, content[0].text is JSON: {"error_class": "retryable|forbidden|internal", "message": "..."}. Switch on error_class: retry on retryable.

Input Schema

NameRequiredDescriptionDefault
exactNoWhen true, use label substring (ILIKE) matching instead of FTS. Results are ordered by updated_at DESC with no semantic_distance. Use for identifiers like ticket numbers or short codes where FTS tokenisation loses the match.
limitNoMaximum results to return. Default: 10. If truncated is true in the response, raise the limit or narrow the query.
queryNoWords to match against stored labels, descriptions, and tags. Use vocabulary from the stored content — if zero results, try words that are likely in the stored text rather than intent or paraphrase.
scopeNoScope of the search. workspace (default): own workspace only. followed: own workspace plus all declared workspace follows — foreign results include source_workspace_id and layer fields; results are always full objects (no digest compression) so provenance fields are preserved. org: future use (currently behaves like workspace). Invalid values are rejected with a validation error.
stateNo
domainNo
memory_idNoRestrict search to nodes directly connected to this memory ID. Useful for searching within a workstream. Applied before FTS/exact scoring, not as a post-filter. When omitted, all nodes in the workspace (or domain) are searched.
node_kindNoOptional filter: space-separated node kinds (union match, same convention as tags). E.g. 'option standing' returns memories whose node_kind is option OR standing. Negation and wildcards are not supported.
max_distanceNoWhen set (e.g. 0.35), only vector-search results whose semantic_distance is at or below this value are returned. Absent (or 0) means no distance filtering — all ranked results up to limit are returned. Use this from hooks to suppress low-relevance injections (STORY-315).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / scope
      Added value: +{
      +  "description": "Scope of the search. workspace (default): own workspace only. followed: own workspace plus all declared workspace follows — foreign results include source_workspace_id and layer fields; results are always full objects (no digest compression) so provenance fields are preserved. org: future use (currently behaves like workspace). Invalid values are rejected with a validation error.",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / max_distance
      Added value: +{
      +  "description": "When set (e.g. 0.35), only vector-search results whose semantic_distance is at or below this value are returned. Absent (or 0) means no distance filtering — all ranked results up to limit are returned. Use this from hooks to suppress low-relevance injections (STORY-315).",
      +  "type": "number"
      +}
  3. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already establish readOnlyHint=true and destructiveHint=false, yet the description adds substantial non-obvious behavior: the digest-vs-full-object rendering rule, the exact=true exemption, semantic_attempted/semantic_best_dist diagnostics, and error_class switch semantics on failure. This is well beyond the annotation floor.

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?

Front-loaded with purpose and highly information-dense — nearly every sentence is actionable. It is nonetheless a long block with some overlap with schema descriptions (e.g. the limit default and exact rationale), so it stops short of perfect economy.

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?

With no output schema and 9 parameters, the description carries the full burden and does so: it describes the lean return shape, the compact-line rendering quirk, diagnostic fields, and structured error payloads. An agent has everything needed to call and interpret this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 78%, below the high-coverage baseline, but the description compensates: it enumerates the state enum values (none|resolved|superseded|contested) that the schema leaves undocumented, explains node_kind union matching, the exact=true hyphen-tokenisation pitfall, and the limit default.

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 and resource ("Search memories by keyword") and immediately scopes it further (labels/descriptions/tags vocabulary, node_kind filtering). It also names sibling tools (orient, recall) as the escalation path, so an agent can distinguish this from relatives without opening a 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?

Gives explicit when-to-use rules (exact=true for identifiers with hyphens), when to switch tools ("If search returns zero or truncated results, use orient ... then recall by ID"), and query-construction guidance. 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources