Skip to main content
Glama

server_fleet

Read-onlyIdempotent

Monitor fleet-wide health and security posture across all registered servers, displaying status, audit scores, and SSH response times for comprehensive oversight.

Instructions

Get fleet-wide health and security posture for all registered servers. Returns server name, IP, provider, health status (ONLINE/DEGRADED/OFFLINE), cached audit score, and SSH response time. Use sort parameter to order results. For per-server cloud status or available server sizes, use server_info instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sortNoSort field: score (descending), name (A-Z), provider (A-Z). Default: name.name

Implementation Reference

  • The handler function that executes the server_fleet tool, managing retrieval and processing of server data.
    export async function handleServerFleet(params: {
      sort?: "score" | "name" | "provider";
    }): Promise<McpResponse> {
      try {
        const servers = getServers();
        if (servers.length === 0) {
          return mcpError("No servers found", undefined, [
            { command: "kastell add", reason: "Add a server first" },
          ]);
        }
    
        const rows = await runFleet({ json: true, sort: params.sort ?? "name" });
    
        return mcpSuccess({ servers: rows.length, rows });
      } catch (error: unknown) {
        return mcpError(getErrorMessage(error));
      }
    }
  • The schema definition for the input parameters of the server_fleet tool.
    export const serverFleetSchema = {
      sort: z
        .enum(["score", "name", "provider"])
        .optional()
        .default("name")
        .describe("Sort field: score (descending), name (A-Z), provider (A-Z). Default: name."),
    };
  • The registration of the server_fleet tool within the MCP server setup.
    server.registerTool("server_fleet", {
      description:
        "Get fleet-wide health and security posture for all registered servers. Returns server name, IP, provider, health status (ONLINE/DEGRADED/OFFLINE), cached audit score, and SSH response time. Use sort parameter to order results. For per-server cloud status or available server sizes, use server_info instead.",
      inputSchema: serverFleetSchema,
      annotations: {
        title: "Fleet Visibility",
        readOnlyHint: true,
        destructiveHint: false,
        idempotentHint: true,
        openWorldHint: true,
      },
    }, async (params) => {
      return handleServerFleet(params);
    });
Behavior4/5

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

While annotations cover the safety profile (readOnly, non-destructive, idempotent), the description adds crucial return value documentation ('Returns server name, IP... SSH response time') and behavioral context ('cached audit score' indicating data staleness). The only gap is lack of pagination or rate limit discussion.

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?

Four well-structured sentences: purpose first, return values second, parameter usage third, and sibling differentiation fourth. Every sentence earns its place with zero redundancy or filler.

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 lack of output schema, the description admirably documents return fields including enum values (ONLINE/DEGRADED/OFFLINE). Combined with rich annotations and a simple 1-parameter schema with complete coverage, no further elaboration is needed.

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

Parameters3/5

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

With 100% schema coverage, the structured field documentation already explains the sort parameter fully ('Sort field: score (descending)...'). The description merely notes 'Use sort parameter to order results' without adding syntax or semantic value beyond the schema, warranting the baseline score of 3.

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 uses a specific verb+resource pattern ('Get fleet-wide health and security posture for all registered servers') and explicitly distinguishes from the sibling tool server_info by stating when to use that alternative instead ('For per-server cloud status... use server_info').

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?

Explicitly states when NOT to use this tool and names the alternative: 'For per-server cloud status or available server sizes, use server_info instead.' This clearly delineates the scope boundary between fleet-wide aggregation and per-server detail.

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/kastelldev/kastell'

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