serialize_current_mindmap_to_markdown
Convert your current mind map to Markdown format with options for notes inclusion, detail levels, and text-only export.
Instructions
Serializes the currently loaded mindmap to Markdown format.
Args:
include_notes (bool): If True, include notes in the serialization. Defaults to True.
mode (str): Detail level ('full', 'content', 'text'). Defaults to 'content'.
turbo_mode (bool): Enable turbo mode (text only). Defaults to False.
Returns:
Union[str, Dict[str, str]]: Markdown formatted string or error dictionary.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| include_notes | No | ||
| mode | No | content | |
| turbo_mode | No |
Implementation Reference
- mindm_mcp/server.py:308-332 (handler)The handler function decorated with @mcp.tool(), which registers the tool and implements the core logic by calling the _serialize_markdown helper and handling errors.@mcp.tool() async def serialize_current_mindmap_to_markdown( include_notes: bool = True, mode: str = 'content', turbo_mode: bool = False ) -> Union[str, Dict[str, str]]: """ Serializes the currently loaded mindmap to Markdown format. Args: include_notes (bool): If True, include notes in the serialization. Defaults to True. mode (str): Detail level ('full', 'content', 'text'). Defaults to 'content'. turbo_mode (bool): Enable turbo mode (text only). Defaults to False. Returns: Union[str, Dict[str, str]]: Markdown formatted string or error dictionary. """ try: print(f"Serializing current mindmap to Markdown.", file=sys.stderr) text = _serialize_markdown(include_notes=include_notes, mode=mode, turbo_mode=turbo_mode) print("Serialization to Markdown successful.", file=sys.stderr) return text except Exception as e: print(f"ERROR during serialization to Markdown: {e}", file=sys.stderr) return {"error": "Serialization Error", "message": f"Failed to serialize to Markdown: {e}"}
- mindm_mcp/server.py:147-152 (helper)Supporting helper function that retrieves the current mindmap document and serializes it to markdown using the external serialization module.def _serialize_markdown(include_notes=True, mode='content', turbo_mode=False): document = _get_document_instance(turbo_mode=turbo_mode) if document.get_mindmap(mode=mode): markdown = serialization.serialize_mindmap_markdown(document.mindmap, include_notes=include_notes) return markdown return None