Skip to main content
Glama

list_mcp_servers

List registered MCP servers in obot to retrieve their IDs, names, runtimes, states, and connect URLs for use with Claude.ai.

Instructions

List MCP servers currently registered in obot. Returns id, name, runtime, configured-state, and the connectURL you'd hand to claude.ai.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for list_mcp_servers: calls /api/mcp-servers, maps items to summary fields (id, name, runtime, configured, missingRequiredEnvVars, connectURL), returns JSON text content.
    case "list_mcp_servers": {
      const data = await obotFetch("/api/mcp-servers");
      const summary = (data.items ?? []).map((i: any) => ({
        id: i.id,
        name: i.manifest?.name,
        runtime: i.manifest?.runtime,
        configured: i.configured,
        missingRequiredEnvVars: i.missingRequiredEnvVars ?? [],
        connectURL: i.connectURL,
      }));
      return { content: [{ type: "text", text: JSON.stringify(summary, null, 2) }] };
  • Tool definition with inputSchema: list_mcp_servers takes no arguments (empty properties, additionalProperties: false).
    const tools: Tool[] = [
      {
        name: "list_mcp_servers",
        description:
          "List MCP servers currently registered in obot. Returns id, name, runtime, configured-state, and the connectURL you'd hand to claude.ai.",
        inputSchema: { type: "object", properties: {}, additionalProperties: false },
      },
  • src/index.ts:143-144 (registration)
    Registration via ListToolsRequestSchema handler that returns the tools array (which includes list_mcp_servers).
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools }));
  • The obotFetch helper function used by the handler to make authenticated HTTP requests to the obot API.
    async function obotFetch(path: string, init: RequestInit = {}): Promise<any> {
      const res = await fetch(`${OBOT_URL}${path}`, {
        ...init,
        headers: {
          Authorization: `Bearer ${OBOT_TOKEN}`,
          "Content-Type": "application/json",
          Accept: "application/json",
          ...(init.headers as Record<string, string> | undefined),
        },
      });
      const text = await res.text();
      let body: unknown = text;
      try {
        body = text ? JSON.parse(text) : null;
      } catch {
        // keep raw text
      }
      if (!res.ok) {
        const detail = typeof body === "string" ? body : JSON.stringify(body);
        throw new Error(`obot ${res.status} ${res.statusText} on ${path}: ${detail}`);
      }
      return body;
    }
Behavior3/5

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

No annotations are provided, so the description must compensate. It lists return fields, suggesting a read operation, but does not explicitly state it's non-destructive, mention authentication needs, or describe any side effects. Basic transparency is achieved, but more detail on behavior (e.g., ordering, pagination) is missing.

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, front-loaded sentence that immediately states the purpose and key details. Every word adds value; there is no redundancy or wasted space.

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?

The description lists all return fields, compensating for the lack of an output schema. For a zero-parameter list tool, it provides sufficient context. However, it does not explain field content (e.g., what 'configured-state' means) or any limitations, leaving minor 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?

There are 0 parameters and schema coverage is 100%. The description correctly adds no parameter info, as none are needed. For zero-parameter tools, the baseline score is 4, and this description meets that standard.

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 tool lists MCP servers and specifies the returned fields (id, name, runtime, configured-state, connectURL). It distinguishes from sibling tools like add_npx_mcp, delete_mcp_server, etc., which are for creating, deleting, or retrieving individual servers.

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 implies usage when you need to view registered MCP servers. While it doesn't explicitly list when not to use or name alternatives, the sibling tool names provide context, and the straightforward list operation needs minimal guidance.

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/kiarashedraki/obot-admin-mcp'

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