Skip to main content
Glama

import_arch_diagram

Destructive

Imports an architecture diagram from Mermaid C4 or PlantUML C4 and materializes it as kind='arch' blocks + arch-* dependencies. Mode 'replace' (default) deletes the whole existing arch slice before import. 'merge' adds the new nodes by name without touching the old ones. Blocks of other kinds (org, entity, ...) are never touched. In Mermaid, subgraphs become trust zones (trustBoundary) and the C4 notation of the labels gives archType + technology. Returns warnings for whatever fell back to a default (unknown C4 notation, nested subgraphs) — empty when there is nothing to report.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "format": "<format>",
      "payload": "<payload>"
    },
    "name": "import_arch_diagram"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNo'replace' (default) deletes all kind='arch' blocks and their arch-* dependencies, then adds the payload. 'merge' keeps the existing arch blocks (by name) and only adds the new ones.
formatYesPayload format — same parsers as for the export. A file PRODUCED BY export_arch_diagram and fed back in keeps ids, archTypes and edge subtypes. A hand-written file keeps only what its syntax declares: in Mermaid, the C4 annotation of the label ([Container: Node.js], [ContainerDb: PostgreSQL], [System_Ext]), subgraphs (→ trust zone) and the `class <id> <archType>` directive — otherwise a node falls back to archType 'service'. The exact syntax of a hand-written file is described by get_playbook('arch').
payloadYesText content of the diagram to import (the whole source file).
expectedProjectIdNoUUID of the project THIS call targets (overrides the session project).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / expectedProjectId / description
      Previous value: -"UUID of the project THIS call targets (overrides the session project). No access: refused, nothing changed."New value: +"UUID of the project THIS call targets (overrides the session project)."
  2. Changed1 schema field changed
    • changedInput schema / properties / expectedProjectId / description
      Previous value: -"UUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted."New value: +"UUID of the project THIS call targets (overrides the session project). No access: refused, nothing changed."
  3. Changed4 schema fields changed
    • changedInput schema / properties / expectedProjectId / description
      Previous value: -"UUID du projet visé par CET appel. Cible RÉELLEMENT ce projet au lieu du projet de session. Refusé sans rien modifier si l'accès n'est pas accordé."New value: +"UUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted."
    • changedInput schema / properties / format / description
      Previous value: -"Format du payload — mêmes parsers que pour l'export. Un fichier PRODUIT PAR export_arch_diagram et réinjecté conserve ids, archTypes et subtypes d'arêtes. Un fichier écrit à la main ne conserve que ce que sa syntaxe déclare : en Mermaid, l'annotation C4 du libellé ([Container: Node.js], [ContainerDb: PostgreSQL], [System_Ext]), les subgraph (→ zone de confiance) et la directive `class <id> <archType>` — à défaut, un nœud retombe sur archType 'service'. La syntaxe exacte d'un fichier écrit à la main est décrite par get_playbook('arch')."New value: +"Payload format — same parsers as for the export. A file PRODUCED BY export_arch_diagram and fed back in keeps ids, archTypes and edge subtypes. A hand-written file keeps only what its syntax declares: in Mermaid, the C4 annotation of the label ([Container: Node.js], [ContainerDb: PostgreSQL], [System_Ext]), subgraphs (→ trust zone) and the `class <id> <archType>` directive — otherwise a node falls back to archType 'service'. The exact syntax of a hand-written file is described by get_playbook('arch')."
    • changedInput schema / properties / mode / description
      Previous value: -"'replace' (défaut) supprime tous les cells de kind='arch' et leurs dépendances arch-*, puis ajoute le payload. 'merge' garde les cellules arch existantes (par nom) et n'ajoute que les nouvelles."New value: +"'replace' (default) deletes all kind='arch' blocks and their arch-* dependencies, then adds the payload. 'merge' keeps the existing arch blocks (by name) and only adds the new ones."
    • changedInput schema / properties / payload / description
      Previous value: -"Contenu textuel du diagramme à importer (le fichier source au complet)."New value: +"Text content of the diagram to import (the whole source file)."
  4. Changed1 schema field changed
    • changedInput schema / properties / format / description
      Previous value: -"Format du payload — mêmes parsers que pour l'export. Un fichier PRODUIT PAR export_arch_diagram et réinjecté conserve ids, archTypes et subtypes d'arêtes. Un fichier écrit à la main ne conserve que ce que sa syntaxe déclare : en Mermaid, l'annotation C4 du libellé ([Container: Node.js], [ContainerDb: PostgreSQL], [System_Ext]), les subgraph (→ zone de confiance) et la directive `class <id> <archType>` — à défaut, un nœud retombe sur archType 'service'. Appelle get_playbook('arch') pour la syntaxe exacte avant d'écrire un fichier à la main."New value: +"Format du payload — mêmes parsers que pour l'export. Un fichier PRODUIT PAR export_arch_diagram et réinjecté conserve ids, archTypes et subtypes d'arêtes. Un fichier écrit à la main ne conserve que ce que sa syntaxe déclare : en Mermaid, l'annotation C4 du libellé ([Container: Node.js], [ContainerDb: PostgreSQL], [System_Ext]), les subgraph (→ zone de confiance) et la directive `class <id> <archType>` — à défaut, un nœud retombe sur archType 'service'. La syntaxe exacte d'un fichier écrit à la main est décrite par get_playbook('arch')."
  5. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false; the description goes well beyond them by spelling out exactly what is destroyed in replace mode (all kind='arch' blocks and their arch-* dependencies) and what is explicitly spared (org, entity, ... blocks). It also discloses the warning channel for fallbacks such as unknown C4 notation and nested subgraphs, which no annotation conveys.

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 action and target, then mode semantics, then scope guarantees and warnings — a logical order with no filler sentences. It is a single dense paragraph with compound clauses, so a light bulleted structure for the two modes would scan faster, but nothing is wasted.

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 destructive, four-parameter import with no output schema, the description covers inputs, destructive scope, non-destructive guarantees, and the warnings return path. The remaining gap is that it never says what else the response contains (e.g., created block counts or ids), which an agent may want after a destructive replace.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: it explains the replace-vs-merge semantics behind the mode enum and the round-trip fidelity of format ('a file PRODUCED BY export_arch_diagram ... keeps ids, archTypes and edge subtypes', hand-written files fall back to archType 'service'). expectedProjectId is left to the schema, which is acceptable given full coverage.

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+resource pair ('Imports an architecture diagram from Mermaid C4 or PlantUML C4') and names the resulting artifacts (kind='arch' blocks + arch-* dependencies). The accepted input formats and the output materialization distinguish it clearly from siblings like import_data_model or import_org.

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?

Explicitly defines the two modes and their selection conditions: 'replace' (default) deletes the whole existing arch slice, 'merge' adds new nodes by name without touching old ones, and blocks of other kinds are never touched. It also routes users with hand-written files to get_playbook('arch'), but stops short of stating when to prefer a different import tool entirely.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.