Skip to main content
Glama

magg_list_servers

Retrieve a list of all configured servers with their runtime status (mounted or not) to monitor and manage MCP server configurations effectively.

Instructions

List all configured servers.

Unlike the /servers/all resource, this tool also provides the runtime status of each server (mounted or not).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorsNo
outputNo

Implementation Reference

  • The main execution handler for the 'magg_list_servers' tool. It iterates over configured servers, constructs status information (including mounted status), and returns a success response with the list or an error.
    async def list_servers(self) -> MaggResponse:
        """List all configured servers.
    
        Unlike the /servers/all resource, this tool also provides the runtime
        status of each server (mounted or not).
        """
        try:
            config = self.config
    
            servers = []
            for name, server in config.servers.items():
                server_data = {
                    "name": name,
                    "source": server.source,
                    "prefix": server.prefix,
                    "enabled": server.enabled,
                    "mounted": name in self.server_manager.mounted_servers,
                }
    
                if server.command:
                    server_data["command"] = f"{server.command} {' '.join(server.args) if server.args else ''}".strip()
                if server.uri:
                    server_data["uri"] = server.uri
                if server.cwd:
                    server_data["cwd"] = str(server.cwd)
                if server.notes:
                    server_data["notes"] = server.notes
    
                servers.append(server_data)
    
            return MaggResponse.success(servers)
    
        except Exception as e:
            return MaggResponse.error(f"Failed to list servers: {str(e)}")
  • The tool registration block in `_register_tools` method. It defines the list of Magg tools including 'magg_list_servers' (line ~51) and applies the FastMCP `tool` decorator in a loop to register `self.list_servers` with the constructed name `f'{self_prefix_}list_servers'` where `self_prefix_` is 'magg_'.
    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))
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the behavioral trait of providing runtime status (mounted or not), which adds value beyond basic listing. However, it doesn't mention other important behaviors like whether this is a read-only operation, potential rate limits, or authentication requirements, leaving gaps 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 two sentences with zero waste, front-loading the core purpose and efficiently adding the differentiating feature. Every sentence earns its place by providing essential information without redundancy.

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 complexity (simple list operation with 0 parameters), no annotations, and the presence of an output schema, the description is mostly complete. It explains what the tool does and how it differs from alternatives, but could benefit from mentioning behavioral aspects like safety or performance, though the output schema reduces the need for return value details.

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 inputs. The description doesn't need to add parameter information, and it doesn't introduce any confusion. The baseline for 0 parameters is 4, as it appropriately avoids unnecessary parameter details.

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 verb ('List') and resource ('all configured servers'), providing a specific action. It distinguishes from a sibling resource ('/servers/all') by noting the additional runtime status information, making it distinct from similar tools like 'magg_search_servers'.

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

Usage Guidelines5/5

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

The description explicitly provides when to use this tool ('Unlike the /servers/all resource, this tool also provides the runtime status'), offering a clear alternative comparison. This helps the agent choose between this tool and other server-listing options, though it doesn't mention other siblings like 'magg_search_servers'.

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