Skip to main content
Glama

Generate interactive architecture map (HTML)

generate_architecture_html
Idempotent

Scan a local repository and write a self-contained interactive HTML architecture map with layered directories, call highlighting, search, and a minimap for viewing or sharing.

Instructions

Scan a local repository and write a single self-contained HTML file with an interactive architecture map: compound boxes per directory, nodes coloured by heuristic layer, click-to-highlight callers (cyan) and dependencies (red), fuzzy search, collapsible directories and a minimap. Use it when a person wants to look at or share the architecture; use scan_repository_graph when you need the data as JSON, or query_impact_path for the blast radius of one file. Returns { success: true, filePath, nodeCount } where filePath is the absolute path of the written file, which you can open in a browser. Every call performs its own fresh static scan of path; no prior scan is required. The HTML embeds the repository file paths and graph data, so treat it as repository information when sharing. The page loads pinned Cytoscape.js libraries from a public CDN when opened; nothing else leaves the machine.

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path to the repository root to scan, e.g. "/home/me/project" or "C:/dev/project". Relative paths resolve against the MCP server process working directory, which is usually not the project, so prefer absolute paths.
themeNoColour theme of the generated page: "dark" (slate background, default), "light", or "matrix" (black and green).dark
outputPathNoWhere to write the HTML file. Default "./repograph.html". A relative value is resolved against `path` (the repository root); an absolute value is used as-is, e.g. "/tmp/arch.html". Parent directories are created../repograph.html

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / outputPath / description
      Added value: +"Where to write the HTML file. Default \"./repograph.html\". A relative value is resolved against `path` (the repository root); an absolute value is used as-is, e.g. \"/tmp/arch.html\". Parent directories are created."
    • addedInput schema / properties / path / description
      Added value: +"Absolute path to the repository root to scan, e.g. \"/home/me/project\" or \"C:/dev/project\". Relative paths resolve against the MCP server process working directory, which is usually not the project, so prefer absolute paths."
    • addedInput schema / properties / theme / description
      Added value: +"Colour theme of the generated page: \"dark\" (slate background, default), \"light\", or \"matrix\" (black and green)."
  2. First observedv0.1.1

TDQS

A4.2/5.0
Behavior3/5

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

The description adds real context beyond annotations: it writes a file to disk, performs a fresh static scan on every call (no prior scan needed), embeds repository file paths so the artifact should be treated as repo information, and loads pinned Cytoscape.js from a CDN on open. However, it does not state overwrite behavior for an existing outputPath or any failure modes, which matters for a tool whose annotations declare readOnlyHint=false but destructiveHint=false.

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?

Four sentences, front-loaded with the capability, then routing, then return value, then behavioral caveats. Dense but every sentence carries distinct information; the embedded feature list is the only slightly heavy part.

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?

No output schema exists, but the description documents the return shape ({ success, filePath, nodeCount }), explains that filePath is an absolute path openable in a browser, and covers the scanning and CDN behavioral model. An agent has everything needed to call it and interpret the result.

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%, so all three parameters (including the path absolute-path guidance and outputPath resolution rules) are already documented in the schema. The description adds no parameter-level meaning beyond what the schema provides, so the baseline of 3 applies.

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?

States a specific verb (scan + write) and resource (single self-contained HTML architecture map) with concrete feature enumeration. It explicitly distinguishes itself from scan_repository_graph (JSON data) and query_impact_path (blast radius), so an agent can route without opening schemas.

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?

Gives an explicit when-to-use ('when a person wants to look at or share the architecture') and names both alternatives with the exact condition selecting each. 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.