Skip to main content
Glama

magg_reload_config

Reload configurations from disk, detect changes, and apply updates to managed servers. Use this tool to dynamically add, remove, or modify server configurations, ensuring alignment with the latest setup.

Instructions

Reload configuration from disk and apply changes.

This will:

  1. Re-read the configuration file

  2. Detect changes (added/removed/modified servers)

  3. Apply changes by mounting/unmounting servers as needed

Note: This operation may briefly interrupt service for affected servers. Config reload can also be triggered via SIGHUP signal on Unix systems.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorsNo
outputNo

Implementation Reference

  • Registers the 'magg_reload_config' tool (line 59) as part of the programmatic tool registration in _register_tools method. The tool name is constructed as f'{self_prefix_}reload_config' where self_prefix_ is typically 'magg_'.
    def _register_tools(self):
        """Register all Magg management tools programmatically.
        """
        self_prefix_ = self.self_prefix_
    
        tools = [
            (self.add_server, f"{self_prefix_}add_server", None),
            (self.remove_server, f"{self_prefix_}remove_server", None),
            (self.list_servers, f"{self_prefix_}list_servers", None),
            (self.enable_server, f"{self_prefix_}enable_server", None),
            (self.disable_server, f"{self_prefix_}disable_server", None),
            (self.search_servers, f"{self_prefix_}search_servers", None),
            (self.smart_configure, f"{self_prefix_}smart_configure", None),
            (self.analyze_servers, f"{self_prefix_}analyze_servers", None),
            (self.status, f"{self_prefix_}status", None),
            (self.check, f"{self_prefix_}check", None),
            (self.reload_config_tool, f"{self_prefix_}reload_config", None),
            (self.load_kit, f"{self_prefix_}load_kit", None),
            (self.unload_kit, f"{self_prefix_}unload_kit", None),
            (self.list_kits, f"{self_prefix_}list_kits", None),
            (self.kit_info, f"{self_prefix_}kit_info", None),
        ]
    
        def call_tool_wrapper(func):
            @wraps(func)
            async def wrapper(*args, **kwds):
                result = await func(*args, **kwds)
    
                if isinstance(result, MaggResponse):
                    return result.as_json_text_content
    
                return result
    
            return wrapper
    
        for method, tool_name, options in tools:
            self.mcp.tool(name=tool_name, **(options or {}))(call_tool_wrapper(method))
    
        self._register_resources()
        self._register_prompts()
  • The main handler function for the 'magg_reload_config' tool. It performs checks for auto_reload and read_only mode, then delegates to self.reload_config() and returns a formatted MaggResponse.
    async def reload_config_tool(self) -> MaggResponse:
        """Reload configuration from disk and apply changes.
    
        This will:
        1. Re-read the configuration file
        2. Detect changes (added/removed/modified servers)
        3. Apply changes by mounting/unmounting servers as needed
    
        Note: This operation may briefly interrupt service for affected servers.
        Config reload can also be triggered via SIGHUP signal on Unix systems.
        """
        if not self.config.auto_reload:
            return MaggResponse.error(
                "Configuration reload is disabled. Set MAGG_AUTO_RELOAD=true to enable."
            )
    
        if self.config.read_only:
            return MaggResponse.error(
                "Configuration reload is not allowed in read-only mode."
            )
    
        try:
            success = await self.reload_config()
    
            if success:
                return MaggResponse.success({
                    "message": "Configuration reloaded successfully",
                    "config_path": str(self.server_manager.config_manager.config_path),
                    "read_only": self.config.read_only
                })
            else:
                return MaggResponse.error("Configuration reload failed - check logs for details")
    
        except Exception as e:
            logger.exception("Error during config reload")
            return MaggResponse.error(f"Config reload error: {str(e)}")
  • Helper method in ManagedServer (parent of MaggServer) that triggers the ConfigManager's reload_config. Called by the tool handler.
    async def reload_config(self) -> bool:
        """Manually trigger a configuration reload.
    
        Returns:
            True if reload was successful, False otherwise
        """
        if not self._enable_config_reload:
            await self.server_manager.config_manager.setup_config_reload(
                self.server_manager.handle_config_reload
            )
    
        return await self.server_manager.config_manager.reload_config()
  • Defines self_prefix_ used in tool name construction (e.g., 'magg_'). Determines the 'magg_' prefix for 'reload_config'.
    @cached_property
    def self_prefix_(self) -> str:
        """self_prefix with trailing separator if prefix exists.
        """
        prefix = self.self_prefix
        if prefix:
            return f"{prefix}{self.server_manager.prefix_separator}"
        return ""
Behavior5/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 effectively describes key behavioral traits: the multi-step process (re-reading, detecting changes, applying changes), potential service interruption ('may briefly interrupt service'), and the effect on servers (mounting/unmounting). This goes beyond basic functionality to include operational impacts.

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 and front-loaded with the main purpose in the first sentence, followed by a bulleted list of steps and a note with important details. Every sentence adds value—none are redundant or wasteful—making it efficient and easy to scan.

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

Completeness5/5

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

Given the tool's complexity (configuration reloading with service impacts), no annotations, and the presence of an output schema (which handles return values), the description is complete. It covers the purpose, process, behavioral effects, and alternative triggers, providing sufficient context for an agent to understand and invoke the tool correctly without needing additional explanation.

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

Parameters4/5

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

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the lack of inputs. The description adds value by explaining the action's semantics (reloading from disk, applying changes) and context (e.g., triggered via SIGHUP), which compensates for the minimal parameter info, earning a score above the baseline of 3 for high coverage.

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

Purpose5/5

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

The description clearly states the specific action ('Reload configuration from disk and apply changes') and distinguishes it from sibling tools by focusing on configuration reloading rather than server management (e.g., magg_add_server, magg_remove_server) or status checking (e.g., magg_status, magg_check). It uses precise verbs like 're-read,' 'detect changes,' and 'apply changes' to articulate the tool's function.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool: to reload configuration from disk and apply changes, such as after modifying the config file. It mentions an alternative method ('SIGHUP signal on Unix systems') but does not explicitly state when not to use it or compare it to specific sibling tools like magg_smart_configure, which might handle configuration differently.

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

Related 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/sitbon/magg'

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