Skip to main content
Glama

sync_pull

Pull and synchronize data from GitHub repositories to update remote memory storage for collaborative knowledge graph management.

Instructions

GitHub에서 데이터를 가져와 동기화합니다

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler for 'sync_pull'. Delegates to SyncManager.pullFromRemote() and returns formatted result with operation identifier.
    private async handleSyncPull(args: any) { const result = await this.syncManager.pullFromRemote(); return { content: [{ type: 'text', text: JSON.stringify({ operation: 'sync_pull', ...result, }, null, 2), }], }; }
  • src/index.ts:317-324 (registration)
    Tool registration in ListToolsResponse, including name, description, and empty input schema.
    { name: 'sync_pull', description: 'GitHub에서 데이터를 가져와 동기화합니다', inputSchema: { type: 'object', properties: {}, }, },
  • src/index.ts:404-405 (registration)
    Dispatch routing in CallToolRequest handler switch statement.
    case 'sync_pull': return await this.handleSyncPull(args);
  • Core helper method implementing the sync pull logic: fetches remote graph.json, resolves conflicts by timestamp, updates local memory, handles initial load and errors.
    async pullFromRemote(): Promise<SyncResult> { try { const remoteFile = await this.githubClient.getFile(this.MEMORY_FILE_PATH); if (remoteFile) { const remoteData = JSON.parse(remoteFile.content); const localGraph = this.memoryManager.getGraph(); // 충돌 감지 및 해결 const conflictResolved = await this.resolveConflicts(localGraph, remoteData); // 원격 데이터로 로컬 업데이트 this.memoryManager.fromJSON(remoteData); this.isInitialLoad = false; // 초기 로드 완료 표시 return { success: true, conflictResolved, lastSync: new Date().toISOString(), }; } else { // 원격에 파일이 없고 초기 로드가 아닐 때만 푸시 if (!this.isInitialLoad) { return await this.pushToRemote(); } else { // 초기 로드 시에는 빈 상태로 시작 this.isInitialLoad = false; return { success: true, conflictResolved: false, lastSync: new Date().toISOString(), }; } } } catch (error) { this.isInitialLoad = false; return { success: false, conflictResolved: false, lastSync: new Date().toISOString(), error: error instanceof Error ? error.message : 'Unknown error', }; } }

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