Skip to main content
Glama

list_sites

List all sites on a server by providing the server ID.

Instructions

List all sites on a server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
server_idYesThe ID of the server

Implementation Reference

  • The registerSiteTools function registers 'list_sites' and all other site tools on the MCP server.
    export function registerSiteTools(server: McpServer, client: PloiClient) {
      server.tool(
        "list_sites",
        "List all sites on a server",
        {
          server_id: z.coerce.number().describe("The ID of the server"),
        },
        async ({ server_id }) => {
          const sites = await client.listSites(server_id);
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(sites, null, 2),
              },
            ],
          };
        }
      );
  • The handler for the 'list_sites' tool: calls client.listSites(server_id) and returns the sites as JSON.
    async ({ server_id }) => {
      const sites = await client.listSites(server_id);
      return {
        content: [
          {
            type: "text" as const,
            text: JSON.stringify(sites, null, 2),
          },
        ],
      };
    }
  • Input schema for 'list_sites' tool: requires a server_id (coerced to number).
    {
      server_id: z.coerce.number().describe("The ID of the server"),
    },
  • The client.listSites method that makes the actual HTTP GET request to /servers/{serverId}/sites and returns paginated site data.
    async listSites(serverId: number): Promise<Site[]> {
      const response = await this.request<PaginatedResponse<Site>>(
        "GET",
        `/servers/${serverId}/sites`
      );
      return response.data;
    }
Behavior3/5

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

With no annotations, the description must convey behavior. It states it's a read operation listing all sites, but does not disclose what happens for invalid server_id, pagination, or any side effects. The behavior is basic and matches the name.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that is concise and front-loaded. It effectively communicates the core purpose without wasted words, though it could be slightly more structured.

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

Completeness3/5

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

Given the tool is simple with one parameter and no output schema, the description is minimally adequate. It lacks a hint about the return format (e.g., list of site objects), which would improve completeness.

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?

The input schema has 100% description coverage for the single parameter server_id, so the description adds no extra meaning beyond 'The ID of the server'. The baseline is 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 'List all sites on a server' clearly states the action (list) and the resource (sites), with the scope constrained to a server. It effectively distinguishes from siblings like get_site (single site) and deploy_site (write operation).

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 does not provide explicit guidance on when to use this tool versus alternatives such as find_site_by_domain or get_site. It implies usage for listing all sites but lacks context or exclusions.

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