Skip to main content
Glama

get_hierarchy

Analyze a project's call graph to generate a hierarchical tree of its modular structure, using spectral graph partitioning to decompose the code.

Instructions

Get the hierarchical decomposition of a project's call graph. Alternates between SCC condensation and Fiedler spectral partitioning to produce a tree representing the project's modular structure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workingDirectoryYes
Behavior3/5

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

With no annotations, the description carries the full burden for behavioral disclosure. It reveals the algorithm ('alternates between SCC condensation and Fiedler spectral partitioning') and the output type (a tree), but it does not state side effects (e.g., whether it is read-only), prerequisites (e.g., whether a call graph must already be built), or performance implications. This is a moderate level of transparency.

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 sentences long, front-loaded with the main verb and resource, and includes relevant algorithmic detail without any fluff or redundancy. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (alternating algorithms) and the absence of an output schema, the description is incomplete. It does not explain what the tree represents, how the single parameter is used, or how this tool relates to sibling graph tools (e.g., whether extract_call_graph must be called first). This leaves significant gaps for an agent attempting to invoke the tool correctly.

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

Parameters1/5

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

The schema has 0% description coverage, and the tool description does not mention the required 'workingDirectory' parameter or explain what it represents. The agent is given no guidance on what value to pass (e.g., a path to a project root). The description fails to compensate for the schema's lack of parameter documentation.

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: 'Get the hierarchical decomposition of a project's call graph' with a specific verb and resource. It also mentions the output (a tree representing modular structure) and the two techniques used, which distinguishes it from sibling tools like extract_call_graph or compute_partitioning.

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 when to use the tool (when you need a hierarchical tree of the call graph) but does not explicitly state when to prefer it over alternatives. It does not mention exclusions or alternatives, such as compute_partitioning for a flat partition or extract_call_graph for a raw graph. The guidance is implicit rather than explicit.

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/egoughnour/curate-ipsum'

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