Skip to main content
Glama

get_dependency_graph

Resolves relative imports to build a dependency graph, returning internal file edges and external package names for a given repository.

Instructions

Builds a dependency graph of the repository by resolving relative imports between files. Returns edges (from -> to) for internal files and a separate list of external package names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoPathYesAbsolute or relative path to the repository root
Behavior4/5

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

With no annotations, the description fully discloses key behavior: it resolves relative imports only (ignoring other import types), and it returns internal edges and external package names separately. This gives the agent a good mental model, though it omits potential limitations like error handling or performance.

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 two concise sentences that front-load the action and resource, include necessary output details, and contain no superfluous words.

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 one-parameter, no-output-schema tool, the description explains the behavior, input (via schema), and output structure. It sufficiently covers internal vs external dependency classification but does not address edge cases like invalid paths or unresolved imports.

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?

The schema already provides a clear description for the only parameter, repoPath, covering 100% of parameters. The tool description adds no extra parameter semantics, so the baseline of 3 is appropriate.

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 that the tool builds a dependency graph by resolving relative imports, which is a specific and unambiguous action. It distinguishes itself from sibling tools like get_repo_structure and get_file_summary by focusing on import relationships and return structure.

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 usage context is implied from the description (use when you need dependency insights), but there is no explicit when-to-use or when-not-to-use guidance, nor any mention of alternative tools. This leaves the agent to infer the appropriate context.

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/bsana1/codecity-mcp'

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