Skip to main content
Glama
RMITBLOG

Parallels RAS MCP Server

by RMITBLOG

ras_infra_get_rds_hostpools

List RDS host pool membership and configuration to review pool composition, check host assignments, or verify pool settings for load balancing and resource allocation.

Instructions

List RDS host pool membership and configuration. Host pools group RDS servers for load balancing and resource allocation. Use this to review pool composition, check host assignments, or verify pool settings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool handler and registration for 'ras_infra_get_rds_hostpools'. This async function calls the RAS API endpoint '/api/infrastructure/rd-session-hosts/rds/hostpool' to retrieve RDS host pool configuration and membership data, returning it as JSON-formatted text with proper error handling.
    server.registerTool( "ras_infra_get_rds_hostpools", { title: "RDS Host Pools", description: "List RDS host pool membership and configuration. Host pools group RDS servers " + "for load balancing and resource allocation. Use this to review pool composition, " + "check host assignments, or verify pool settings.", annotations: READ_ONLY_ANNOTATIONS, inputSchema: {}, }, async () => { try { const data = await rasClient.get("/api/infrastructure/rd-session-hosts/rds/hostpool"); 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 RDS host pools") }], isError: true }; } } );
  • Tool schema definition including title, description, annotations (readOnlyHint, idempotentHint, openWorldHint), and inputSchema which is an empty object (no input parameters required).
    "ras_infra_get_rds_hostpools", { title: "RDS Host Pools", description: "List RDS host pool membership and configuration. Host pools group RDS servers " + "for load balancing and resource allocation. Use this to review pool composition, " + "check host assignments, or verify pool settings.", annotations: READ_ONLY_ANNOTATIONS, inputSchema: {}, },
  • The RasClient.get() method that performs HTTP GET requests to the RAS API. It handles authentication (lazy login with retry on 401), request timeouts, and returns parsed JSON responses. Used by the handler to fetch host pool data.
    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(); }
  • The sanitiseError() function that sanitizes error messages by redacting auth tokens and passwords, and truncating excessively long API response bodies. Used by the handler to provide safe error messages to users.
    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}`; }
  • Module-level setup including imports and shared annotations object (READ_ONLY_ANNOTATIONS) used by all infrastructure tools including ras_infra_get_rds_hostpools.
    /** * Infrastructure tools for the Parallels RAS MCP Server. * Provides read-only access to agents, brokers, providers, hosts, gateways, * sites, certificates, HALB devices, enrollment servers, SAML, themes, and VDI. * @author Ryan Mangan * @created 2026-02-10 */ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { rasClient, sanitiseError } from "../client.js"; /** Shared annotations for all read-only infrastructure tools. */ const READ_ONLY_ANNOTATIONS = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true, } as const;

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