Function
Tool identifiermindmap_generate.
mindmap_generate converts a Markdown outline into Mermaid mindmap text and, at the same time, renders a standalone SVG image. Headings (# through ######) nest by level, and bullet items nest by two-space indentation. For agent calls both files are saved as conversation artifacts; direct calls write them to the system temporary directory.
The tool is an async function (async def). All generation happens locally and requires neither Node.js nor any external service.
Import path: from veadk.tools.builtin_tools.mindmap_generate import mindmap_generate
Prerequisites
Environment variables:MODEL_AGENT_API_KEY: API key for the agent’s reasoning model (themindmap_generatetool itself needs no extra credentials and accesses no external services)
Usage
examples/tools/mindmap_generate/agent.py
Parameters
Success returns
{"title", "mermaid", "mmd_filename", "svg_filename", "nodes", "artifact_saved", "mmd_path", "svg_path"}; mermaid is the Mermaid mindmap text and nodes is the number of nodes actually created. On failure it returns {"error": ...}.
Notes
- At most 500 nodes (including the root) and a depth of 8 levels are kept; outline lines beyond the caps are ignored, and labels longer than 80 characters are truncated.
- Blank lines and plain text that is neither a heading nor a bullet are ignored; bullets indent by two spaces per level and may use
-,*, or+as the marker. - The SVG is drawn directly by the tool without a Mermaid runtime, so it can be opened on its own in a browser or image viewer; temporary files from direct calls should be cleaned up by the application.