ras_infra_get_enrollment_status
Check enrollment server health and troubleshoot SCEP certificate enrollment failures for device management in Parallels RAS infrastructure.
Instructions
Get enrollment server status. Enrollment servers handle SCEP certificate enrollment for device management. Use this to check enrollment server health or troubleshoot certificate enrollment failures.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/infrastructure.ts:186-193 (handler)The tool handler function that executes the enrollment status query. Makes a GET request to '/api/infrastructure/enrollment-servers/status' endpoint using the rasClient and returns the JSON response. Includes try-catch error handling with sanitised error messages.async () => { try { const data = await rasClient.get("/api/infrastructure/enrollment-servers/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 enrollment server status") }], isError: true }; } }
- src/tools/infrastructure.ts:175-194 (registration)Tool registration with metadata: name 'ras_infra_get_enrollment_status', title 'Enrollment Servers', description explaining SCEP certificate enrollment for device management, read-only annotations, and empty inputSchema (no parameters required).server.registerTool( "ras_infra_get_enrollment_status", { title: "Enrollment Servers", description: "Get enrollment server status. Enrollment servers handle SCEP certificate " + "enrollment for device management. Use this to check enrollment server health " + "or troubleshoot certificate enrollment failures.", annotations: READ_ONLY_ANNOTATIONS, inputSchema: {}, }, async () => { try { const data = await rasClient.get("/api/infrastructure/enrollment-servers/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 enrollment server status") }], isError: true }; } } );
- src/tools/infrastructure.ts:184-184 (schema)Input schema definition as an empty object, indicating the tool requires no input parameters.inputSchema: {},
- src/client.ts:43-54 (helper)The sanitiseError helper function that removes sensitive information (auth tokens, passwords) from error messages and truncates excessively long responses to avoid leaking internal details.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}`; }