architect-c4-mcp
v0.3.7C4 architecture MCP sidecar — TOML under docs/, Rust write queue
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
bind_docs Bind Docs
Bind to a host ``docs/`` directory (sidecar happy path). Rewrites legacy ``*.json`` ADR/Flow → ``*.toml``. Loads ``model.toml``. Env default: ``ARCHITECT_C4_DOCS``.
| Parameter | Type | Description |
|---|---|---|
docs_dir |
upsert_element Upsert Element
Upsert C4 element (person|software_system|container|component|code|external). Code atoms: set ``technology`` to ``class``|``interface``|``function``. For code methods/fields prefer structured ``members`` (see schemas/code_member.json), e.g. ``{"kind":"method","visibility":"+","name":"send","params":[{"name":"message","type":"Message"}],"return_type":"Message"}``. Legacy: UML lines in ``description`` (`+foo()`, `+bar(x: T) R`). External (DB/SaaS/queue): kind=external, technology e.g. ``datastore``|``queue``|``saas``.
| Parameter | Type | Description |
|---|---|---|
id * | string | |
kind * | string | |
name * | string | |
description | ||
members | ||
parent_id | ||
technology | ||
url |
upsert_relationship Upsert Relationship
Upsert relationship; enforces C4 baseline + accepted ADR policy.forbid. V1 atom canon (default): code↔code, code↔external, person↔system|external. Shell endpoints rejected unless ARCHITECT_C4_ATOM_EDGES=0 (legacy).
| Parameter | Type | Description |
|---|---|---|
from_id * | string | |
id * | string | |
to_id * | string | |
description |
delete_relationship Delete Relationship
Delete a relationship (revision recorded).
| Parameter | Type | Description |
|---|---|---|
id * | string |
get_model Get Model
Return elements, relationships, decisions.
validate_model Validate Model
Validate C4 + ADR layers + policy; agent-facing problems with layer/code/message.
upsert_adr Upsert Adr
Upsert rigid ADR JSON (Nygard fields + optional policy). Agent may only set status to ``draft`` or ``proposed``. Unknown fields rejected. See ``schemas/adr.json``.
| Parameter | Type | Description |
|---|---|---|
adr * | object | |
commit | boolean |
set_adr_status Set Adr Status
Process-only ADR status transition. ``rejected`` requires non-empty ``reason``. ``superseded`` requires ``superseded_by_id``. When ``ARCHITECT_C4_PROCESS_TOKEN`` is set, ``process_token`` must match.
| Parameter | Type | Description |
|---|---|---|
id * | string | |
status * | string | |
commit | boolean | |
process_token | ||
reason | ||
superseded_by_id |
get_adr Get Adr
Get one ADR as rigid JSON.
| Parameter | Type | Description |
|---|---|---|
id * | string |
list_adrs List Adrs
List ADR index rows (each includes view_url).
| Parameter | Type | Description |
|---|---|---|
base_url | string |
upsert_flow Upsert Flow
Upsert rigid Flow JSON (see ``schemas/flow.json``). Prefer ``kind=c4_dynamic`` with ``steps`` referencing existing C4 element ids. ``sequence`` / ``state`` use Mermaid ``body``.
| Parameter | Type | Description |
|---|---|---|
flow * | object | |
commit | boolean |
get_flow Get Flow
Get one Flow as rigid JSON.
| Parameter | Type | Description |
|---|---|---|
id * | string |
list_flows List Flows
List flows (each includes view_url).
| Parameter | Type | Description |
|---|---|---|
base_url | string |
delete_flow Delete Flow
Delete a flow document (revision recorded).
| Parameter | Type | Description |
|---|---|---|
id * | string | |
commit | boolean |
get_flow_diagram Get Flow Diagram
Mermaid for a flow + view_url.
| Parameter | Type | Description |
|---|---|---|
id * | string | |
base_url | string |
get_overview_diagram Get Overview Diagram
C4 Context (level 1) Mermaid + view_url for the browser viewer.
| Parameter | Type | Description |
|---|---|---|
base_url | string |
get_layer_diagram Get Layer Diagram
C4 layer diagram: context|container|component|code. Includes view_url.
| Parameter | Type | Description |
|---|---|---|
layer * | string | |
base_url | string | |
parent_id |
get_view_links Get View Links
Absolute viewer URLs for context/containers/components/code/ADRs (for agents).
| Parameter | Type | Description |
|---|---|---|
base_url | string |
get_scene Get Scene
Scene graph JSON for WASM/canvas (and All-layers mode).
| Parameter | Type | Description |
|---|---|---|
focus | ||
layer | ||
mode | string |