Skip to main content
Glama

get_context

Retrieve deep context for any graph node, including source code and all connected edges with code snippets. Use to investigate node relationships and code details.

Instructions

Get deep context for a graph node: source code + full graph neighborhood.

Shows ALL incoming and outgoing edges grouped by type, with source code at each connected node's location. Works for ANY node type.

Use this after find_nodes or query_graph to deep-dive into a specific node.

Output includes:

  • Node info (type, name, semantic ID, location)

  • Source code at the node's location

  • All outgoing edges (what this node connects to)

  • All incoming edges (what connects to this node)

  • Code context at each connected node's location

Primary edges (CALLS, ASSIGNED_FROM, DEPENDS_ON, etc.) include code context. Structural edges (CONTAINS, HAS_SCOPE, etc.) are shown in compact form.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
semanticIdYesExact semantic ID of the node (from find_nodes or query_graph)
contextLinesNoLines of code context around each reference (default: 3)
edgeTypeNoFilter by edge type (comma-separated, e.g., "CALLS,ASSIGNED_FROM")
Behavior4/5

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

No annotations provided, but description details the output: node info, source code, all outgoing/incoming edges, and code context. Mentions that primary edges include code context while structural edges are compact. Does not mention any destructive behaviors, which are not expected for a read tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is well-structured with a clear first sentence and bullet-like list of outputs. Slightly long but every sentence adds value. Could be slightly more concise but overall good.

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?

No output schema exists, but description comprehensively explains what the tool returns: node info, source code, all edges grouped by type, and code context. Distinguishes between primary and structural edges. Fully compensates for missing output schema.

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% but description adds value beyond schema: for contextLines it adds default value 3, for edgeType it gives example filter 'CALLS,ASSIGNED_FROM', and for semanticId it reiterates source. Adds useful context.

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?

Clearly states it gets deep context for a graph node, including source code and full graph neighborhood. Distinguishes from siblings like get_neighbors and get_node by specifying it shows all edges grouped by type with code context at connected nodes.

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?

Explicitly says 'Use this after find_nodes or query_graph to deep-dive into a specific node.' Provides clear context for when to use. Does not explicitly mention when not to use, but the guidance is sufficient.

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/Disentinel/grafema'

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