Skip to main content
Glama

search_nodes

Locate nodes in the MemoryMesh knowledge graph by matching names, types, and metadata content against a specific search query for efficient data retrieval.

Instructions

Search for nodes in the knowledge graph based on a query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe search query to match against node names, types, and metadata content

Implementation Reference

  • Handler logic that executes the search_nodes MCP tool by invoking the knowledge graph manager's searchNodes method and formatting the tool response.
    case "search_nodes":
        const searchResults = await this.knowledgeGraphManager.searchNodes(args.query);
        return formatToolResponse({
            data: searchResults,
            actionTaken: `Searched nodes with query: ${args.query}`
        });
  • Schema definition and tool metadata (name, description, inputSchema) for the search_nodes tool.
        name: "search_nodes",
        description: "Search for nodes in the knowledge graph based on a query",
        inputSchema: {
            type: "object",
            properties: {
                query: {
                    type: "string",
                    description: "The search query to match against node names, types, and metadata content"
                },
            },
            required: ["query"],
        },
    },
  • Routes calls to the search_nodes tool to the appropriate SearchToolHandler instance.
    if (toolName.match(/^(read_graph|search_nodes|open_nodes)$/)) {
        return this.searchHandler;
  • Exports the searchTools array which includes the search_nodes tool definition for static tool registration.
    export const searchTools: Tool[] = [
        {
            name: "read_graph",
            description: "Read the entire knowledge graph",
            inputSchema: {
                type: "object",
                properties: {},
            },
        },
    
        {
            name: "search_nodes",
            description: "Search for nodes in the knowledge graph based on a query",
            inputSchema: {
                type: "object",
                properties: {
                    query: {
                        type: "string",
                        description: "The search query to match against node names, types, and metadata content"
                    },
                },
                required: ["query"],
            },
        },
    
        {
            name: "open_nodes",
            description: "Open specific nodes in the knowledge graph by their names",
            inputSchema: {
                type: "object",
                properties: {
                    names: {
                        type: "array",
                        items: {type: "string", description: "Node name to open"},
                        description: "An array of node names to retrieve",
                    },
                },
                required: ["names"],
            },
        }
    ];
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions searching based on a query but doesn't describe what 'nodes' entail, how results are returned (e.g., format, pagination), or any limitations (e.g., search scope, performance). This leaves significant gaps for a tool with no annotation coverage.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, with zero waste, making it highly concise and well-structured.

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

Completeness2/5

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

Given the complexity of a search operation in a knowledge graph, no annotations, and no output schema, the description is incomplete. It lacks details on result format, search behavior, or error handling, which are crucial for effective tool use. The description does not compensate for these gaps.

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?

The schema description coverage is 100%, with the parameter 'query' well-documented in the schema as matching against node names, types, and metadata content. The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline of 3 for high schema coverage.

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 clearly states the action ('Search for nodes') and the resource ('knowledge graph'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from potential sibling search tools (none are listed, but the distinction isn't explicit).

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context for searching versus other operations like 'read_graph' or 'open_nodes', or any exclusions. Usage is implied by the name but not explicitly stated.

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

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/CheMiguel23/MemoryMesh'

If you have feedback or need assistance with the MCP directory API, please join our Discord server