Skip to main content
Glama

list_servers

Fetch a list of all servers in your Ploi account for centralized control and monitoring.

Instructions

List all servers in your Ploi account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the list_servers tool. Calls client.listServers() and returns the JSON response.
    server.tool(
      "list_servers",
      "List all servers in your Ploi account",
      {},
      async () => {
        const servers = await client.listServers();
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify(servers, null, 2),
            },
          ],
        };
      }
    );
  • Empty schema/input validation (no parameters required for list_servers).
    {},
  • Registration function that registers the list_servers tool (and other server tools) on the MCP server.
    export function registerServerTools(server: McpServer, client: PloiClient) {
      server.tool(
        "list_servers",
        "List all servers in your Ploi account",
        {},
        async () => {
          const servers = await client.listServers();
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(servers, null, 2),
              },
            ],
          };
        }
      );
    
      server.tool(
        "get_server",
        "Get details of a specific server",
        {
          server_id: z.coerce.number().describe("The ID of the server"),
        },
        async ({ server_id }) => {
          const serverInfo = await client.getServer(server_id);
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(serverInfo, null, 2),
              },
            ],
          };
        }
      );
    
      server.tool(
        "restart_server",
        "Restart a server",
        {
          server_id: z.coerce.number().describe("The ID of the server to restart"),
        },
        async ({ server_id }) => {
          await client.restartServer(server_id);
          return {
            content: [
              {
                type: "text" as const,
                text: `Server ${server_id} restart initiated successfully`,
              },
            ],
          };
        }
      );
    
      server.tool(
        "get_server_logs",
        "Get recent server activity logs",
        {
          server_id: z.coerce.number().describe("The ID of the server"),
        },
        async ({ server_id }) => {
          try {
            const logs = await client.getServerLogs(server_id);
            return {
              content: [
                {
                  type: "text" as const,
                  text: String(logs || "No logs available"),
                },
              ],
            };
          } catch (error) {
            return {
              content: [
                {
                  type: "text" as const,
                  text: `Error fetching server logs: ${error instanceof Error ? error.message : String(error)}`,
                },
              ],
            };
          }
        }
      );
    }
  • Helper method on PloiClient that makes the API call to fetch servers from Ploi API.
    async listServers(): Promise<Server[]> {
      const response = await this.request<PaginatedResponse<Server>>(
        "GET",
        "/servers"
      );
      return response.data;
    }
Behavior2/5

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

No annotations are provided, so the description bears full burden. It only states the action, with no disclosure of behavioral traits such as pagination, authentication needs, or scope. This is insufficient for an agent to fully understand the tool's behavior.

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, efficient sentence with no redundant information. Every word adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no parameters and no output schema, the description lacks details on output format (e.g., server names, IDs) and does not address potential pagination or filtering. For a list tool, more context on the response would be helpful.

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 input schema has 0 parameters with 100% coverage, so baseline is 4. The description adds no parameter info, but none is needed given zero 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 'List all servers in your Ploi account' clearly states the action (list) and resource (servers), and distinguishes from siblings like 'get_server' which retrieves a single 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?

The description implies a listing purpose, but provides no explicit guidance on when to use this vs. other tools like 'get_server', 'restart_server', etc. No when-not or exclusion statements.

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/sudanese/ploi-mcp'

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