render
Convert .bpc chart source into SVG, PNG, or HTML. PNG returns as an inline image for immediate visual review, with optional file-saving to disk.
Instructions
Render a .bpc source to SVG (default), PNG, or HTML. With format:"png" the chart comes back as an inline IMAGE you and the user can both see — render, look at the result, fix issues, re-render. Always returns structured frame metadata. When MCP_PUBLIC_URL is set the response includes stateless urls ({png,svg,bpc}). Set modelVisible:false to display the image to the user without spending model image tokens. Pass save:<path> to write the output into MCP_FS_WRITE_DIR instead of returning it inline. Width/height are capped at 1600; PNGs are rasterized at 2× for retina sharpness.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| save | No | Optional output path, always resolved inside MCP_FS_WRITE_DIR (relative paths are joined to it; absolute paths are re-anchored under it). When set, the output is written to disk and omitted from the response. Requires MCP_FS_WRITE_DIR. | |
| scene | No | Zero-based scene index to render, for charts that define scenes. Omit for the base chart (scene 0). | |
| width | No | Output width in pixels (max 1600). PNGs are rasterized at 2x for retina sharpness. | |
| format | No | Output format. "svg" (default) and "html" return text; "png" returns an inline image you and the user can both see. | svg |
| height | No | Output height in pixels (max 1600). | |
| source | Yes | The .bpc chart source to render. | |
| modelVisible | No | When false, the inline PNG is shown to the user but not sent to the model (saves image tokens on bulk renders). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| urls | No | Stateless hosted render URLs (only when MCP_PUBLIC_URL is set). | |
| frame | Yes | Frame metadata extracted from the chart. | |
| savedTo | No | Absolute path the output was written to, when `save` was used. | |
| mimeType | Yes | MIME type of the rendered output. | |
| urlsOmitted | No | Set when URLs were omitted because the source exceeded the URL cap. |