Skip to main content
Glama
fredriksknese

mcp-openmediavault

get_group

Retrieve detailed information about a specific user group on an OpenMediaVault NAS system to manage access permissions and configuration.

Instructions

Get detailed information about a specific group

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesGroup name to look up

Implementation Reference

  • The async handler function for 'get_group' tool that takes a group name and calls client.rpc('GroupMgmt', 'get', { name }) to fetch group details from OpenMediaVault, returning JSON-formatted results or an error message.
    async ({ name }) => {
      try {
        const result = await client.rpc("GroupMgmt", "get", { name });
        return toolResult(JSON.stringify(result, null, 2));
      } catch (error) {
        return toolResult(
          `Error fetching group '${name}': ${error}`,
          true,
        );
      }
    },
  • Zod schema definition for 'get_group' tool input: a single required 'name' string parameter describing the group name to look up.
    {
      name: z.string().describe("Group name to look up"),
    },
  • Registration of the 'get_group' tool using server.tool() with name, description, input schema, and handler function.
    server.tool(
      "get_group",
      "Get detailed information about a specific group",
      {
        name: z.string().describe("Group name to look up"),
      },
      async ({ name }) => {
        try {
          const result = await client.rpc("GroupMgmt", "get", { name });
          return toolResult(JSON.stringify(result, null, 2));
        } catch (error) {
          return toolResult(
            `Error fetching group '${name}': ${error}`,
            true,
          );
        }
      },
    );
  • The OmvClient.rpc() method that handles authenticated API communication with OpenMediaVault, including session management, cookie handling, and error recovery for the get_group tool.
    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?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a read operation ('Get'), but doesn't describe what 'detailed information' includes, potential errors (e.g., if the group doesn't exist), authentication requirements, or rate limits. This leaves significant gaps for a tool that likely queries system data.

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

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized for a simple lookup tool and front-loaded with the core action.

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?

For a tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'detailed information' returns, potential side effects, or error conditions. Given the context of system administration tools (siblings include get_system_info, get_user, etc.), more behavioral context is needed for safe and effective use.

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

Parameters3/5

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

The input schema has 100% description coverage, with the 'name' parameter documented as 'Group name to look up'. The description doesn't add any meaning beyond this, such as format examples or constraints, but the schema provides adequate baseline information.

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

Purpose4/5

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

The description clearly states the verb ('Get') and resource ('detailed information about a specific group'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'list_groups' or 'enumerate_groups', which likely return multiple groups rather than details for one specific group.

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

Usage Guidelines2/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 doesn't mention sibling tools like 'list_groups' for listing multiple groups or 'get_user' for user details, nor does it specify prerequisites or exclusions for usage.

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