Skip to main content
Glama
fredriksknese

mcp-openmediavault

enumerate_groups

Lists all system groups on an OpenMediaVault NAS to manage user permissions and access control for network shares and services.

Instructions

Enumerate all system groups including system groups

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The 'enumerate_groups' tool handler function that executes the tool logic. It calls client.rpc('GroupMgmt', 'enumerateGroups', {}) to enumerate all system groups including system groups, and returns the result as JSON or an error message.
    server.tool(
      "enumerate_groups",
      "Enumerate all system groups including system groups",
      {},
      async () => {
        try {
          const result = await client.rpc("GroupMgmt", "enumerateGroups", {});
          return toolResult(JSON.stringify(result, null, 2));
        } catch (error) {
          return toolResult(`Error enumerating groups: ${error}`, true);
        }
      },
    );
  • Input schema definition for the 'enumerate_groups' tool - an empty object {} indicating no parameters are required.
    {},
  • src/index.ts:43-43 (registration)
    Main registration point where registerUserTools(server, client) is called to register all user-related tools including 'enumerate_groups'.
    registerUserTools(server, client);
  • The OmvClient.rpc() method is a supporting utility that handles authentication and makes the actual HTTP POST request to the OpenMediaVault RPC endpoint. It manages session cookies, handles authentication errors, and returns the API response.
    async rpc(
      service: string,
      method: string,
      params: Record<string, unknown> = {},
    ): Promise<unknown> {
      if (!this.sessionId && !this.cookie) {
        await this.login();
      }
    
      const url = `${this.baseUrl}/rpc.php`;
      const body = {
        service,
        method,
        params,
        options: null,
      };
    
      const headers: Record<string, string> = {
        "Content-Type": "application/json",
      };
    
      if (this.cookie) {
        headers["Cookie"] = this.cookie;
      }
      if (this.sessionId) {
        headers["X-OPENMEDIAVAULT-SESSIONID"] = this.sessionId;
      }
    
      const response = await fetch(url, {
        method: "POST",
        headers,
        body: JSON.stringify(body),
      });
    
      if (response.status === 401) {
        // Session expired — re-login and retry
        await this.login();
        return this.rpc(service, method, params);
      }
    
      if (!response.ok) {
        const errorText = await response.text();
        throw new Error(`OMV API error (${response.status}): ${errorText}`);
      }
    
      const data = (await response.json()) as OmvResponse;
    
      if (data.error) {
        throw new Error(
          `OMV RPC error [${service}.${method}]: ${data.error.message} (code ${data.error.code})`,
        );
      }
    
      return data.response;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the action ('enumerate') without detailing traits like read-only status, potential side effects, rate limits, or output format. This leaves critical behavioral aspects unspecified, though it does not contradict any annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, which is concise, but it includes redundant phrasing ('including system groups') that does not add value. It is front-loaded but could be more efficient by eliminating repetition. Overall, it is adequately sized but not optimally structured for clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (simple enumeration with no parameters) and lack of annotations and output schema, the description is incomplete. It fails to explain what 'enumerate' returns (e.g., list of group names, details) or any behavioral context, leaving gaps that could hinder an AI agent's understanding and usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100%, meaning no parameters need documentation. The description does not add parameter-specific information, which is acceptable in this case. A baseline score of 4 is appropriate as the absence of parameters reduces the need for semantic elaboration.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Enumerate all system groups including system groups' is tautological, essentially restating the tool name 'enumerate_groups' with redundant phrasing ('including system groups'). It does not specify what 'enumerate' entails (e.g., listing, retrieving details) or distinguish it from sibling tools like 'list_groups' or 'get_group', leaving the purpose vague and repetitive.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention sibling tools such as 'list_groups' or 'get_group', nor does it specify contexts, prerequisites, or exclusions. This lack of usage instructions makes it difficult for an AI agent to select the appropriate tool among similar options.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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