read_graph
Retrieve the complete knowledge graph from remote storage to access synchronized memory entities, relationships, and observations for collaboration.
Instructions
전체 지식 그래프를 읽습니다
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:646-666 (handler)The handler function that implements the core logic of the 'read_graph' tool. It fetches the entire graph from the MemoryGraphManager, converts the Map of entities to a plain object, adds a summary, and returns the serialized JSON as a text response.private async handleReadGraph(args: any) { const graph = this.memoryManager.getGraph(); const serializable = { entities: Object.fromEntries(graph.entities), relations: graph.relations, metadata: graph.metadata, summary: { entityCount: graph.entities.size, relationCount: graph.relations.length, lastModified: graph.metadata.lastModified, lastSync: graph.metadata.lastSync, }, }; return { content: [{ type: 'text', text: JSON.stringify(serializable, null, 2), }], }; }
- src/index.ts:309-316 (registration)Registration of the 'read_graph' tool in the ListToolsRequestSchema handler. Includes the tool name, Korean description ('Reads the entire knowledge graph'), and an empty inputSchema indicating no parameters are required.{ name: 'read_graph', description: '전체 지식 그래프를 읽습니다', inputSchema: { type: 'object', properties: {}, }, },
- src/index.ts:402-403 (handler)Dispatch case in the central CallToolRequestSchema handler that routes calls to 'read_graph' to the specific handleReadGraph method.case 'read_graph': return await this.handleReadGraph(args);