Skip to main content
Glama

Scan local codebase

scan_local_codebase

Scan a directory to generate a dependency graph with files, symbols, imports, inferred call graph, community clustering, and structural analysis for code understanding.

Instructions

Recursively scan a directory and build a dependency graph: files, top-level symbols, import edges, an inferred call graph (with EXTRACTED/INFERRED/AMBIGUOUS confidence), community clustering, and structural analysis (hub/god nodes, import cycles, orphans). Default returns a compact summary; raw=true returns the full JSON map.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute or relative directory to scan.
rawNoReturn full JSON map instead of summary.
maxFilesNo
Behavior4/5

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

With no annotations, the description carries full burden. It discloses the output types (compact summary vs. full JSON map) and lists the analysis components. It does not cover performance or permissions, but for a read-only scan tool, the transparency is strong.

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 two sentences: the first lists the analysis features, the second explains output options. It is concise and front-loaded with the main action, though the dense list of components could be slightly reorganized for clarity.

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?

Given the complexity of the tool (dependency graph with many features) and the absence of an output schema, the description provides a good overview. It covers the key outputs and options, though it does not detail how to interpret specific analyses (e.g., confidence levels).

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

Parameters3/5

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

Schema coverage is 67% (2 of 3 parameters have descriptions). The description adds context for the 'raw' parameter by explaining its effect, but does not elaborate on 'path' (beyond schema) or 'maxFiles'. This adds some value but is not comprehensive.

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 clearly states the tool's purpose: recursively scan a directory and build a dependency graph. It uses a specific verb ('scan') and resource ('local codebase'), and the listing of components (symbols, call graph, etc.) distinguishes it from sibling tools like export_codebase_graph.

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 usage for analyzing code structure but does not provide explicit guidance on when to use this tool versus alternatives like export_codebase_graph or context_stats. It mentions default vs. raw output but lacks when-not or prerequisite conditions.

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/AntoniovanDijck/meshmind'

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