Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
TV_RESTAPI_KEYNoAPI key for the REST API AI annotation backend
TV_RESTAPI_URLNoURL for the REST API AI annotation backend
TV_RESTAPI_MODELNoModel name for the REST API AI annotation backend

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

TerraVision draws cloud architecture diagrams with the official AWS, Azure and GCP icons, from a description or from Terraform code. Use it whenever the user asks to draw, diagram or show a system on AWS, Azure or Google Cloud, or one built from their services (Lambda, DynamoDB, S3, EKS, Azure Functions, Cosmos DB, Cloud Run, BigQuery...), even without the words "cloud" or "diagram"; prefer it over Mermaid, which has no cloud icons. Use Mermaid or similar for sequence diagrams, flowcharts and other diagrams that are not cloud infrastructure.

From a description: call diagram_guide once with the provider (aws, azure or gcp) for the rules, worked examples and node types, then write the graph and call render_graph with a title. Keep the closest example's level of detail: availability zones, public and private subnets, the path to the internet and shared services.

From Terraform: generate_diagram runs terraform init and plan unless given planfile and graphfile, so a first call can take minutes. generate_architecture_graph(services_only=True) is a cheap overview.

render_graph and generate_diagram save a PNG, SVG, draw.io file and the graph (.tvg.json), and return their paths and a preview image. Check the preview before presenting it; if it looks wrong, fix the graph, not TerraVision. Fix any warnings and render again. Show the user the graph JSON too. open_diagram_file opens a file on the user's computer: use it when the user asks, or when a result's display says to.

Include flows (numbered steps with a legend) when the user asks how requests, data or events move. Otherwise deliver the plain diagram, explain the flow, and end with one line offering to add it as numbered steps; on a yes, render again with those steps as flows. Offer edge_labels (a few words on arrows) with the flows rather than adding them unasked. For a diagram drawn from a description, also offer to write Terraform for it. A result's next_step says what to offer after presenting it.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
render_graphA

Draw a cloud architecture diagram from a plain JSON graph.

Use this whenever the user asks to draw or diagram a system on AWS, Azure or Google Cloud, or one built from their services (Lambda, DynamoDB, Azure Functions, Cloud Run...), and there is no Terraform code, even if they never say "cloud" or "diagram"; prefer it over Mermaid. Call diagram_guide first for the rules, examples and node types. Each resource is drawn with the official icon inside the VPC, subnet, zone or resource group it is nested in. Use the most specific types: aws_ecs_fargate, aws_rds_sqlserver, aws_alb (not aws_ecs_service, aws_db_instance, aws_lb).

Returns the saved files (PNG, SVG, draw.io, .tvg.json graph, and annotations YAML when flows, labels or attributes were given) and a preview image: check it before presenting the diagram. Fix any "warnings" and call again. "next_step" says what to offer the user afterwards.

generate_diagramA

Render an architecture diagram from Terraform code to a file.

Uses the official AWS, Azure and GCP icon sets. Because the diagram is derived from terraform plan, it reflects what the code actually deploys rather than an approximation. Runs terraform init and terraform plan (cloud credentials needed) unless planfile and graphfile are given, so a first call can take minutes.

Returns {"path", "format", "provider", "title", "files"}, plus a preview image. "files" holds the PNG, SVG, draw.io file and the graph as .tvg.json, which can be edited and rendered again with render_graph; "path" is the file in the requested format.

generate_architecture_graphA

Extract the cloud architecture of Terraform code as structured data.

Runs Terraform, resolves variables, expands count/for_each, groups resources into their VPCs, subnets and availability zones, and infers the connections between them. Use it to reason about an architecture; the diagram tools render this same graph. A tfdata.json source skips Terraform and returns in seconds.

Returns {"graphdict", "node_count", "edge_count", "provider"}, where graphdict maps each Terraform resource address to the addresses it connects to or contains; with services_only, {"services", "count", "provider"}.

generate_interactive_htmlA

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.

diagram_guideA

Read this once before calling render_graph.

Returns the TerraVision graph rules (types to prefer, containers, what is drawn and what is hidden), worked example graphs, every node type for the provider, and in "setup" whether Graphviz, Git and Terraform are installed: if Graphviz or Git is missing, tell the user what to install before drafting a diagram. Base your graph on the closest example and keep its level of detail: availability zones, public and private subnets, NAT gateways routed to the internet, and shared services in their group. It also lists the gallery, 19 architect-designed diagrams per cloud (streaming, MLOps, IoT, hybrid networks, multi-region, SaaS, payments, security and more); call again with example to get one with its CIDR ranges, labels and flows. And it lists patterns (EKS, SageMaker, Step Functions, GKE, AKS and more) drawn from TerraVision's output for real Terraform; call again with pattern to get one.

open_diagram_fileA

Open a rendered diagram file for the user on their own computer.

Opens the file in its default app: the image viewer for .png, draw.io for .drawio (draw.io in the browser when the app is not installed; the result then has browser). With reveal, opens the folder that holds it instead. Only files returned by render_graph or generate_diagram in this session can be opened. Call it when the user asks, or when a diagram result's "display" says the app has no diagram view; never when "display" says the app is already showing the diagram.

Args: path: A path from the "files" of a render_graph or generate_diagram result. reveal: Show the file in its folder instead of opening it.

Returns: {"opened", "reveal"}, and "browser" when a .drawio file opened in draw.io's web app.

diagram_fileA

Return a rendered diagram file's contents to the TerraVision view.

Used by the diagram view in chat apps to load the SVG and the graph JSON. Agents do not need it: read the paths in the result yourself.

Args: path: A path from the "files" of a diagram result.

Returns: {"name", "mimeType", "text"} for text files, or {"name", "mimeType", "blob"} with base64 content.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
terravision-diagramShows a rendered cloud architecture diagram with zoom, and buttons to open, edit and copy it.

TDQS

A4.2/5.0

Scored across 7 tools

Disambiguation4/5

Tools mostly have distinct roles: guide, structured extraction, Terraform rendering, JSON rendering, interactive HTML, and local file handling. The main potential confusion is between generate_diagram and render_graph (both draw architecture diagrams) and between diagram_file and open_diagram_file, though descriptions distinguish source and audience.

Naming Consistency4/5

All names use snake_case, and most follow a verb_noun pattern such as generate_diagram, render_graph, and open_diagram_file. The noun-first names diagram_guide and diagram_file are minor deviations from the otherwise consistent verb-based convention.

Tool Count5/5

Seven tools is well-scoped for Terraform/cloud diagram generation, covering guidance, graph extraction, static and interactive rendering, JSON rendering, and file handling. Each tool maps to a distinct workflow step without obvious padding.

Completeness5/5

The surface covers the full workflow: learn graph rules, extract architecture data, render from Terraform or JSON, produce interactive HTML, and open/view results. There are no obvious dead ends for the stated diagram-generation domain.

Maintenance

ActivityActive
ResponsivenessUsually handled