Skip to main content
Glama

get_subsystem_clusters

Discover repository subsystem clusters and compute cohesion, instability, and coupling metrics (Ca, Ce, I) across Python and TypeScript/JS codebases to assess architectural structure.

Instructions

Architectural Subsystem Cluster Map: Discovers repository subsystem clusters, cohesion, instability, and coupling metrics ($Ca, Ce, I$) across Python and TypeScript/JS.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_subsystem_clusters"
  }
}

Input Schema

NameRequiredDescriptionDefault
root_dirNoPath to the repository root directory (default: '.').

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations supplied, the description carries the full behavioral burden. 'Discovers' weakly implies a read-only scan, and the Python/TypeScript-only scope is a useful constraint, but it says nothing about cost, repository size limits, whether it writes anything, or permissions needed for the analysis.

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?

A single dense sentence with the tool's identity front-loaded and the metric set enumerated without filler. The '(Ca, Ce, I)' notation is compact but assumes the reader knows these coupling terms.

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

Completeness3/5

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

For a read-only analysis tool with no output schema, the description should indicate what the returned cluster map looks like or at least whether per-subsystem or aggregate metrics come back. It conveys the metric vocabulary but leaves the response shape entirely to inference, which is a moderate gap for an agent deciding whether to call it.

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?

Only one parameter (root_dir) exists and the schema already documents it at 100% coverage including the '.' default, so the baseline is 3. The description adds nothing about how root_dir affects the scan scope or what happens when pointed at a subdirectory.

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 names a specific verb+resource ('Discovers repository subsystem clusters') and enumerates the concrete metrics produced (cohesion, instability, coupling, Ca/Ce/I). It also bounds scope to Python and TypeScript/JS, which separates it from generic auditors like audit_code_quality, though it never names an alternative explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use or when-not-to-use guidance, and no routing toward or away from plausible siblings such as get_architecture_digest or check_code_health. The agent must infer from the label that this is the clustering/metrics view rather than a general health audit.

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