Skip to main content
Glama

export_diagram

Export L1, L2, or L3 network diagrams from a master file. Choose SVG for browser viewing or PPTX for editing, and optionally restrict to a specific area.

Instructions

Export an L1, L2, or L3 network diagram for the given .nsm master.

PREREQUISITE: You MUST have called get_ai_context(master) (or at least
get_network_state(master)) at least once in this session for this
master so that you understand which layer is meaningful to export
given the current network state.

Args:
    master: Master filename inside the working directory.
    layer:  One of 'l1', 'l2', 'l3' (case-insensitive).
    format: 'svg' (default) or 'pptx'. SVG is faster and renders in the
            browser. PPTX is editable in PowerPoint.
    area:   Optional area name. When omitted, every layer now emits a
            combined All-Areas diagram so that L1/L2/L3 share a
            uniform default contract:
              - L1: all_areas_tag
                (file: '[L1_DIAGRAM]AllAreasTag_<basename>.svg' or .pptx).
              - L2: all_areas
                (file: '[L2_DIAGRAM]AllAreas_<basename>.svg').
                NOTE: PPTX output for L2 area=None is not yet supported
                by the engine ('--type all_areas requires --format svg'),
                so the legacy first-area PPTX behaviour is preserved
                when format='pptx' (file:
                '[L2_DIAGRAM]<first_area>_<basename>.pptx').
              - L3: all_areas
                (file: '[L3_DIAGRAM]AllAreas_<basename>.svg' or .pptx).
            When given:
              - L1 generates only that area's per-area-tag SVG
                (file: '[L1_DIAGRAM]PerAreaTag_<basename>_<area>.svg').
              - L3 generates only that area's per-area SVG
                (file: '[L3_DIAGRAM]PerArea_<basename>_<area>.svg').
              - L2 generates that area's diagram
                (file: '[L2_DIAGRAM]<area>_<basename>.svg' or .pptx).
            area is only honored together with format='svg' for L1/L3
            (the engine's PPTX path always produces an all-areas pptx);
            L2 accepts area for both formats. Unknown area names are
            rejected by the engine with a clear error.

Returns:
    A summary describing which files were generated, plus the engine
    stdout. Use get_workspace_info afterwards to enumerate the files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
areaNo
layerYes
formatNosvg
masterYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden. It details behavior for each parameter, including edge cases: L2 PPTX area=None not supported, unknown areas rejected with clear error, and file naming conventions. It also mentions the return value is a summary and recommends using get_workspace_info to enumerate files. Missing are authentication or rate limit notes, but overall transparency is high.

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?

The description is lengthy but well-structured with clear headings and bullet-like formatting. Every sentence adds value, covering prerequisites, parameter details, edge cases, and return hints. It could be slightly more concise, but the structure aids readability.

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?

Given the tool's complexity (4 parameters, nuanced area behavior, output format differences, no annotations), the description is highly complete. It explains return values, file naming, and error handling. The presence of an output schema complements the description, but the description itself covers all necessary context.

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 description coverage is 0%, so the description must compensate. It does so thoroughly: explains master, layer, format (with SVG vs PPTX tradeoffs), and area (with detailed per-layer behavior for omitted vs provided area). This adds significant meaning beyond the bare schema definition.

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 description explicitly states it exports an L1, L2, or L3 network diagram for a given .nsm master. It distinguishes from sibling export tools like export_device_table_html and export_master_xlsx by specifying the resource type. The verb 'Export' and resource 'network diagram' are specific and clear.

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

Usage Guidelines4/5

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

The description clearly states a prerequisite: must have called get_ai_context(master) or get_network_state(master) beforehand. It also advises understanding which layer is meaningful given the network state. While it doesn't explicitly state when not to use or list alternatives, the context is clear enough for proper usage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cisco-open/network-sketcher'

If you have feedback or need assistance with the MCP directory API, please join our Discord server