Skip to main content
Glama
VIethoangnguyenle

Understand-Anything MCP Server

get_node_source

Retrieve source code for a knowledge graph node by ID, extracting function or class blocks or full file content with line numbers.

Instructions

Get the actual source code for a knowledge graph node.

For function/class nodes: extracts just the method or class block with annotations. For file/config nodes: returns the whole file content (truncated if too large). Includes line numbers for easy reference.

Args: node_id: Node ID (use query_nodes to find IDs). max_lines: Max lines for whole-file reads (default 200). Does not affect function/class extraction. project: Project name.

Returns: Source code with line numbers, file path, and extraction metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
node_idYes
projectNo
max_linesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden of transparency. It discloses node-type-specific extraction behavior, truncation for large files, inclusion of line numbers, and the effect of max_lines on whole-file reads. This is strong, but it does not mention failure modes or whether the operation is strictly read-only (though implied by 'Get'), so a 4 is appropriate.

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 well-structured with an opening sentence, a short behavioral breakdown, labeled arguments, and a returns note. Every sentence earns its place, and the format is easy to scan without being bloated.

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?

The tool has 3 parameters, no annotations, no schema descriptions, and no output schema. The description covers purpose, behavior by node type, parameter semantics, and return format. It gives the agent enough context to correctly invoke the tool without needing additional lookup.

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

Parameters5/5

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

The input schema has zero parameter descriptions, so the description fully compensates. It explains node_id as an ID to be found via query_nodes, max_lines as a limit for whole-file reads that does not affect function/class extraction, and project as the project name. This adds significant meaning beyond the raw 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 opens with a specific verb and resource: 'Get the actual source code for a knowledge graph node.' It further distinguishes behavior for function/class vs file/config nodes, which clearly separates it from sibling tools like get_node_detail or query_nodes that serve different purposes.

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?

Clear context is provided: use this tool when you need the actual source code for a node. The description also tells the agent to use query_nodes to find IDs, which is a helpful cross-reference. However, it does not explicitly mention when to avoid this tool or name alternative tools for metadata-only needs, so it falls short of a 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/VIethoangnguyenle/Understand-Anything-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server