Skip to main content
Glama

get_architecture

Read-onlyIdempotent

Retrieve codebase architecture details—structure, dependencies, routes, hotspots, boundaries, layers—scoped to a directory. Get a concise overview or detailed tree to understand project organization.

Instructions

Compact counts, languages, packages, entry points. Request structure, dependencies, routes, hotspots, boundaries, layers, clusters, cycles, or file_tree; path scopes a directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoDirectory prefix (for example apps/hoa).
formatNotree
aspectsNoall=everything; overview=compact except file_tree; omitted=languages/packages/entry_points; cycles is opt-in.
projectYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.11.0
    • changedInput schema / properties / aspects / description
      Previous value: -"Aspects to include. 'all' = everything; 'overview' = compact summary (all except file_tree); omit = all. 'cycles' is opt-in ONLY (never via all/overview): it scans the whole call graph for circular CALLS dependencies (SCCs of size > 1)."New value: +"all=everything; overview=compact except file_tree; omitted=languages/packages/entry_points; cycles is opt-in."
    • addedInput schema / properties / format
      Added value: +{
      +  "default": "tree",
      +  "enum": [
      +    "tree",
      +    "json"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / path / description
      Previous value: -"Optional directory prefix to scope architecture (e.g. apps/hoa)"New value: +"Directory prefix (for example apps/hoa)."
  2. Changed1 schema field changedv0.10.4
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  3. Changed2 schema fields changedv0.10.0
    • changedInput schema / properties / aspects / description
      Previous value: -"Aspects to include. 'all' = everything; 'overview' = compact summary (all except file_tree); omit = all."New value: +"Aspects to include. 'all' = everything; 'overview' = compact summary (all except file_tree); omit = all. 'cycles' is opt-in ONLY (never via all/overview): it scans the whole call graph for circular CALLS dependencies (SCCs of size > 1)."
    • changedInput schema / properties / aspects / items / enum
      Previous value: -[
      -  "all",
      -  "overview",
      -  "structure",
      -  "dependencies",
      -  "routes",
      -  "languages",
      -  "packages",
      -  "entry_points",
      -  "hotspots",
      -  "boundaries",
      -  "layers",
      -  "file_tree",
      -  "clusters"
      -]New value: +[
      +  "all",
      +  "overview",
      +  "structure",
      +  "dependencies",
      +  "routes",
      +  "languages",
      +  "packages",
      +  "entry_points",
      +  "hotspots",
      +  "boundaries",
      +  "layers",
      +  "file_tree",
      +  "clusters",
      +  "cycles"
      +]
  4. Changed4 schema fields changedv0.9.0
    • addedInput schema / properties / aspects / description
      Added value: +"Aspects to include. 'all' = everything; 'overview' = compact summary (all except file_tree); omit = all."
    • addedInput schema / properties / aspects / items / enum
      Added value: +[
      +  "all",
      +  "overview",
      +  "structure",
      +  "dependencies",
      +  "routes",
      +  "languages",
      +  "packages",
      +  "entry_points",
      +  "hotspots",
      +  "boundaries",
      +  "layers",
      +  "file_tree",
      +  "clusters"
      +]
    • addedInput schema / properties / path
      Added value: +{
      +  "description": "Optional directory prefix to scope architecture (e.g. apps/hoa)",
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  5. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish a read-only, idempotent, non-destructive profile, and the description adds useful behavior beyond that: output is compact by default, optional aspects can be requested, and path restricts scope. It does not describe output shape or edge cases, but the annotation coverage lowers the burden.

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 short, front-loaded sentences with no filler: default output, available aspects, and path scoping are all covered. Every clause earns its place and an agent can quickly parse the salient behavior.

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?

Between the description and the input schema, an agent knows the required project, the path scoping behavior, the selectable aspects, and the tree/json format choice. There is no output schema, but the description does indicate what the default result contains; the main residual gap is the exact return shape for each requested aspect.

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 description adds meaning for aspects by listing requestable options and for path by explaining that it scopes a directory. However, format and project receive no enrichment, and with only 50% schema description coverage those parameters remain under-explained in both schema and description.

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 identifies the resource as a project/directory architecture and enumerates the default compact output (counts, languages, packages, entry points) plus requestable aspects. It is specific and informative, though it never states an explicit verb or directly distinguishes itself from siblings like query_graph or get_file_outline.

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?

It gives concrete usage context: the agent can request structure, dependencies, routes, hotspots, boundaries, layers, clusters, cycles, or file_tree, and path scopes the analysis to a directory. It does not explicitly name alternatives or say when not to use this tool, so it stops short of full routing guidance.

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