Skip to main content
Glama
YeomYuJun

Remote Memory MCP Server

by YeomYuJun

list_entities

Retrieve entities from a remote knowledge graph with filtering, sorting, and pagination options to manage synchronized GitHub repository data.

Instructions

엔티티 목록을 조회합니다 (필터링, 정렬, 페이지네이션 지원)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entityTypeNo특정 엔티티 타입으로 필터링
sortByNo정렬 기준 (기본값: createdAt)
sortOrderNo정렬 순서 (기본값: desc)
dateFromNo시작 날짜 (ISO 8601 형식)
dateToNo종료 날짜 (ISO 8601 형식)
limitNo페이지 크기 (기본값: 50)
offsetNo시작 위치 (기본값: 0)

Implementation Reference

  • Core handler implementing list_entities tool logic: filters entities by type/date, sorts by specified field/order, applies pagination, returns entities list and total count.
    listEntities(options?: { entityType?: string; sortBy?: 'createdAt' | 'updatedAt' | 'name'; sortOrder?: 'asc' | 'desc'; dateFrom?: string; dateTo?: string; limit?: number; offset?: number; }): { entities: Entity[]; total: number } { let entities = Array.from(this.graph.entities.values()); // EntityType 필터링 if (options?.entityType) { entities = entities.filter(e => e.entityType === options.entityType); } // 날짜 범위 필터링 if (options?.dateFrom) { entities = entities.filter(e => e.createdAt >= options.dateFrom!); } if (options?.dateTo) { entities = entities.filter(e => e.createdAt <= options.dateTo!); } // 정렬 const sortBy = options?.sortBy || 'createdAt'; const sortOrder = options?.sortOrder || 'desc'; entities.sort((a, b) => { let aVal: string, bVal: string; if (sortBy === 'name') { aVal = a.name; bVal = b.name; } else { aVal = a[sortBy]; bVal = b[sortBy]; } const comparison = aVal.localeCompare(bVal); return sortOrder === 'asc' ? comparison : -comparison; }); const total = entities.length; // 페이지네이션 if (options?.offset !== undefined || options?.limit !== undefined) { const offset = options.offset || 0; const limit = options.limit || 50; entities = entities.slice(offset, offset + limit); } return { entities, total }; }
  • MCP server handler for list_entities: maps input args to memoryManager.listEntities call and formats the JSON response with metadata.
    private async handleListEntities(args: any) { const result = this.memoryManager.listEntities({ entityType: args.entityType, sortBy: args.sortBy, sortOrder: args.sortOrder, dateFrom: args.dateFrom, dateTo: args.dateTo, limit: args.limit, offset: args.offset, }); return { content: [{ type: 'text', text: JSON.stringify({ success: true, entities: result.entities, count: result.entities.length, total: result.total, offset: args.offset || 0, limit: args.limit || 50, hasMore: (args.offset || 0) + result.entities.length < result.total, }, null, 2), }], }; }
  • src/index.ts:239-277 (registration)
    Tool registration entry in ListToolsRequestHandler, defining name, description, and inputSchema for list_entities.
    { name: 'list_entities', description: '엔티티 목록을 조회합니다 (필터링, 정렬, 페이지네이션 지원)', inputSchema: { type: 'object', properties: { entityType: { type: 'string', description: '특정 엔티티 타입으로 필터링' }, sortBy: { type: 'string', enum: ['createdAt', 'updatedAt', 'name'], description: '정렬 기준 (기본값: createdAt)' }, sortOrder: { type: 'string', enum: ['asc', 'desc'], description: '정렬 순서 (기본값: desc)' }, dateFrom: { type: 'string', description: '시작 날짜 (ISO 8601 형식)' }, dateTo: { type: 'string', description: '종료 날짜 (ISO 8601 형식)' }, limit: { type: 'number', description: '페이지 크기 (기본값: 50)' }, offset: { type: 'number', description: '시작 위치 (기본값: 0)' } }, }, },
  • src/index.ts:396-397 (registration)
    Dispatch case in CallToolRequestHandler switch statement routing 'list_entities' to handleListEntities method.
    case 'list_entities': return await this.handleListEntities(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