Skip to main content
Glama
YeomYuJun

Remote Memory MCP Server

by YeomYuJun

search_nodes

Search for entities in a knowledge graph synchronized with GitHub repositories to find memory data, relationships, and observations stored remotely.

Instructions

엔티티를 검색합니다

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Implementation Reference

  • The MCP tool handler for 'search_nodes'. It calls memoryManager.searchNodes and returns formatted JSON response with search results.
    private async handleSearchNodes(args: any) {
      const results = this.memoryManager.searchNodes(args.query);
      
      return {
        content: [{
          type: 'text',
          text: JSON.stringify({
            success: true,
            query: args.query,
            results: results,
            count: results.length,
          }, null, 2),
        }],
      };
    }
  • Input schema defining the expected arguments for the search_nodes tool: a required 'query' string.
    inputSchema: {
      type: 'object',
      properties: {
        query: { type: 'string' },
      },
      required: ['query'],
    },
  • src/index.ts:214-225 (registration)
    Registration of the search_nodes tool in the tools list returned by ListToolsRequestHandler, including name, description, and input schema.
    {
      name: 'search_nodes',
      description: '엔티티를 검색합니다',
      inputSchema: {
        type: 'object',
        properties: {
          query: { type: 'string' },
        },
        required: ['query'],
      },
    },
    {
  • Core helper method implementing the search logic: finds entities where query matches name, entityType, or any observation (case-insensitive).
    searchNodes(query: string): Entity[] {
      const searchTerm = query.toLowerCase();
      const results: Entity[] = [];
      
      this.graph.entities.forEach(entity => {
        const nameMatch = entity.name.toLowerCase().includes(searchTerm);
        const typeMatch = entity.entityType.toLowerCase().includes(searchTerm);
        const obsMatch = entity.observations.some(obs => 
          obs.toLowerCase().includes(searchTerm)
        );
        
        if (nameMatch || typeMatch || obsMatch) {
          results.push(entity);
        }
      });
      
      return results;
    }

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/YeomYuJun/remote-memory-mcp-server'

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