read_graph
Extract and visualize the complete knowledge graph stored in the Obsidian Memory MCP server, enabling structured exploration of entities, relations, and observations.
Instructions
Read the entire knowledge graph
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.ts:226-227 (handler)Executes the 'read_graph' tool by calling storageManager.readGraph() and returning the KnowledgeGraph as formatted JSON.case "read_graph": return { content: [{ type: "text", text: JSON.stringify(await storageManager.readGraph(), null, 2) }] };
- index.ts:165-172 (registration)Registers the 'read_graph' tool in the MCP server with its name, description, and empty input schema.{ name: "read_graph", description: "Read the entire knowledge graph", inputSchema: { type: "object", properties: {}, }, },
- index.ts:168-171 (schema)Defines the input schema for the 'read_graph' tool (empty object, no parameters required).inputSchema: { type: "object", properties: {}, },
- Implements the core logic for reading the knowledge graph by delegating to loadGraph().async readGraph(): Promise<KnowledgeGraph> { return this.loadGraph(); }
- Loads all entities and relations from markdown files to construct the full KnowledgeGraph.async loadGraph(): Promise<KnowledgeGraph> { const [entities, relations] = await Promise.all([ this.loadAllEntities(), this.loadAllRelations() ]); return { entities, relations }; }