Skip to main content
Glama

Get graph

get_graph
Read-only

Retrieve the entire current graph—properties, styles, nodes, and edges—as YAML or JSON to inspect or export its full structure.

Instructions

Return the whole current graph (properties, styles, nodes, edges). YAML output starts with a comment naming the current file; JSON output is plain JSON.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoOutput format, default yaml

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesCurrent graph file; null when the graph is in memory only
graphYes
issuesYesInvalid file entries that were skipped when reading it

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

readOnlyHint=true already establishes a safe read, and the description adds genuinely new behavioral detail: YAML output leads with a comment naming the current file while JSON is plain. That format-dependent output trait is not derivable from the annotations. It stops short of covering size or pagination behavior.

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 tight sentences with the scope statement front-loaded and the format nuance second. No filler and nothing redundant.

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?

For a single-parameter read tool with an output schema, the description covers scope and the one behaviorally interesting aspect of output format. Nothing an agent needs to call it correctly is missing.

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?

Schema coverage is 100% and the single enum parameter is documented, so baseline is 3. The description goes further by explaining what the format choice actually changes in the output (filename comment present in YAML, absent in JSON), which adds meaning beyond the enum values themselves.

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 (Return) and resource (the whole current graph) and enumerates the payload contents (properties, styles, nodes, edges). The word 'whole' plus the enumeration cleanly separates it from siblings like get_node and find_nodes.

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

Usage Guidelines3/5

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

Usage is implied: an agent can infer this is for retrieving the entire graph rather than a single node. However, it never states when to prefer it over get_node/find_nodes or how it relates to load_graph, so routing is left to inference.

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