Skip to main content
Glama
Knowledge Graph Memory Server

Knowledge Graph Memory Server

Read Graph

read_graph
Read-onlyIdempotent

Retrieves the entire knowledge graph—all entities, observations, and relations—when complete memory context is needed. Filter by entity types or limit observations to control output size.

Instructions

Read the entire knowledge graph: every entity with its observations, and every relation. The result grows with the graph, so use this only when you need everything; prefer search_nodes to find entities by keyword and open_nodes to read entities whose names you know.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "read_graph"
  }
}

Input Schema

NameRequiredDescriptionDefault
entityTypesNoReturn only entities whose entityType is one of these (exact match), and only the relations that touch one of them. Omit to return every entity.
observationLimitNoReturn at most this many observations per entity (the first ones, in the order they were added) and add each entity's total as observationCount. Use 0 for names, types and counts only: a cheap overview of a large graph, after which open_nodes reads the entities you need in full. Omit to return every observation.

Output Schema

NameRequiredDescriptionDefault
entitiesYes
relationsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.4.0
    • addedInput schema / properties / entityTypes
      Added value: +{
      +  "description": "Return only entities whose entityType is one of these (exact match), and only the relations that touch one of them. Omit to return every entity.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / observationLimit
      Added value: +{
      +  "description": "Return at most this many observations per entity (the first ones, in the order they were added) and add each entity's total as observationCount. Use 0 for names, types and counts only: a cheap overview of a large graph, after which open_nodes reads the entities you need in full. Omit to return every observation.",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / entities / items / properties / observationCount
      Added value: +{
      +  "description": "How many observations the entity holds in total; present only when observationLimit was given",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
  2. Changed2 schema fields changedv2.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Changed2 schema fields changed
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "entities": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "entityType": {
      +            "description": "The type of the entity",
      +            "type": "string"
      +          },
      +          "name": {
      +            "description": "The name of the entity",
      +            "type": "string"
      +          },
      +          "observations": {
      +            "description": "An array of observation contents associated with the entity",
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "entityType",
      +          "observations"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "relations": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "from": {
      +            "description": "The name of the entity where the relation starts",
      +            "type": "string"
      +          },
      +          "relationType": {
      +            "description": "The type of the relation",
      +            "type": "string"
      +          },
      +          "to": {
      +            "description": "The name of the entity where the relation ends",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "from",
      +          "to",
      +          "relationType"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "entities",
      +    "relations"
      +  ],
      +  "type": "object"
      +}
  4. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so safety is covered. The description adds a genuinely useful behavioral trait beyond them: result size scales with the graph, which is the main operational risk of a whole-graph read. It stops short of describing return shape or pagination, though an output schema exists to carry that.

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?

Two sentences, zero filler, with the scope-defining statement front-loaded before the routing advice. Every clause earns its place and nothing is repeated from the annotations or schema.

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

Completeness4/5

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

For a two-parameter read tool with full schema coverage, complete annotations and an output schema, the description covers what remains: cost awareness and sibling routing. The one gap is that it warns the result grows with the graph but does not point at the observationLimit=0 cheap-overview pattern from the schema as the in-tool mitigation, offering only sibling alternatives.

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

Parameters3/5

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

Schema coverage is 100%, and both properties carry detailed descriptions covering exact-match semantics, relation filtering, ordering of returned observations, and the observationCount side effect. The description text itself says nothing about entityTypes or observationLimit, so the baseline 3 is correct — it adds no meaning beyond the schema.

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

Purpose5/5

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

States a specific verb and resource plus exact scope: "Read the entire knowledge graph: every entity with its observations, and every relation." That scope word "entire" immediately separates it from the filtered siblings open_nodes and search_nodes, so an agent can pick correctly without opening a schema.

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

Usage Guidelines5/5

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

Gives an explicit when-to-use condition ("only when you need everything") and names two alternatives with the condition that selects each: search_nodes for keyword lookup, open_nodes for known names. This is the full when/when-not/alternative triad rather than an implied usage.

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