Skip to main content
Glama
YuNaga224

Obsidian Memory MCP

by YuNaga224

read_graph

Retrieve the complete knowledge graph from Obsidian Memory MCP to visualize AI memories as interconnected entities and relationships in Markdown format.

Instructions

Read the entire knowledge graph

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'read_graph' tool within the CallToolRequestSchema request handler's switch statement. Executes by calling storageManager.readGraph() and returning the JSON-serialized knowledge graph.
    case "read_graph":
      return { content: [{ type: "text", text: JSON.stringify(await storageManager.readGraph(), null, 2) }] };
  • Input schema definition for the 'read_graph' tool, registered in the tools list returned by the ListToolsRequestSchema handler. Takes no input parameters.
    {
      name: "read_graph",
      description: "Read the entire knowledge graph",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • Core helper method 'readGraph' in MarkdownStorageManager class that loads and returns the full KnowledgeGraph by delegating to the private loadGraph() method.
    async readGraph(): Promise<KnowledgeGraph> {
      return this.loadGraph();
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the full burden of behavioral disclosure, but it only states that the graph is read. It does not mention that the operation is read-only, whether it requires permissions, or that the response may be very large. The word 'read' implies non-destructive behavior, but no details are given.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that directly states the tool's purpose with no redundancy. It is well-structured and every word contributes to the meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description should explain what reading the graph returns or any caveats (e.g., large payloads). It does not, and it also fails to differentiate this tool from search_nodes for partial reads. The tool is simple, but the description is still incomplete for an agent to use it confidently.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and the schema is empty, so there is nothing to document. The baseline for zero parameters is 4, and the description correctly indicates that no inputs are needed, without adding unnecessary detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'read' and identifies the resource 'the entire knowledge graph,' clearly distinguishing it from sibling tools that create or delete entities. However, it is brief and doesn't elaborate on the output format or how it differs from export_to_obsidian, so it falls short of a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no explicit guidance on when to use this tool over alternatives like search_nodes or open_nodes. It is only implied that this is for reading the whole graph, with no mention of filtering or use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.