Skip to main content
Glama

get_architecture

Read-onlyIdempotent

Summarize a Python repository's internal module dependencies from static imports to reveal core, leaf, dependent, and isolated modules and import cycles for change-impact analysis.

Instructions

Summarize the repo's internal module dependency structure from static imports.

Use to explain how the code fits together, or to judge the blast radius of a change. Returns core modules (most imported by other internal modules), leaf modules (imported but import nothing internal), the most dependent modules (most internal imports), a count of isolated modules, and import cycles (groups of modules that import each other, often a design smell). Test modules are excluded; dynamic imports are not seen.

Args: repo: "owner/name" or a github.com URL.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "repo": "<repo>"
    },
    "name": "get_architecture"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), so the description earns credit for adding real limits: static imports only, test modules excluded, dynamic imports not seen. It also enumerates what the summary contains (core modules, leaf modules, dependent modules, isolated count, cycles). It does not mention auth or rate limits for what is an open-world GitHub read, so it is not a 5.

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 purpose and usage are front-loaded, and the middle sentence packs the return components efficiently. The trailing 'Args:' block is slightly awkward formatting but the content is necessary given zero schema coverage.

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?

With no output schema, the description does the work of explaining what comes back, and it discloses the static-import and test-exclusion limitations. The only gap is that access requirements for private repos and behavior on an invalid repo string are unstated.

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 coverage is 0%, so the description must carry the single parameter. It does: the repo argument accepts 'owner/name' or a github.com URL. That is the key format detail the schema lacks, though nothing is said about private-repo access or invalid input handling.

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 opens with a specific verb and resource: 'Summarize the repo's internal module dependency structure from static imports.' That is far more precise than generic siblings like analyze_repo or run_static_analysis. It does not explicitly name a sibling it is not, so it stops short of a 5.

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 use cases: 'explain how the code fits together' or 'judge the blast radius of a change.' That tells an agent when to reach for it. It offers no explicit when-not condition or named alternative, which keeps it at 4.

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