Skip to main content
Glama

get_graph

Extract a sampled subgraph from a graph memory, filtering by node/edge types and sources, to visualize and trace the provenance of knowledge.

Instructions

Subgraph as {nodes, links, meta}. Filters are optional. Above limit nodes the best-connected ones are kept (meta.sampled). Parallel links are merged into one with a count; above max_links the heaviest are kept (meta.links_truncated). Prefer search and neighbors over a wide get_graph.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
sourcesNo
max_linksNo
edge_typesNo
node_typesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

With no annotations present, the description carries the full burden and performs strongly. It discloses concrete behaviors: best-connected nodes are kept above 'limit', parallel links are merged with a 'count', heaviest links are kept above 'max_links', and sampling/truncation are surfaced via meta fields. This gives an agent a realistic model of how the tool behaves beyond the bare schema.

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 three short sentences and every sentence contributes: output shape, filtering, sampling/merging behavior, and routing guidance. It is dense but not bloated, and the most important information is front-loaded.

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?

Given that an output schema exists and the tool has no required parameters, the description covers the important behavioral details, optional filters, truncation semantics, and an explicit alternative suggestion. It leaves some parameter-level documentation gaps, but an agent has enough to invoke the tool reasonably.

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 0%, so the description must compensate. It does add meaningful semantics for 'limit' and 'max_links' by explaining their effects on sampling and truncation, and it notes that filters are optional. However, 'sources', 'edge_types', and 'node_types' are left to their titles and schema types, with no per-parameter guidance.

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 opens with 'Subgraph as {nodes, links, meta}', making the resource and the return shape clear even though it lacks an explicit action verb. It further distinguishes itself from siblings by instructing to prefer 'search and neighbors over a wide get_graph'.

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

Usage Guidelines4/5

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

The final sentence explicitly tells the agent to prefer 'search and neighbors over a wide get_graph', naming alternatives and giving a clear when-not condition. It does not fully spell out the positive conditions under which get_graph should be the preferred tool, but the guidance is actionable enough.

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