ras_farm_get_administrators
Retrieve and audit administrator accounts for a Parallels RAS farm, including usernames, roles, permissions, and group membership to verify access control.
Instructions
List RAS farm administrator accounts, including usernames, roles, permissions, and group membership. Use this to audit admin access, verify role assignments, or review who has administrative control of the farm.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/farm-settings.ts:32-39 (handler)Tool handler function that executes the ras_farm_get_administrators logic. Makes an API GET request to '/api/farm-settings/administrators', returns JSON response, and handles errors using sanitiseError.async () => { try { const data = await rasClient.get("/api/farm-settings/administrators"); 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 administrators") }], isError: true }; } }
- src/tools/farm-settings.ts:21-40 (registration)Complete registration of the ras_farm_get_administrators tool using server.registerTool, including the tool name, schema configuration (title, description, annotations, inputSchema), and handler function.server.registerTool( "ras_farm_get_administrators", { title: "Farm Administrators", description: "List RAS farm administrator accounts, including usernames, roles, permissions, " + "and group membership. Use this to audit admin access, verify role assignments, " + "or review who has administrative control of the farm.", annotations: READ_ONLY_ANNOTATIONS, inputSchema: {}, }, async () => { try { const data = await rasClient.get("/api/farm-settings/administrators"); 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 administrators") }], isError: true }; } } );
- src/tools/farm-settings.ts:23-31 (schema)Tool schema definition containing title, description, annotations (READ_ONLY_ANNOTATIONS), and inputSchema (empty object, meaning no input parameters required).{ title: "Farm Administrators", description: "List RAS farm administrator accounts, including usernames, roles, permissions, " + "and group membership. Use this to audit admin access, verify role assignments, " + "or review who has administrative control of the farm.", annotations: READ_ONLY_ANNOTATIONS, inputSchema: {}, },
- src/tools/farm-settings.ts:12-17 (helper)Shared annotations constant used by all read-only farm settings tools, defining readOnlyHint, destructiveHint, idempotentHint, and openWorldHint properties.const READ_ONLY_ANNOTATIONS = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true, } as const;
- src/tools/farm-settings.ts:8-9 (helper)Import statements bringing in dependencies: McpServer from the MCP SDK, and rasClient/sanitiseError from the local client module used in the handler.import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { rasClient, sanitiseError } from "../client.js";