Skip to main content
Glama

Generate System Architecture Blueprint Document

generate_architecture_blueprint
Read-onlyIdempotent

Generates complete system architecture documentation with Mermaid component topology diagrams, layer boundaries, and module hierarchies from a repository, supporting onboarding and RFC review.

Instructions

Generates a complete system architectural specification (ARCHITECTURE.md) with auto-generated Mermaid component topology diagrams, layer boundaries, and module hierarchies, distinguishing from 'enforce_architecture_rules' and 'analyze_code_dependencies' by producing comprehensive system architecture documentation rather than verifying boundary rules or tracing call chains.

Parameters:

  • project_root (str, optional, default='.'): Root directory of the repository to analyze (default: current directory).

  • use_ai (bool, optional, default=False): When True, uses configured AI provider to synthesize deep narrative; when False (default), runs 100% offline AST analysis.

  • model (str, optional, default=''): Optional model identifier override when use_ai is True.

Behavior:

  • Read-only: Returns formatted Markdown text without writing files to disk.

  • Idempotent: Deterministic AST topology diagram generation when use_ai=False.

  • 100% Offline by default: Runs local AST analysis; optionally uses configured AI model when use_ai=True.

  • Auth & Rate Limits: Zero credentials required for default offline mode; completes in <1s.

  • Error Handling: Falls back to offline AST structural mapping if remote AI model synthesis is unreachable.

Usage Guidelines:

  • When to use: Create or update system architecture documentation and visual Mermaid flow diagrams for onboarding or RFC review.

  • When NOT to use: Do not use for checking rule compliance against defined boundaries (use 'enforce_architecture_rules' instead); do not use for raw dependency listings or call chain traces (use 'analyze_code_dependencies' instead).

