Skip to main content
Glama
robertZaufall

MindManager MCP Server

get_selection

Retrieve currently selected topics from MindManager mind maps with configurable detail levels for integration and export workflows.

Instructions

Retrieves the currently selected topics in MindManager.

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

Returns:
    Union[List[Dict[str, Any]], Dict[str, str]]: List of serialized selected topics or error dictionary.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNofull
turbo_modeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The primary MCP tool handler for 'get_selection'. It invokes the internal _get_selection helper, serializes the result using _serialize_result, and handles exceptions with _handle_mindmanager_error. The decorator @mcp.tool() registers it as an MCP tool. The function signature and docstring define the input schema.
    @mcp.tool()
    async def get_selection(
        mode: str = 'full',
        turbo_mode: bool = False
    ) -> Union[List[Dict[str, Any]], Dict[str, str]]:
        """
        Retrieves the currently selected topics in MindManager.
    
        Args:
            mode (str): Detail level ('full', 'content', 'text'). Defaults to 'full'.
            turbo_mode (bool): Enable turbo mode (text only). Defaults to False.
    
        Returns:
            Union[List[Dict[str, Any]], Dict[str, str]]: List of serialized selected topics or error dictionary.
        """
        try:
            print(f"Calling get_selection(mode={mode}, turbo_mode={turbo_mode})", file=sys.stderr)
            selection = _get_selection(mode=mode, turbo_mode=turbo_mode)
            print("get_selection successful, returning serialized selection.", file=sys.stderr)
            return _serialize_result(selection)
        except Exception as e:
            return _handle_mindmanager_error("get_selection", e)
  • Helper function containing the core logic for fetching the selection: creates a MindmapDocument instance and calls its get_selection() method after ensuring the mindmap is loaded.
    def _get_selection(mode='content', turbo_mode=False):
        document = _get_document_instance(turbo_mode=turbo_mode)
        if document.get_mindmap(mode=mode):
            selection = document.get_selection()
            return selection
        return None
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the return type (list of serialized topics or error dictionary) and implies read-only behavior through 'Retrieves', but lacks details on permissions, error conditions, or side effects. This is adequate for a read operation but misses context like what happens if nothing is selected.

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

Conciseness4/5

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

The description is well-structured and appropriately sized, with a clear purpose statement followed by Args and Returns sections. Every sentence adds value, though it could be slightly more concise by integrating the purpose with parameter explanations.

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

Completeness4/5

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

Given the tool's moderate complexity (2 parameters, read-only operation) and the presence of an output schema (which covers return values), the description is reasonably complete. It explains parameters thoroughly and states the return type, though it could benefit from more behavioral context (e.g., error scenarios).

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

Parameters5/5

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

The description adds significant value beyond the input schema, which has 0% description coverage. It explains the meaning of 'mode' with detail levels ('full', 'content', 'text') and clarifies that 'turbo_mode' enables text-only output, providing essential context not present in the schema's generic titles ('Mode', 'Turbo Mode').

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 tool's purpose with a specific verb ('Retrieves') and resource ('currently selected topics in MindManager'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_mindmap' or 'serialize_current_mindmap_to_json', which might also retrieve MindManager data but with different scopes or formats.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., requires an open MindManager document), exclusions, or compare it to sibling tools like 'get_mindmap' or serialization tools, leaving the agent to infer usage context from the tool name alone.

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