Skip to main content
Glama

c4_model

Read-onlyIdempotent

Builds C4 context or container diagrams in Mermaid from defined people, systems, containers, and relationships, validating endpoints so architecture models stay consistent.

Instructions

Build C4 context or container diagrams (Mermaid) from explicit people, systems, containers and relations. Validates endpoints; no infrastructure discovery.

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": {
      "level": "<level>",
      "system": "<system>"
    },
    "name": "c4_model"
  }
}

Input Schema

NameRequiredDescriptionDefault
levelYes
peopleNo
systemYes
relationsNo
containersNo
externalSystemsNo

Output Schema

NameRequiredDescriptionDefault
kindNo
levelNo
mermaidNo
sourcesNo
elementsNo
nextLevelNo
validatedNo
limitationNo
unreferencedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.5.0
    • removedInput schema / properties / containers / items / additionalProperties
      Removed value: -false
    • changedInput schema / properties / containers / items / required
      Previous value: -[
      -  "id",
      -  "name",
      -  "description"
      -]New value: +[
      +  "id",
      +  "name"
      +]
    • removedInput schema / properties / externalSystems / items / additionalProperties
      Removed value: -false
    • changedInput schema / properties / externalSystems / items / required
      Previous value: -[
      -  "id",
      -  "name",
      -  "description"
      -]New value: +[
      +  "id",
      +  "name"
      +]
    • removedInput schema / properties / people / items / additionalProperties
      Removed value: -false
    • changedInput schema / properties / people / items / required
      Previous value: -[
      -  "id",
      -  "name",
      -  "description"
      -]New value: +[
      +  "id",
      +  "name"
      +]
    • removedInput schema / properties / relations / items / additionalProperties
      Removed value: -false
    • changedInput schema / properties / relations / items / required
      Previous value: -[
      -  "from",
      -  "to",
      -  "label"
      -]New value: +[
      +  "from",
      +  "to"
      +]
    • changedInput schema / required
      Previous value: -[
      -  "level",
      -  "system",
      -  "people",
      -  "externalSystems",
      -  "containers",
      -  "relations"
      -]New value: +[
      +  "level",
      +  "system"
      +]
  2. First observedv0.4.1

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description adds one genuine behavioral trait beyond that — "Validates endpoints" — plus the no-discovery constraint, but stops short of saying what happens when a relation references an unknown id (error vs. silently dropped) or where the Mermaid output goes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no filler. The build action and format are front-loaded, and the scope constraint follows immediately. Every clause carries 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?

Placeholder

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

Parameters3/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 carry parameter meaning, and it partially does by naming people, systems, containers, and relations — matching four of the six top-level properties. It never mentions externalSystems (a separate parameter from the required `system` string) and does not explain that relation endpoints must reference declared ids, leaving the most error-prone parameter semantics implicit.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Build C4 context or container diagrams (Mermaid)" gives a specific verb, a named notation standard, two explicit diagram levels, and an output format. The phrase "from explicit people, systems, containers and relations" makes clear it is model-driven rather than a generic diagram tool, which distinguishes it from siblings like architecture_diagram and sequence_diagram without naming them.

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

Usage Guidelines3/5

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

The clause "no infrastructure discovery" usefully signals when NOT to reach for this tool and implies the caller must supply a complete model. However, no sibling alternatives are named, so an agent choosing among architecture_diagram, sequence_diagram, and c4_model must infer the boundary itself.

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