Returns: Comprehensive Markdown document with live Mermaid diagrams, layer classifications, and component interfaces.

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": "generate_architecture_blueprint"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoOptional model identifier override when use_ai is True.
use_aiNoWhen True, uses configured AI provider to synthesize deep narrative; when False (default), runs 100% offline AST analysis.
project_rootNoRoot directory of the repository to analyze (default: current directory)..

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv7.3.2
    • changedInput schema / properties / model / description
      Previous value: -"Optional model identifier override (e.g. 'deepseek-v4.1-flash', 'gpt-4o') when use_ai is True (default: '')."New value: +"Optional model identifier override when use_ai is True."
    • changedInput schema / properties / project_root / description
      Previous value: -"Repository root directory to inspect (default: '.')."New value: +"Root directory of the repository to analyze (default: current directory)."
    • changedInput schema / properties / use_ai / description
      Previous value: -"When True, supplements deterministic AST topology with local zero-cost AI architectural insights (default: False)."New value: +"When True, uses configured AI provider to synthesize deep narrative; when False (default), runs 100% offline AST analysis."
    • changedInput schema / title
      Previous value: -"_legacy_generate_architecture_blueprintArguments"New value: +"generate_architecture_blueprintArguments"
    • changedOutput schema / title
      Previous value: -"_legacy_generate_architecture_blueprintOutput"New value: +"generate_architecture_blueprintOutput"
  2. Changed3 schema fields changedv7.3.1
    • changedInput schema / properties / model / description
      Previous value: -"Optional model identifier override (e.g. 'deepseek-v4.1-flash', 'gpt-4o') when use_ai is True."New value: +"Optional model identifier override (e.g. 'deepseek-v4.1-flash', 'gpt-4o') when use_ai is True (default: '')."
    • changedInput schema / properties / project_root / description
      Previous value: -"Root directory of the repository to analyze and document (default: current directory)."New value: +"Repository root directory to inspect (default: '.')."
    • changedInput schema / properties / use_ai / description
      Previous value: -"When True, uses configured 3rd-party AI or Free AI Cloud to synthesize deep architecture analysis; when False (default), runs 100% offline AST analysis."New value: +"When True, supplements deterministic AST topology with local zero-cost AI architectural insights (default: False)."
  3. Changed5 schema fields changedv7.0.1
    • changedInput schema / properties / model / description
      Previous value: -"Optional model identifier override when use_ai is True."New value: +"Optional model identifier override (e.g. 'deepseek-v4.1-flash', 'gpt-4o') when use_ai is True."
    • changedInput schema / properties / project_root / description
      Previous value: -"Root directory of the repository to analyze (default: current directory)."New value: +"Root directory of the repository to analyze and document (default: current directory)."
    • changedInput schema / properties / use_ai / description
      Previous value: -"When True, uses configured AI provider to synthesize deep narrative; when False (default), runs 100% offline AST analysis."New value: +"When True, uses configured 3rd-party AI or Free AI Cloud to synthesize deep architecture analysis; when False (default), runs 100% offline AST analysis."
    • changedInput schema / title
      Previous value: -"generate_architecture_blueprintArguments"New value: +"_legacy_generate_architecture_blueprintArguments"
    • changedOutput schema / title
      Previous value: -"generate_architecture_blueprintOutput"New value: +"_legacy_generate_architecture_blueprintOutput"
  4. Changed3 schema fields changedv7.0.0
    • changedInput schema / properties / model / description
      Previous value: -"Optional model identifier override (e.g. 'deepseek-v4.1-flash', 'gpt-4o') when use_ai is True."New value: +"Optional model identifier override when use_ai is True."
    • changedInput schema / properties / project_root / description
      Previous value: -"Root directory of the repository to analyze and document (default: current directory)."New value: +"Root directory of the repository to analyze (default: current directory)."
    • changedInput schema / properties / use_ai / description
      Previous value: -"When True, uses configured 3rd-party AI or Free AI Cloud to synthesize deep architecture analysis; when False (default), runs 100% offline AST analysis."New value: +"When True, uses configured AI provider to synthesize deep narrative; when False (default), runs 100% offline AST analysis."
  5. Changed3 schema fields changedv0.1.1
    • addedInput schema / properties / model / description
      Added value: +"Optional model identifier override (e.g. 'deepseek-v4.1-flash', 'gpt-4o') when use_ai is True."
    • addedInput schema / properties / project_root / description
      Added value: +"Root directory of the repository to analyze and document (default: current directory)."
    • addedInput schema / properties / use_ai / description
      Added value: +"When True, uses configured 3rd-party AI or Free AI Cloud to synthesize deep architecture analysis; when False (default), runs 100% offline AST analysis."
  6. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered; the description adds genuinely new facts: nothing is written to disk, default mode is fully offline with zero credentials, sub-second completion, and a graceful fallback to AST mapping if the remote AI model is unreachable. The only minor gap is that it does not say whether use_ai=True sends repository contents to an external provider, which is a meaningful side effect for an agent to know.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening purpose sentence is strong and front-loaded, but the parameter listing duplicates schema text verbatim and the 'Returns' paragraph is redundant given an output schema exists. Roughly a third of the text does not earn its place.

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?

For a read-only generator with full schema coverage, declared annotations, and an output schema, the description supplies everything an agent needs: artifacts produced, offline vs. AI mode tradeoff, failure behavior, and explicit routing to alternatives. Return-value detail is correctly delegated to the output schema.

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 description coverage is 100%, and the parameter block in the description restates the three schema descriptions almost verbatim rather than adding syntax, valid values, or constraints. Baseline 3 applies since the schema already carries the semantics.

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 opening sentence gives a specific verb+resource ('Generates a complete system architectural specification (ARCHITECTURE.md)') and immediately enumerates the artifacts produced: Mermaid topology diagrams, layer boundaries, module hierarchies. It explicitly names the two nearest siblings, enforce_architecture_rules and analyze_code_dependencies, and states the axis of difference (documentation vs. rule verification vs. call-chain tracing).

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

Usage Guidelines5/5

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

Dedicated 'When to use' and 'When NOT to use' sections give concrete triggering scenarios (onboarding, RFC review) and route the agent to the correct sibling tool for each excluded case. Nothing about tool selection is left to inference.

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