Skip to main content
Glama

Search Nodes

search_nodes
Read-onlyIdempotent

Searches a knowledge graph for entities matching a keyword, topic, or partial name across names, types, and observations, returning matching entities and their related relations.

Instructions

Search the knowledge graph for entities whose name, type or observations contain the query (case-insensitive). Use this when you have a keyword, a topic or part of a name but not the exact entity names. Prefer open_nodes when you already know the exact names, and use read_graph only when you need the whole graph. Returns the matching entities and every relation that touches one of them.

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": {
      "namespace": "<namespace>",
      "query": "<query>"
    },
    "name": "search_nodes"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoReturn at most this many matching entities (the first matches, in stored order), with the relations that touch them. Omit to return every match.
queryYesThe search query to match against entity names, types, and observation content
namespaceYesThe namespace to operate in (required). It must already exist: create it with create_namespace, and list the existing ones with list_namespaces. Namespaces are isolated from each other: the same entity name can exist in several, and a relation only connects entities in its own namespace.
observationLimitNoReturn at most this many observations per entity (the first ones, in the order they were added) and add each entity's total as observationCount. Use 0 for names, types and counts only: a cheap overview of a large graph, after which open_nodes reads the entities you need in full. Omit to return every observation.

Output Schema

NameRequiredDescriptionDefault
entitiesYes
relationsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, so the safety profile is covered. The description adds genuinely new behavior: case-insensitive substring matching and the fact that every relation touching a match is returned, which explains why results may be larger than the entity hit count. It stops short of noting pagination/truncation behavior of the limit, which the schema handles.

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 short sentences, front-loaded with the matching semantics, then the use/don't-use routing, then the return shape. Every sentence carries distinct information with no restatement of the title or schema.

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 annotations covering safety, a fully described schema, and an output schema explaining return values, the description only needed to supply matching semantics and sibling routing, both of which it does. An agent has enough to select and invoke this correctly.

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 all four parameters including limit, observationLimit, and namespace guidance are already documented in structured form. The description adds no parameter-level meaning beyond the schema, so the baseline 3 applies.

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 the knowledge graph for entities) plus the exact match surface: name, type, or observations, case-insensitive. This distinguishes it from graph-wide or name-exact siblings without requiring the schema to be opened.

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 an explicit trigger ('when you have a keyword, a topic or part of a name but not the exact entity names') and names two alternatives with their selecting conditions: open_nodes for known exact names, read_graph for the whole graph. Nothing 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.