Skip to main content
Glama
RMITBLOG

Parallels RAS MCP Server

by RMITBLOG

ras_infra_get_gateway_status

Check the status of Secure Client Gateways to monitor health and troubleshoot external connectivity issues for published resources.

Instructions

Get the status of RAS Secure Client Gateways, including connection state, IP addresses, and tunnel mode. Gateways provide external user access to published resources. Use this to monitor gateway health or troubleshoot external connectivity issues.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the ras_infra_get_gateway_status tool logic. It calls the RAS API endpoint '/api/infrastructure/gateway/status' and returns the gateway status data as JSON, with error handling using sanitiseError.
    async () => { try { const data = await rasClient.get("/api/infrastructure/gateway/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 gateway status") }], isError: true }; } }
  • Full registration of the ras_infra_get_gateway_status tool, including its metadata (title, description, annotations, inputSchema) and the handler function implementation.
    server.registerTool( "ras_infra_get_gateway_status", { title: "Gateway Status", description: "Get the status of RAS Secure Client Gateways, including connection state, " + "IP addresses, and tunnel mode. Gateways provide external user access to " + "published resources. Use this to monitor gateway health or troubleshoot " + "external connectivity issues.", annotations: READ_ONLY_ANNOTATIONS, inputSchema: {}, }, async () => { try { const data = await rasClient.get("/api/infrastructure/gateway/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 gateway status") }], isError: true }; } } );
  • Schema definition for the ras_infra_get_gateway_status tool, including title, description, read-only annotations, and empty input schema (no parameters required).
    { title: "Gateway Status", description: "Get the status of RAS Secure Client Gateways, including connection state, " + "IP addresses, and tunnel mode. Gateways provide external user access to " + "published resources. Use this to monitor gateway health or troubleshoot " + "external connectivity issues.", annotations: READ_ONLY_ANNOTATIONS, inputSchema: {},
  • READ_ONLY_ANNOTATIONS constant used by the ras_infra_get_gateway_status tool to mark it as read-only, non-destructive, idempotent, and open-world.
    const READ_ONLY_ANNOTATIONS = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true, } as const;
  • The rasClient.get() method used by the handler to make authenticated GET requests to the RAS API endpoint. Handles authentication, retries on 401, and error 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(); }

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