Skip to main content
Glama

topology_explore

Explore a code symbol's neighbourhood to reveal what it calls, imports, inherits, or is referenced by. Trace dependencies and connections around any named symbol in the topology index.

Instructions

Bounded BFS neighbourhood around a named symbol in the topology index. NARROW IT FIRST on a large file or an unfamiliar language: include_source="none" returns names only (the default, "signatures", is several times larger), and depth=1 with max_nodes=15 answers "what touches this?" in a fraction of the default budget (depth 2, 50 nodes, 30000 bytes) — raise them once you know what you are looking for. Returns the centre node, neighbour nodes, and connecting edges up to depth/max_nodes/max_bytes. Reports truncation when limits are hit. Source is 'topology' (approximate — use LSP semantic tools for authoritative reference and definition lookups). Returns an error when topology is disabled or the symbol is not in the index.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNoOptional node kind to disambiguate a shared name: function, method, type, class, constant, variable, field, …
nameNoSymbol name or qualified name to explore. Must exist in the topology index.
pathNoOptional file-path substring to disambiguate when several indexed symbols share this name (case-insensitive).
depthNoBFS depth from the centre node. Default 2, max 4.
max_bytesNoApproximate byte budget for neighbour data. Default 30000, max 100000.
max_nodesNoMaximum number of neighbour nodes to return. Default 50, max 200.
edge_kindsNoOptional filter on edge kinds: calls, imports, contains, defines, inherits, implements.
include_sourceNoHow much source detail to include per symbol: none (name only), signatures (default), or snippets/full (signature plus docstring). Symbols are always returned whole — max_bytes truncates on symbol boundaries, never mid-function.signatures

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.16.6

TDQS

A4.3/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 full behavioral burden and does well. It discloses that source is approximate, returns an error when topology is disabled or symbol missing, reports truncation when limits hit, and explains how max_bytes truncates on symbol boundaries. It doesn't mention rate limits or performance, but for a read-only exploration tool, it covers the key behavioral aspects.

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?

The description is dense and informative, but moderately long. It front-loads the purpose and immediately provides usage maxims, followed by behavioral notes. Some redundancy with the schema (like repeating default values) adds length but not much cost. It earns its place overall, though a tighter version could trim the default value repetition.

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?

For a complex tool with 8 parameters and no output schema or annotations, the description is remarkably complete. It covers the return content (centre node, neighbour nodes, edges), truncation behavior, error conditions, approximation caveat, and parameter tuning guidance. The output schema would further help, but given the constraints, an agent has enough to invoke it correctly.

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 description coverage is 100%, so baseline is 3. The description goes beyond the schema by explaining the relative cost of include_source options (signatures is 'several times larger' than none) and providing example combinations (depth=1 with max_nodes=15), which helps agents choose values strategically. It does not describe relationship between edge_kinds and output, but the schema already lists valid kinds.

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 clearly states it performs a bounded BFS neighbourhood exploration around a named symbol in the topology index, with a specific resource and operation. It is distinguished from siblings like topology_search or find_references by the explicit neighbourhood/BFS focus, though it doesn't name a direct sibling for contrast.

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

Usage Guidelines5/5

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

Provides explicit when-to-use guidance: 'NARROW IT FIRST on a large file or an unfamiliar language', recommends specific parameter values (include_source='none', depth=1, max_nodes=15) for quick 'what touches this?' queries, and advises raising limits 'once you know what you are looking for'. Also notes caveats such as topology being approximate and recommending LSP semantic tools for authoritative lookups.

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

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/plumbkit/plumb'

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