Skip to main content
Glama

generate_interactive_html

Render a self-contained interactive HTML diagram from Terraform code so users can click, search, and explore cloud architecture offline without a server.

Instructions

Render a self-contained interactive HTML diagram for a human to open.

The page embeds the diagram, every resource's metadata and its own JavaScript, so it works offline with no server. Nodes are clickable and searchable. Produce this when someone wants to explore an architecture themselves rather than read a static picture. Needs Terraform code; for a JSON graph use render_graph with format "svg".

Returns {"path", "provider"} pointing at the generated .html file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNoHeading shown on the page. Overrides a title in the annotation file.
sourceYesTerraform directory, Git URL, or tfdata.json replay file. Add //folder to a Git URL for a folder inside the repository, e.g. "https://github.com/org/repo//examples". A repository whose root is a reusable module plans no resources: draw a folder that uses it instead (examples/, an environment).
outfileNoOutput file name without extension, e.g. "three_tier". Files always go to the server's output folder; from a path, only the last part is used. The cloud provider is appended.architecture
upgradeNoRun `terraform init -upgrade` to refresh modules.
varfileNoPaths to .tfvars files; different var files can produce different architectures from the same code.
annotateNoPath to a terravision.yml annotation file.
fontsizeNoLabel font size in points.
iconsizeNoIcon size in pixels.
planfileNoPath to an existing plan JSON (terraform show -json). With graphfile, Terraform is never run and no cloud credentials are needed.
graphfileNoPath to an existing `terraform graph` DOT file.
workspaceNoTerraform workspace to select.default
simplifiedNoDrop networking containers (VPCs, subnets, security groups) and show only the services.
use_tf_namesNoLabel nodes with full Terraform resource names.
use_resource_namesNoLabel nodes with the deployed resource names from the plan.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.52.0

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden, and it does real work: it discloses that the page is self-contained, works offline with no server, and that nodes are clickable and searchable. It stops short of stating credential/permission requirements for the Terraform execution path, which the schema hints at but the description never connects.

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?

Front-loaded with the purpose and behavioral traits, and every sentence about interactivity and prerequisites earns its place. The closing return-value line ({"path", "provider"}) is redundant given an output schema exists, a minor waste.

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?

For a 14-parameter tool with a 100% documented schema and an output schema, the description supplies what the structured fields cannot: the interactivity/offline nature, the human-exploration use case, and the sibling routing. Nothing essential to calling it correctly is missing.

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 the schema already documents all 14 parameters, including the //folder Git URL syntax, varfile behavior, and provider-credential-free planfile/graphfile paths. The description adds no parameter-level detail beyond implying Terraform code is required, which is the correct baseline when the schema does the heavy lifting.

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 and resource ("Render a self-contained interactive HTML diagram") plus the key property that makes it distinct (interactive, offline, for a human to open). It explicitly contrasts itself with the sibling render_graph for JSON graphs, so an agent can route without opening either schema.

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 condition ("when someone wants to explore an architecture themselves rather than read a static picture") and names the alternative for the adjacent case (render_graph with format "svg" for a JSON graph). It also states the prerequisite (needs Terraform code).

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