Skip to main content
Glama

Read Graph

read_graph
Read-onlyIdempotent

Retrieves the entire knowledge graph, including all entities, observations, and relations. Use it when you need a complete view; search or open specific nodes for targeted lookups.

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

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

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

Input Schema

NameRequiredDescriptionDefault
namespaceYesThe namespace to operate in (required). It must already exist: create it with create_namespace, and list the existing ones with list_namespaces. Namespaces are isolated from each other: the same entity name can exist in several, and a relation only connects entities in its own namespace.
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. First observedv2.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and non-destructive, so the safety profile is covered. The description adds non-obvious behavioral context — that the payload scales with graph size — which is a real cost signal for the agent. It stops short of describing paging or size limits, but the key trait is disclosed.

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: the first defines the result, the second front-loads the cost caveat before routing to alternatives. No filler, nothing repeated from title or schema.

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

Completeness5/5

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

An output schema exists, so return-shape explanation is unnecessary. Combined with annotations covering safety and the schema covering parameters, everything an agent needs to decide and call correctly is present.

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 description coverage is 100%, so the schema already documents namespace, entityTypes and observationLimit in detail. The description adds no parameter-level meaning beyond that, which is the expected baseline when the schema does the heavy lifting.

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.' This makes clear it is the unfiltered whole-graph read, distinguishable from open_nodes and search_nodes.

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?

Explicitly says to use it 'only when you need everything' and names the two alternatives with their selection conditions: search_nodes for keyword lookup and open_nodes for reading entities whose names are known.

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