Skip to main content
Glama

list_running_servers

Lists all running local LLM servers with their port numbers and model names. Monitor active instances to manage server lifecycle.

Instructions

現在バックグラウンドで稼働しているすべてのローカルLLMサーバー(ポート番号とモデル名)の一覧を取得します。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler logic for 'list_running_servers': calls process_manager.get_running_servers() and returns the result as JSON, or 'No running servers found.' if empty.
    elif name == "list_running_servers":
        servers = process_manager.get_running_servers()
        if not servers:
            return [types.TextContent(type="text", text="No running servers found.")]
        return [types.TextContent(type="text", text=json.dumps(servers, indent=2))]
  • The tool schema definition for 'list_running_servers' in the tool list, with no required input parameters.
    types.Tool(
        name="list_running_servers",
        description="現在バックグラウンドで稼働しているすべてのローカルLLMサーバー(ポート番号とモデル名)の一覧を取得します。",
        inputSchema={
            "type": "object",
            "properties": {},
        },
    ),
  • The tool is registered via @server.list_tools() decorator on the handle_list_tools function which returns the list of tool definitions.
    @server.list_tools()
  • The helper method MlxProcessManager.get_running_servers() which loads state, filters alive processes using psutil.pid_exists(), cleans up dead ones, and returns the active server dictionary.
    def get_running_servers(self) -> dict:
        """現在稼働中のサーバー一覧を取得し、死んだプロセスをクリーンアップする"""
        state = self._load_state()
        active_servers = {}
        changed = False
    
        for port_str, info in list(state.items()):
            pid = info["pid"]
            if psutil.pid_exists(pid):
                active_servers[port_str] = info
            else:
                del state[port_str]
                changed = True
                
        if changed:
            self._save_state(state)
            
        return active_servers
Behavior3/5

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

With no annotations, the description carries the full burden. It confirms the tool is read-only but does not disclose potential behavioral traits like empty list behavior, authentication needs, or performance aspects.

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 a single sentence that is concise, front-loaded, and contains no unnecessary information. Every word adds value.

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 simplicity and lack of output schema, the description provides adequate context: what is returned (port and model name). It could mention handling of no servers running, but overall it is complete.

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?

There are no parameters, so the description does not need to add parameter information. A baseline of 4 is appropriate as the description is clear about the lack of parameters.

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 specifies the action (retrieve list), resource (running local LLM servers), and output details (port numbers and model names). It distinguishes itself from sibling tools like launch_llm_server or shutdown_llm_server by focusing on listing.

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

Usage Guidelines3/5

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

No explicit when-to-use or when-not-to-use guidance is provided. The use case is implied by the tool name and description, but no alternatives or exclusions are mentioned.

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/globalpocket/mcp-mlx-launcher'

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