Skip to main content
Glama
RMITBLOG

Parallels RAS MCP Server

by RMITBLOG

Sites

ras_infra_get_sites
Read-onlyIdempotent

Retrieve all configured sites and their status in a Parallels RAS farm to check connectivity, verify configurations, or audit deployment topology.

Instructions

List all sites configured in the RAS farm and their status. Multi-site deployments distribute infrastructure across locations. Use this to check site connectivity, verify site configuration, or audit the farm topology.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool registration for ras_infra_get_sites with schema definition (title, description, annotations, inputSchema) and handler function
    server.registerTool(
      "ras_infra_get_sites",
      {
        title: "Sites",
        description:
          "List all sites configured in the RAS farm and their status. Multi-site " +
          "deployments distribute infrastructure across locations. Use this to check " +
          "site connectivity, verify site configuration, or audit the farm topology.",
        annotations: READ_ONLY_ANNOTATIONS,
        inputSchema: {},
      },
      async () => {
        try {
          const data = await rasClient.get("/api/infrastructure/sites/status");
          return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
        } catch (err) {
          return { content: [{ type: "text" as const, text: sanitiseError(err, "Failed to retrieve sites") }], isError: true };
        }
      }
    );
  • Handler function that executes the tool logic - makes API call to /api/infrastructure/sites/status and formats the response with error handling
    async () => {
      try {
        const data = await rasClient.get("/api/infrastructure/sites/status");
        return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
      } catch (err) {
        return { content: [{ type: "text" as const, text: sanitiseError(err, "Failed to retrieve sites") }], isError: true };
      }
    }
  • RasClient.get() method used by the handler to make authenticated HTTP GET requests to the RAS API with automatic retry on 401 errors
    async get(path: string): Promise<unknown> {
      // Ensure we have a valid session
      if (!this.authToken) {
        await this.login();
      }
    
      const fetchOptions = {
        method: "GET" as const,
        headers: {
          ...this.headers,
          auth_token: this.authToken!,
        },
        signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
      };
    
      let response = await fetch(`${this.baseUrl}${path}`, fetchOptions);
    
      // Token may have expired — re-authenticate once and retry
      if (response.status === 401) {
        await this.login();
        response = await fetch(`${this.baseUrl}${path}`, {
          ...fetchOptions,
          headers: {
            ...this.headers,
            auth_token: this.authToken!,
          },
          signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
        });
      }
    
      if (!response.ok) {
        const body = await response.text();
        throw new Error(
          `RAS API error (HTTP ${response.status}) on ${path}: ${body.substring(0, 300)}`
        );
      }
    
      return response.json();
    }
  • sanitiseError() function used to sanitize error messages by removing auth tokens, passwords, and truncating long responses
    function sanitiseError(err: unknown, context: string): string {
      const raw = err instanceof Error ? err.message : String(err);
      // Remove anything that looks like a token or password value
      let sanitised = raw
        .replace(/auth_token[=:]\s*\S+/gi, "auth_token=[REDACTED]")
        .replace(/password[=:]\s*\S+/gi, "password=[REDACTED]");
      // Truncate excessively long API response bodies
      if (sanitised.length > 500) {
        sanitised = sanitised.substring(0, 500) + "... (truncated)";
      }
      return `${context}: ${sanitised}`;
    }
Behavior4/5

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

Annotations already declare this as read-only, non-destructive, idempotent, and open-world, covering key behavioral traits. The description adds valuable context by mentioning 'multi-site deployments distribute infrastructure across locations,' which helps the agent understand the operational environment. No contradiction with annotations exists.

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 perfectly concise and front-loaded: the first sentence states the core purpose, followed by explanatory context and usage scenarios. Every sentence adds value without redundancy, making it easy for an agent to parse quickly.

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?

Given the tool's simplicity (0 parameters, no output schema) and rich annotations, the description is mostly complete. It covers purpose, context, and usage well. A slight deduction because it doesn't hint at the return format (e.g., list structure or status details), which could help the agent interpret results, though annotations mitigate this gap.

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?

With 0 parameters and 100% schema description coverage, the baseline is 4. The description appropriately doesn't discuss parameters, as none exist, and instead focuses on the tool's purpose and usage, which is efficient and correct.

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 specific action ('List all sites'), resource ('configured in the RAS farm'), and scope ('and their status'), distinguishing it from sibling tools like ras_infra_get_agents or ras_infra_get_gateway_status that focus on other infrastructure components. It explicitly identifies what the tool does without being tautological.

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 provides clear context for when to use this tool ('to check site connectivity, verify site configuration, or audit the farm topology'), giving practical scenarios. However, it doesn't explicitly state when NOT to use it or name specific alternatives among the sibling tools, which prevents a perfect score.

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/RMITBLOG/ParallelsRAS_MCP'

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