UML · Capability
Kroki Diagram API — Diagrams
Kroki Diagram API — Diagrams. 2 operations. Lead operation: Post Diagram for Rendering. Self-contained Naftiko capability covering one Uml business surface.
What You Can Do
POST
Postdiagram
— Post Diagram for Rendering
/v1/{diagram-type}/{output-format}
GET
Getdiagramget
— Get Diagram via GET
/v1/{diagram-type}/{output-format}/{encoded-diagram}
MCP Tools
post-diagram-rendering
Post Diagram for Rendering
get-diagram-get
Get Diagram via GET
read-only
idempotent
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: Kroki Diagram API — Diagrams
description: 'Kroki Diagram API — Diagrams. 2 operations. Lead operation: Post Diagram for Rendering. Self-contained Naftiko
capability covering one Uml business surface.'
tags:
- Uml
- Diagrams
created: '2026-05-19'
modified: '2026-05-19'
binds:
- namespace: env
keys:
UML_API_KEY: UML_API_KEY
capability:
consumes:
- type: http
namespace: kroki-diagrams
baseUri: https://kroki.io
description: Kroki Diagram API — Diagrams business capability. Self-contained, no shared references.
resources:
- name: diagram_type-output_format
path: /{diagram_type}/{output_format}
operations:
- name: postdiagram
method: POST
description: Post Diagram for Rendering
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: diagram_type
in: path
type: string
description: 'The type of diagram to generate. Supported types: plantuml, mermaid, graphviz, blockdiag, seqdiag,
actdiag, nwdiag, bpmn, c4plantuml, d2, ditaa, erd, excalidraw'
required: true
- name: output_format
in: path
type: string
description: Output format for the diagram (svg, png, jpeg, pdf)
required: true
- name: body
in: body
type: object
description: Request body (JSON).
required: true
- name: diagram_type-output_format-encoded_diagram
path: /{diagram_type}/{output_format}/{encoded_diagram}
operations:
- name: getdiagramget
method: GET
description: Get Diagram via GET
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: diagram_type
in: path
type: string
description: 'The type of diagram to generate. Supported types: plantuml, mermaid, graphviz, blockdiag, seqdiag,
actdiag, nwdiag, packetdiag, rackdiag, bpmn, bytefield, c4pla'
required: true
- name: output_format
in: path
type: string
description: 'Output format for the diagram. Supported formats: svg, png, jpeg, pdf (availability depends on diagram
type)'
required: true
- name: encoded_diagram
in: path
type: string
description: Deflate + base64url encoded diagram source text
required: true
exposes:
- type: rest
namespace: kroki-diagrams-rest
port: 8080
description: REST adapter for Kroki Diagram API — Diagrams. One Spectral-compliant resource per consumed operation, prefixed
with /v1.
resources:
- path: /v1/{diagram-type}/{output-format}
name: diagram-type-output-format
description: REST surface for diagram_type-output_format.
operations:
- method: POST
name: postdiagram
description: Post Diagram for Rendering
call: kroki-diagrams.postdiagram
with:
diagram_type: rest.diagram_type
output_format: rest.output_format
body: rest.body
outputParameters:
- type: object
mapping: $.
- path: /v1/{diagram-type}/{output-format}/{encoded-diagram}
name: diagram-type-output-format-encoded-diagram
description: REST surface for diagram_type-output_format-encoded_diagram.
operations:
- method: GET
name: getdiagramget
description: Get Diagram via GET
call: kroki-diagrams.getdiagramget
with:
diagram_type: rest.diagram_type
output_format: rest.output_format
encoded_diagram: rest.encoded_diagram
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: kroki-diagrams-mcp
port: 9090
transport: http
description: MCP adapter for Kroki Diagram API — Diagrams. One tool per consumed operation, routed inline through this
capability's consumes block.
tools:
- name: post-diagram-rendering
description: Post Diagram for Rendering
hints:
readOnly: false
destructive: false
idempotent: false
call: kroki-diagrams.postdiagram
with:
diagram_type: tools.diagram_type
output_format: tools.output_format
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: get-diagram-get
description: Get Diagram via GET
hints:
readOnly: true
destructive: false
idempotent: true
call: kroki-diagrams.getdiagramget
with:
diagram_type: tools.diagram_type
output_format: tools.output_format
encoded_diagram: tools.encoded_diagram
outputParameters:
- type: object
mapping: $.