convert_mermaid_to_image
Convert Mermaid diagram code into PNG, JPG, SVG, or PDF images with customizable themes, dimensions, and background colors.
Instructions
将 Mermaid 图表代码转换为多种格式的图像(PNG、JPG、PDF、SVG)。
参数:
mermaid_code: 要转换的 Mermaid 图表语法代码
output_format: 输出格式 - png、jpg、svg 或 pdf(默认:png)
theme: 视觉主题 - default、dark、neutral 或 forest(默认:default)
background_color: 背景颜色,十六进制代码(如 FF0000)或带 ! 前缀的命名颜色(如 !white)
width: 图像宽度(像素,可选)
height: 图像高度(像素,可选)
返回:
包含转换后图像数据和元数据的字典
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": {
"mermaid_code": "<mermaid_code>"
},
"name": "convert_mermaid_to_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mermaid_code | Yes | ||
| output_format | No | png | |
| theme | No | default | |
| background_color | No | ||
| width | No | ||
| height | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |