Skip to main content
Glama
RMITBLOG

Parallels RAS MCP Server

by RMITBLOG

ras_farm_get_performance

Retrieve performance monitoring configuration and resource utilization data for the Parallels RAS farm to review baselines and check monitoring settings.

Instructions

Get performance monitor configuration and counters for the RAS farm. Includes resource utilisation thresholds and monitoring settings. Use this to review performance baselines or check monitoring configuration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool registration for 'ras_farm_get_performance' with schema definition (title, description, annotations) and handler function that makes GET request to /api/farm-settings/performance-monitor endpoint.
    server.registerTool( "ras_farm_get_performance", { title: "Performance Monitor", description: "Get performance monitor configuration and counters for the RAS farm. " + "Includes resource utilisation thresholds and monitoring settings. Use this " + "to review performance baselines or check monitoring configuration.", annotations: READ_ONLY_ANNOTATIONS, inputSchema: {}, }, async () => { try { const data = await rasClient.get("/api/farm-settings/performance-monitor"); 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 performance monitor") }], isError: true }; } } );
  • Handler function that executes the tool logic: calls rasClient.get() to retrieve performance monitor data from the RAS API and returns it as formatted JSON, with error handling using sanitiseError.
    async () => { try { const data = await rasClient.get("/api/farm-settings/performance-monitor"); 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 performance monitor") }], isError: true }; } }
  • The rasClient.get() method used by the handler: performs authenticated GET requests to the RAS API with automatic login, token management, retry on 401, and request timeout handling.
    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 used by the handler for error handling: sanitizes error messages by redacting auth tokens and passwords, truncates long messages, and adds context.
    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}`; }
  • Tool schema definition including title 'Performance Monitor', description explaining the tool's purpose, read-only annotations, and empty inputSchema (no parameters required).
    { title: "Performance Monitor", description: "Get performance monitor configuration and counters for the RAS farm. " + "Includes resource utilisation thresholds and monitoring settings. Use this " + "to review performance baselines or check monitoring configuration.", annotations: READ_ONLY_ANNOTATIONS, inputSchema: {}, },

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