create_diagram
Create a NEW architecture diagram from a graph that YOU author, and get back a shareable, editable canvas URL plus a rendered SVG and Mermaid. You produce only the SEMANTICS — nodes, the groups (VPC/cluster/...) they live in, and the directed edges between them. You do NOT lay anything out: never send x/y/position/pinned. A deterministic layout engine computes all geometry and an icon layer picks the pictures from each node's kind. kind.catalog is one of aws | gcp | azure | k8s | saas | generic, each with rich per-catalog kind.types (e.g. aws:lambda, gcp:bigquery, azure:cosmos_db, k8s:deployment, saas:kafka): - "aws" (api_gateway, lambda, s3, rds, dynamodb, sqs, bedrock, kinesis, fargate, eventbridge, aurora, ...). - "gcp" (compute_engine, gke, cloud_run, cloud_sql, spanner, firestore, bigquery, pubsub, dataflow, vertex_ai, ...). - "azure" (virtual_machine, aks, app_service, functions, blob_storage, sql_database, cosmos_db, service_bus, event_hubs, key_vault, ...). - "k8s" (pod, deployment, statefulset, daemonset, job, cronjob, service, ingress, configmap, secret, hpa, ...). - "saas" for hosted third-parties (redis, postgresql, mysql, mongodb, kafka, stripe, twilio, auth0, github, cloudflare, ...). - "generic" primitive when nothing branded fits: service, database, cache, queue, user, external_system, storage, gateway, function, note. - "generic" FLOWCHART kinds for processes/flowcharts: process, decision, terminator, data, document, subprocess. edge.kind is one of: request, response, async_event, data_flow, dependency, network, generic. WORKED EXAMPLE — a user hitting an API in a VPC that talks to Postgres: { "title": "Web API", "domain": "cloud_architecture", "graph": { "groups": [{ "id": "g_vpc", "label": "VPC", "type": "vpc" }], "nodes": [ { "id": "n_user", "label": "User", "kind": { "catalog": "generic", "type": "user" } }, { "id": "n_api", "label": "API", "kind": { "catalog": "aws", "type": "api_gateway" }, "parentId": "g_vpc" }, { "id": "n_db", "label": "Postgres", "kind": { "catalog": "aws", "type": "rds" }, "parentId": "g_vpc" } ], "edges": [ { "id": "e1", "source": "n_user", "target": "n_api", "kind": "request" }, { "id": "e2", "source": "n_api", "target": "n_db", "kind": "data_flow" } ] } } Returns { diagramId, url, svg, mermaid, version }. Give the user the url — opening it shows the same diagram on an editable canvas (anonymous; it's theirs to claim by signing in). To change the diagram afterwards, use get_diagram then edit_diagram.
Parameters3
| title | string | required | A short title for the diagram. |
| graph | object | required | |
| domain | string | optional | Optional domain hint (default: generic). |
Raw schema
{
"type": "object",
"properties": {
"title": {
"type": "string",
"minLength": 1,
"description": "A short title for the diagram."
},
"graph": {
"type": "object",
"properties": {
"nodes": {
"description": "The nodes (services, databases, users, ...).",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Stable snake_case id you assign, e.g. n_api. Referenced by edges."
},
"label": {
"type": "string",
"description": "Human label shown on the node, e.g. 'API Gateway'."
},
"kind": {
"type": "object",
"properties": {
"catalog": {
"type": "string",
"enum": [
"aws",
"gcp",
"azure",
"k8s",
"saas",
"generic"
]
},
"type": {
"type": "string",
"minLength": 1,
"description": "Catalog-specific type, e.g. api_gateway, rds, redis, service."
}
},
"required": [
"catalog",
"type"
],
"additionalProperties": false
},
"parentId": {
"description": "id of the group this node lives in (a VPC, cluster, ...).",
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"label",
"kind"
],
"additionalProperties": false
}
},
"groups": {
"description": "Containers that nodes live in (VPCs, clusters, ...).",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Stable snake_case id you assign, e.g. g_vpc."
},
"label": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"vpc",
"subnet",
"availability_zone",
"region",
"cluster",
"trust_boundary",
"logical"
]
},
"parentId": {
"description": "id of the parent group, for nested containers.",
"type": "string",
"minLength": 1
},
"style": {
"type": "object",
"properties": {
"color": {
"type": "string"
},
"dashed": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"required": [
"id",
"label",
"type"
],
"additionalProperties": false
}
},
"edges": {
"description": "Directed connections between node ids.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"source": {
"type": "string",
"minLength": 1,
"description": "id of the source node."
},
"target": {
"type": "string",
"minLength": 1,
"description": "id of the target node."
},
"kind": {
"type": "string",
"enum": [
"request",
"response",
"async_event",
"data_flow",
"dependency",
"network",
"generic"
]
},
"label": {
"type": "string"
},
"directed": {
"type": "boolean"
}
},
"required": [
"id",
"source",
"target",
"kind"
],
"additionalProperties": false
}
}
},
"additionalProperties": false
},
"domain": {
"description": "Optional domain hint (default: generic).",
"type": "string",
"enum": [
"cloud_architecture",
"system_design",
"sequence",
"flow",
"generic"
]
}
},
"required": [
"title",
"graph"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}