Skip to main content
Glama
chacharin

mcp-lightrag

by chacharin

get_knowledge_graph

Retrieve a focused subgraph of nodes and edges centered on a specific entity, prioritizing nearby and well-connected nodes while respecting configurable depth and node limits.

Instructions

Retrieve a connected subgraph (nodes and edges) around one entity label. Nodes closer to the label, and more connected nodes, are kept first when the graph is larger than max_nodes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelYesEntity label to center the subgraph on.
max_depthNoMaximum number of hops from the starting label.
max_nodesNoMaximum number of nodes to return.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral disclosure burden. It adds valuable transparency by explaining truncation priority: nodes closer to the label and more connected nodes are kept first when max_nodes is exceeded. However, it does not mention potential side effects (though read-only is implied) or clarify whether edges are also subject to truncation.

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 one efficient sentence that leads with the core action and resource, then immediately provides the key behavioral detail about truncation. There is no filler or repetition of schema information.

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?

The tool is a straightforward read-only retrieval operation with an output schema, so the description does not need to explain return values. It covers the essential behavior (subgraph retrieval and truncation policy). The only minor gap is the lack of explicit usage guidance or alternative routing, which is already factored into the usage_guidelines score.

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%, so the baseline is 3UTE-ND. The description adds meaningful parameter semantics for max_nodes by explaining how nodes are selected when the graph exceeds the limit, which goes beyond the schema's simple 'Maximum number of nodes to return'. label and max_depth remain adequately covered by 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?

The description states a specific verb ('Retrieve') and resource ('connected subgraph (nodes and edges) around one entity label'). This clearly distinguishes the tool from sibling graph-label tools like get_graph_labels, search_labels, and get_popular_labels, which focus on labels rather than the full graph structure.

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?

The description implies the tool should be used when a connected subgraph around an entity label is needed, but it does not explicitly mention any alternatives or when NOT to use it. No exclusions, prerequisites, or comparative guidance is given, so the usage context is only implied.

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