convert_mermaid_to_image
Convert Mermaid diagram code into images (PNG, JPG, PDF, SVG). Customize output format, theme, background color, and dimensions for tailored visual representations.
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: 图像高度(像素,可选)
返回:
包含转换后图像数据和元数据的字典
Input Schema
Name | Required | Description | Default |
---|---|---|---|
background_color | No | ||
height | No | ||
mermaid_code | Yes | ||
output_format | No | png | |
theme | No | default | |
width | No |
Input Schema (JSON Schema)
{
"properties": {
"background_color": {
"default": "",
"title": "Background Color",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Height"
},
"mermaid_code": {
"title": "Mermaid Code",
"type": "string"
},
"output_format": {
"default": "png",
"title": "Output Format",
"type": "string"
},
"theme": {
"default": "default",
"title": "Theme",
"type": "string"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Width"
}
},
"required": [
"mermaid_code"
],
"title": "convert_mermaid_to_imageArguments",
"type": "object"
}