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.

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 targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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)."
  2. 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')."
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations flag destructiveHint=true, and the description adds the exact blast radius ('replace deletes the whole existing arch slice') and the containment boundary ('blocks of other kinds are never touched'), plus auth behavior for expectedProjectId and the warnings return contract. That is materially more than the annotations convey.

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?

Purpose and mode semantics are front-loaded, and no sentence is filler. It is a dense, single-paragraph block with several parenthetical asides, which costs a little readability but not much information.

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?

With no output schema, the description covers the return surface (warnings, empty when nothing to report), the mode-dependent mutation scope, cross-kind safety, and redirects to get_playbook('arch') for file syntax. An agent has what it needs to call this correctly.

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; the description still earns credit by explaining how payload content is interpreted — subgraphs mapping to trustBoundary/trust zones, C4 label notation yielding archType + technology, the `class <id> <archType>` directive, and the 'service' fallback.

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 (imports/materializes) on a specific resource (architecture diagram from Mermaid C4 or PlantUML C4) and names the exact output artifacts (kind='arch' blocks + arch-* dependencies). That output signature cleanly separates it from import_data_model, import_org, and import_tasks without opening any schema.

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?

Gives real selection guidance: replace vs merge semantics, the default, and the pointer to get_playbook('arch') for hand-written syntax plus the note that export_arch_diagram output round-trips. It stops short of naming sibling importers or stating when NOT to use this tool, so not a full 5.

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.