Skip to main content
Glama

search_nodes

Search for knowledge graph entities in remote memory storage using query terms to find relevant nodes for data analysis and collaboration.

Instructions

엔티티를 검색합니다

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Implementation Reference

  • Handler function for the 'search_nodes' tool. It calls memoryManager.searchNodes with the query argument and returns a JSON-formatted response containing the 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), }], }; }
  • Core implementation of the node search logic. Searches through all entities matching the query in name, entityType, or observations (case-insensitive substring match).
    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; }
  • src/index.ts:214-224 (registration)
    Registration of the 'search_nodes' tool in the listTools response, including name, description, and input schema.
    { name: 'search_nodes', description: '엔티티를 검색합니다', inputSchema: { type: 'object', properties: { query: { type: 'string' }, }, required: ['query'], }, },
  • Input schema definition for the 'search_nodes' tool, requiring a 'query' string.
    inputSchema: { type: 'object', properties: { query: { type: 'string' }, }, required: ['query'], },
  • Dispatcher case in the CallToolRequest handler that routes 'search_nodes' calls to the handleSearchNodes method.
    case 'search_nodes': return await this.handleSearchNodes(args);

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