ras_infra_get_rds_hosts
Monitor RDS session host health and capacity by listing hosts with details like hostname, IP, agent status, active sessions, CPU/RAM usage, and OS version for troubleshooting.
Instructions
List RDS (Remote Desktop Services) session hosts and their details including hostname, IP, agent status, active sessions, CPU/RAM usage, and OS version. Use this to monitor host health, check capacity, or troubleshoot RDS issues.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/infrastructure.ts:87-106 (registration)Registration of the ras_infra_get_rds_hosts tool with the MCP server, including tool metadata, annotations, input schema (empty), and the handler function that makes a GET request to /api/infrastructure/rd-session-hosts/rds/hostserver.registerTool( "ras_infra_get_rds_hosts", { title: "RDS Hosts", description: "List RDS (Remote Desktop Services) session hosts and their details including " + "hostname, IP, agent status, active sessions, CPU/RAM usage, and OS version. " + "Use this to monitor host health, check capacity, or troubleshoot RDS issues.", annotations: READ_ONLY_ANNOTATIONS, inputSchema: {}, }, async () => { try { const data = await rasClient.get("/api/infrastructure/rd-session-hosts/rds/host"); 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 RDS hosts") }], isError: true }; } } );
- src/tools/infrastructure.ts:98-105 (handler)Handler function for ras_infra_get_rds_hosts that executes the tool logic: calls the RAS API endpoint /api/infrastructure/rd-session-hosts/rds/host via rasClient.get(), returns the JSON response as text, and handles errors using sanitiseErrorasync () => { try { const data = await rasClient.get("/api/infrastructure/rd-session-hosts/rds/host"); 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 RDS hosts") }], isError: true }; } }