Skip to main content
Glama

inspect_architecture

Read-only

Validates a repository against declared architecture rules by scanning source imports and returning an architecture brief that flags conforming, violated, and unknown dependencies.

Instructions

Read one reviewed architecture-profile/v1 document from the active vault, scan the connected repository with the existing bounded static import analyzer, and return an architectureBrief:v1 for humans and coding agents. The profile declares scoped roles, intended dependency rules, and which known import usages those rules govern; source imports remain observed evidence with usage-qualified receipts. The result distinguishes conforms, violated, and unknown, and never treats unsupported languages, unclassified import usage, empty role mappings, or unmapped edges as compliance. Pattern labels are human/document declarations, not folder-name inference. side effect 0.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxFilesNoPositive source-file scan cap (default 5000, max 50000).
rootPathNoRepository root to inspect. Defaults to the active resolved repository root from connection_info.
profileSlugNoArchitecture profile_slug. Optional only when the vault contains exactly one architecture profile.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
profileYes
contractYes
sideEffectYes
conformanceYes
nextActionsYes
agentPlanContractYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.13.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already mark readOnlyHint=true and destructiveHint=false, but the description adds substantial behavioral nuance beyond that: it never treats unsupported languages, unclassified import usage, empty role mappings, or unmapped edges as compliance, and clarifies that pattern labels come from human/document declarations, not folder-name inference. This directly informs the agent of the tool's conservative, evidence-based behavior, which is highly valuable for correct invocation and interpretation of results.

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?

Four sentences, each adding distinct value: the core action, the profile's role, the output categories, and the caveat about pattern labels. The description is front-loaded with the primary purpose and ends with a succinct 'side effect 0' note. No filler or redundant information.

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

Completeness5/5

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

Given the tool's complexity and the presence of an output schema, the description covers the essential context: input requirements (reviewed profile, active vault, connected repo), the scanning mechanism, the output type (architectureBrief:v1), the three result categories (conforms, violated, unknown), and explicit exclusions. The agent has enough information to decide when to invoke it and what to expect.

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?

Schema coverage is 100% – every parameter (maxFiles, rootPath, profileSlug) has a description with constraints. The tool description adds no additional meaning about parameters, so it does not go beyond the schema. A baseline of 3 is appropriate since the schema fully documents the parameters.

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 opens with a precise verb-resource-outcome chain: 'Read one reviewed architecture-profile/v1 document, scan the connected repository with the existing bounded static import analyzer, and return an architectureBrief:v1.' It clearly distinguishes itself from sibling repo-analysis tools (e.g., index_project, analyze_repo_structure) by specifying the profile-based, compliance-focused output. The mention of 'reviewed' and 'bounded' narrows its scope further, so an agent can differentiate it without opening the schema.

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?

The description implicitly conveys when to use it: when a reviewed architecture profile exists in the active vault and a repository is connected. It does not explicitly list alternatives or state when not to use it, but the context is clear enough to guide an agent toward this tool for architecture compliance checks rather than, say, indexing or repository structure analysis. No exclusions are mentioned, so a 4 is appropriate.

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