Skip to main content
Glama

open_diagram_file

Open a rendered diagram file in its default app or reveal its folder location to view cloud architecture diagrams generated from Terraform code.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
revealNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.52.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses per-extension behavior (.png image viewer, .draw.io), the browser fallback when draw.io is not installed, the reveal alternative, the session-scoped path restriction, and the resulting side effect of launching an external app. This is far more than the schema provides.

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 and free of filler, but the mid-sentence line break before 'Only files returned by...' and the terse, jargon-y phrase 'the result then has browser' slightly obscure an otherwise efficient block of text.

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?

An action tool with real side effects is fully covered: allowed inputs, per-type behavior, the reveal variant, and return keys ('opened', 'reveal', optional 'browser') are all stated. An agent has everything needed to call it correctly, and the output schema only reinforces what is described.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate, and it does: 'path' is defined as a path from the 'files' of a render_graph or generate_diagram result, and 'reveal' is defined as showing the file in its folder instead of opening it. Both parameters gain meaning absent from the bare schema.

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 ('Open a rendered diagram file for the user on their own computer'), including where the action happens. It is immediately distinguishable from sibling producers like render_graph and generate_diagram, which create the files rather than open them.

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 explicit when-to-use ('when the user asks, or when a diagram result's "display" says the app has no diagram view') and an explicit exclusion ('never when "display" says the app is already showing the diagram'). It also restricts inputs to files returned by render_graph or generate_diagram in this session.

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