Skip to main content
Glama
Graph-Memory

Graph-Memory

Semantic Graph Search

graph_search
Read-only

Finds entities semantically similar to a natural-language query, even when wording differs from canonical names, and optionally expands results through graph traversal.

Instructions

Find entities semantically similar to a natural-language query, then optionally expand via graph traversal. Uses local sentence embeddings (bge-small-en, 384-dim) — no external API. Best when the user's wording doesn't match canonical entity names (e.g. "containers" → Docker, "AI tools" → Claude Code/Anthropic SDK). If the embedder is unavailable it returns an error; use graph_query instead. Expansion follows the top 5 seeds only, capped at 30 edges.

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": "graph_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesNatural-language query (any phrasing — synonyms and paraphrases work).
top_kNoHow many semantically similar entities to retrieve as seeds (default 10).
expandNoIf true (default), also return the immediate graph neighbours of each seed.
entity_typesNoRestrict results to these entity types.
min_similarityNoMinimum cosine similarity threshold (default 0.5).
expand_min_weightNoMin edge weight when expanding (default 0.3).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.0
    • changedInput schema / properties / entity_types / items / enum
      Previous value: -[
      -  "Person",
      -  "Project",
      -  "Preference",
      -  "Concept",
      -  "Decision",
      -  "Fact",
      -  "Event",
      -  "Object",
      -  "Reasoning"
      -]New value: +[
      +  "Person",
      +  "Organization",
      +  "Project",
      +  "Feature",
      +  "Concept",
      +  "Technology",
      +  "Decision",
      +  "Reasoning",
      +  "Preference",
      +  "Event",
      +  "Fact",
      +  "Artifact",
      +  "Object",
      +  "Resource",
      +  "Infrastructure",
      +  "Alias",
      +  "Location",
      +  "Issue",
      +  "Task"
      +]
  2. Addedv0.2.2
  3. Removedv0.1.4
  4. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered. The description adds genuinely non-obvious behavior: local bge-small-en 384-dim embeddings with no external API call, a hard failure mode when the embedder is missing, and expansion limits (top 5 seeds, 30-edge cap). It stops short of describing output shape or whether similarity scores are returned.

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?

Four sentences with zero filler: capability first, then the discriminating use case, then the failure mode with an alternative, then the expansion caps. Every sentence carries distinct information an agent would otherwise have to guess.

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

Completeness4/5

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

No output schema exists, and the description only loosely implies the return is seed entities plus neighbours, without stating fields such as similarity values or entity identifiers. Given six parameters and a dual-mode operation, that is the one meaningful hole; everything else an agent needs to call it correctly is present.

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 description coverage is 100%, so baseline is 3. The description goes past the schema by clarifying that expansion is anchored to only the top 5 seeds and capped at 30 edges — a constraint not derivable from the top_k, expand, or expand_min_weight fields themselves — which materially affects how an agent should size top_k.

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: find entities semantically similar to a natural-language query, with optional graph expansion. The dual mode (semantic seed retrieval + traversal) is named up front, and the concrete examples ("containers" → Docker, "AI tools" → Claude Code/Anthropic SDK) pin down what "semantically similar" means in practice, distinguishing it from graph_query.

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?

Explicitly gives the selection condition: "Best when the user's wording doesn't match canonical entity names." It also names the fallback path — if the embedder is unavailable it errors and the agent should use graph_query — which is exactly the when-not guidance an agent needs to route between siblings.

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