enumerate_users
Lists all system users on OpenMediaVault NAS, including system accounts, to provide comprehensive user management visibility.
Instructions
Enumerate all system users including system accounts (broader than list_users which may only show OMV-managed accounts)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/users.ts:107-114 (handler)The handler function for enumerate_users tool that executes the tool logic. It calls client.rpc('UserMgmt', 'enumerateUsers', {}) to fetch all system users including system accounts, then returns the result as JSON or an error message.
async () => { try { const result = await client.rpc("UserMgmt", "enumerateUsers", {}); return toolResult(JSON.stringify(result, null, 2)); } catch (error) { return toolResult(`Error enumerating users: ${error}`, true); } }, - src/tools/users.ts:106-106 (schema)Input schema definition for enumerate_users tool - an empty object {} indicating the tool takes no parameters.
{}, - src/tools/users.ts:103-115 (registration)Complete tool registration for enumerate_users using server.tool(), including the tool name, description, input schema, and handler function.
server.tool( "enumerate_users", "Enumerate all system users including system accounts (broader than list_users which may only show OMV-managed accounts)", {}, async () => { try { const result = await client.rpc("UserMgmt", "enumerateUsers", {}); return toolResult(JSON.stringify(result, null, 2)); } catch (error) { return toolResult(`Error enumerating users: ${error}`, true); } }, ); - src/tools/users.ts:5-7 (helper)Helper function toolResult() that formats the response content for MCP tools, creating a standardized text response with optional error flag.
function toolResult(text: string, isError = false) { return { content: [{ type: "text" as const, text }], isError }; } - src/index.ts:43-43 (registration)Main registration point where registerUserTools() is called to register all user-related tools (including enumerate_users) with the MCP server.
registerUserTools(server, client);