Skip to main content
Glama
RMITBLOG

Parallels RAS MCP Server

by RMITBLOG

ras_infra_get_saml_idps

Retrieve and audit SAML identity providers configured for single sign-on (SSO) in Parallels RAS infrastructure. View provider names, metadata URLs, and configuration details to manage authentication settings.

Instructions

List SAML identity providers configured for single sign-on (SSO). Returns provider names, metadata URLs, and configuration details. Use this to audit SSO configuration or troubleshoot SAML authentication issues.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main handler function for ras_infra_get_saml_idps tool. Executes the API call to retrieve SAML identity providers by calling rasClient.get('/api/infrastructure/saml-idps'), returns JSON stringified data, and handles errors with sanitiseError.
    async () => { try { const data = await rasClient.get("/api/infrastructure/saml-idps"); 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 SAML identity providers") }], isError: true }; } }
  • Tool registration for ras_infra_get_saml_idps. Registers the tool with server.registerTool including name, title, description, annotations (read-only), and empty input schema. The tool is registered as a read-only infrastructure tool for listing SAML identity providers configured for SSO.
    server.registerTool( "ras_infra_get_saml_idps", { title: "SAML Identity Providers", description: "List SAML identity providers configured for single sign-on (SSO). Returns " + "provider names, metadata URLs, and configuration details. Use this to audit " + "SSO configuration or troubleshoot SAML authentication issues.", annotations: READ_ONLY_ANNOTATIONS, inputSchema: {}, }, async () => { try { const data = await rasClient.get("/api/infrastructure/saml-idps"); 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 SAML identity providers") }], isError: true }; } } );
  • Schema definition for ras_infra_get_saml_idps tool. Defines the tool metadata including title 'SAML Identity Providers', description for auditing SSO configuration and troubleshooting SAML authentication, read-only annotations, and empty input schema (no parameters required).
    { title: "SAML Identity Providers", description: "List SAML identity providers configured for single sign-on (SSO). Returns " + "provider names, metadata URLs, and configuration details. Use this to audit " + "SSO configuration or troubleshoot SAML authentication issues.", annotations: READ_ONLY_ANNOTATIONS, inputSchema: {}, },
  • RasClient.get helper method that makes the actual HTTP GET request to the RAS API. Handles authentication, automatic retry on 401 errors, request timeouts, and returns JSON response. This is called by the handler to fetch data from '/api/infrastructure/saml-idps'.
    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 helper function that sanitizes error messages by removing auth tokens, passwords, and truncating long API responses. Used by the handler to safely format error messages before returning them to the client.
    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}`; }

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