Skip to main content
Glama

list_servers

List all configured servers in the OpenAaaS scientific agent network to manage agent connections.

Instructions

列出所有已配置的服务器

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler for list_servers. Lists all configured servers showing default marker and registration status.
    def list_servers() -> str:
        """列出所有已配置的服务器"""
        config = load_config()
        servers = config.get("servers", {})
        default_server = config.get("default_server", "default")
    
        if not servers:
            return "尚未配置任何服务器"
    
        lines = [f"已配置 {len(servers)} 个服务器:"]
        for alias, sc in servers.items():
            is_default = alias == default_server
            has_key = bool(sc.get("api_key"))
            marker = "★ " if is_default else "  "
            reg = " (已注册)" if has_key else " (未注册)"
            lines.append(f"{marker}{alias}: {sc.get('server_url', 'N/A')}{reg}")
    
        return "\n".join(lines)
  • Registration function that registers all MCP tools via @mcp.tool() decorator, including list_servers at line 1023.
    def register_tools(mcp: FastMCP) -> None:
  • Standalone list_servers function for Kimi plugin. Returns structured data with server list, total count, and default server. Used by local/desktop client.
    def list_servers():
        """列出所有已配置的服务器"""
        config = load_config()
        servers = config.get("servers", {})
        default_name = config.get("default_server", "default")
    
        server_list = []
        for name, conf in servers.items():
            server_list.append({
                "name": name,
                "server_url": conf.get("server_url", ""),
                "has_api_key": bool(conf.get("api_key", "")),
                "client_id": conf.get("client_id", ""),
                "is_default": name == default_name
            })
    
        return {
            "content": f"共 {len(server_list)} 个服务器配置,当前默认: {default_name}",
            "data": {
                "total": len(server_list),
                "default_server": default_name,
                "servers": server_list
            }
        }
Behavior2/5

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

No annotations provided. Description only states listing servers without any behavioral context (e.g., read-only, caching, security).

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?

Description is one short, clear sentence with no unnecessary words. Front-loaded with action and resource.

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?

With zero parameters and output schema provided, description covers the core functionality. Could mention scope (e.g., default server) but output schema likely fills gaps.

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?

No parameters exist, so description does not need to add parameter info. Baseline score of 4 applies.

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?

Description clearly states action (list) and resource (configured servers). Differentiates from sibling tools like remove_server or set_default_server.

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 guidance on when to use vs alternatives. However, the tool name and context from siblings imply it is the read operation for 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

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/Wolido/OpenAaaS'

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