Skip to main content
Glama
robertZaufall

MindManager MCP Server

get_mindmap

Retrieve mind map structures from MindManager to analyze content, extract text, or export to formats like Mermaid, Markdown, and JSON.

Instructions

Retrieves the current mind map structure from MindManager.

Args:
    mode (str): Detail level ('full', 'content', 'text'). Defaults to 'full'.
    turbo_mode (bool): Enable turbo mode (text only). Defaults to False.

Returns:
    Dict[str, Any]: Serialized mind map structure or error dictionary.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNofull
turbo_modeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The @mcp.tool()-decorated async function that implements the core logic of the 'get_mindmap' MCP tool. It fetches the mindmap from MindManager using helper functions, serializes it, and handles errors.
    @mcp.tool()
    async def get_mindmap(
        mode: str = 'full',
        turbo_mode: bool = False
    ) -> Dict[str, Any]:
        """
        Retrieves the current mind map structure from MindManager.
    
        Args:
            mode (str): Detail level ('full', 'content', 'text'). Defaults to 'full'.
            turbo_mode (bool): Enable turbo mode (text only). Defaults to False.
    
        Returns:
            Dict[str, Any]: Serialized mind map structure or error dictionary.
        """
        try:
            print(f"Calling get_mindmap(mode={mode}, turbo_mode={turbo_mode})", file=sys.stderr)
            mindmap = _get_mindmap_content(mode=mode, turbo_mode=turbo_mode)
            print("get_mindmap successful, returning serialized mindmap.", file=sys.stderr)
            return _serialize_result(mindmap)
        except Exception as e:
            return _handle_mindmanager_error("get_mindmap", e)
  • Helper function that creates a MindmapDocument instance and retrieves the mindmap content by calling document.get_mindmap().
    def _get_mindmap_content(mode='content', turbo_mode=False):
        document = _get_document_instance(turbo_mode=turbo_mode)
        if document.get_mindmap(mode=mode):
            return document.mindmap
        return None
  • Helper function that instantiates the MindmapDocument required for interacting with MindManager.
    def _get_document_instance(
            charttype: str = 'auto', 
            turbo_mode: bool = False, 
            inline_editing_mode: bool = False, 
            mermaid_mode: bool = True, 
            macos_access: str = MACOS_ACCESS_METHOD
        ) -> MindmapDocument:
        document = MindmapDocument(
            charttype=charttype, 
            turbo_mode=turbo_mode, 
            inline_editing_mode=inline_editing_mode, 
            mermaid_mode=mermaid_mode, 
            macos_access=macos_access
        )
        return document
  • Helper function used to serialize the mindmap data into JSON-compatible format for the MCP response.
    def _serialize_result(data: Any) -> Union[Dict, List, str, int, float, bool, None]:
        """Helper to serialize results, especially MindmapTopic structures."""
        if isinstance(data, (MindmapTopic, list)):
             # Use simple serialization for MCP results unless full detail is needed
            return serialization.serialize_object_simple(data)
        elif isinstance(data, tuple):
            # Tuples are often JSON serializable directly if elements are
            return list(data) # Convert to list for guaranteed JSON compatibility
        elif isinstance(data, (dict, str, int, float, bool, type(None))):
            return data
        else:
            # Attempt string conversion for unknown types
            print(f"Warning: Serializing unknown type {type(data)} as string.", file=sys.stderr)
            return str(data)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden but provides minimal behavioral insight. It mentions retrieval and returns a structure or error, but lacks details on permissions, rate limits, or side effects. This is inadequate for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections for Args and Returns, using bullet-like formatting. Every sentence adds value, and it's front-loaded with the core purpose, making it efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 2 parameters with 0% schema coverage and an output schema exists, the description partially compensates by explaining parameters and return type. However, for a retrieval tool with no annotations, it should provide more behavioral context (e.g., read-only nature, potential errors) to be fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains the two parameters ('mode' with detail levels and 'turbo_mode' as text-only), adding meaning beyond the schema. However, it doesn't fully detail how these parameters affect the output, leaving some gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Retrieves') and resource ('current mind map structure from MindManager'), making the purpose unambiguous. It distinguishes from siblings like 'serialize_current_mindmap_to_json' by focusing on retrieval rather than serialization, though it doesn't explicitly compare to all siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'serialize_current_mindmap_to_json' or 'get_selection'. The description only states what it does without context for selection among similar tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/robertZaufall/mindm-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server