ras_farm_get_licensing
Check Parallels RAS license status, including type, expiration, seat count, and activation details to verify compliance and capacity.
Instructions
Get RAS licensing status, including license type (subscription/perpetual), expiration date, seat count, usage, and activation status. Use this to check license compliance, verify capacity, or diagnose licensing issues.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/farm-settings.ts:65-84 (registration)Tool registration with schema definition including title, description, annotations (read-only, idempotent), and empty inputSchemaserver.registerTool( "ras_farm_get_licensing", { title: "Licensing", description: "Get RAS licensing status, including license type (subscription/perpetual), " + "expiration date, seat count, usage, and activation status. Use this to check " + "license compliance, verify capacity, or diagnose licensing issues.", annotations: READ_ONLY_ANNOTATIONS, inputSchema: {}, }, async () => { try { const data = await rasClient.get("/api/farm-settings/licensing"); 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 licensing info") }], isError: true }; } } );
- src/tools/farm-settings.ts:76-83 (handler)Handler function that makes a GET request to /api/farm-settings/licensing endpoint, returns formatted JSON response, and handles errors with sanitised error messagesasync () => { try { const data = await rasClient.get("/api/farm-settings/licensing"); 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 licensing info") }], isError: true }; } }
- src/client.ts:43-54 (helper)Helper function that sanitizes error messages by removing sensitive information (auth tokens, passwords) and truncating long responses to prevent leaking internal detailsfunction 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}`; }