Skip to main content
Glama
padobrik

MCP Context Graph

by padobrik

get_context

Retrieve a symbol's contextual neighborhood, including callers, callees, imports, and containers up to a specified depth, to understand code relationships without reading entire files.

Instructions

Get the contextual neighborhood around a symbol: the symbol plus connected nodes (callers, callees, imports, containers) within a given depth, and the relationships between them. The compact alternative to reading whole files for context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoThe symbol name to get context for. Use either symbol_id or name, not both.
depthNoContext depth: 0=just the node, 1=direct callers/callees, 2=indirect connections, etc. Maximum depth is 5.
formatNoResponse format: 'json' for structured data suitable for parsing, 'markdown' for human-readable text with code blocks.json
symbol_idNoThe unique ID of the symbol (returned from find_symbol). Use either symbol_id or name, not both.
Behavior4/5

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

With no annotations, the description carries the full burden. It explains the behavior in detail: returns symbol plus connected nodes within a depth, and relationships. It does not disclose edge cases like duplicate symbol_id/name or error handling, but for a read tool this is adequate.

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 sentences, no filler. The first sentence states the action and scope, the second gives a practical usage rationale. Every word earns its place.

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?

For a read-only graph traversal tool without an output schema, the description conveys the return concept (nodes + relationships) and depth semantics. It omits details about response formats or limits, but the schema's format parameter and maximum depth cover some of that.

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?

The schema has 100% coverage, so the baseline is 3. The description adds meaning beyond schema by enumerating node types (callers, callees, imports, containers) and framing depth as neighborhood expansion, which enriches the schema's per-parameter descriptions.

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 uses the specific verb 'Get' and names the resource 'contextual neighborhood around a symbol', specifying included node types (callers, callees, imports, containers) and depth. This clearly distinguishes it from siblings like find_callers (specific relationship) or find_symbol (single symbol).

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 phrase 'compact alternative to reading whole files for context' gives clear usage context and implies when to prefer this tool. However, it does not explicitly mention alternative tools or when not to use it, so it's a half-step above basic guidance.

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/padobrik/mcp-context-graph'

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