Skip to main content
Glama
fredriksknese

mcp-openmediavault

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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);
      }
    },
  • Input schema definition for enumerate_users tool - an empty object {} indicating the tool takes no parameters.
    {},
  • 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);
        }
      },
    );
  • 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);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fredriksknese/mcp-openmediavault'

If you have feedback or need assistance with the MCP directory API, please join our Discord server