Skip to main content
Glama

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

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

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