Skip to main content
Glama

get_wazuh_version

Retrieve the current Wazuh manager version and API details to verify connectivity and ensure compatibility.

Instructions

Get the Wazuh manager version and API information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The 'get_wazuh_version' tool handler. It calls client.getVersion(), formats the response (title, api_version, revision, license, hostname, timestamp) and returns it as JSON text.
    import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
    import type { WazuhClient } from "../client.js";
    
    export function registerVersionTools(
      server: McpServer,
      client: WazuhClient
    ): void {
      server.tool(
        "get_wazuh_version",
        "Get the Wazuh manager version and API information",
        {},
        async () => {
          try {
            const response = await client.getVersion();
            const info = response.data;
    
            const result = {
              title: info.title,
              api_version: info.api_version,
              revision: info.revision,
              license: info.license_name,
              hostname: info.hostname,
              timestamp: info.timestamp,
            };
    
            return {
              content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }],
            };
          } catch (error) {
            return {
              content: [
                {
                  type: "text" as const,
                  text: JSON.stringify({
                    error: error instanceof Error ? error.message : String(error),
                  }),
                },
              ],
              isError: true,
            };
          }
        }
      );
    }
  • src/index.ts:43-43 (registration)
    Registration call: registerVersionTools(server, client) wires the tool into the MCP server.
    registerVersionTools(server, client);
  • Type definition for WazuhVersionInfo, which defines the schema of the data returned by get_wazuh_version (title, api_version, revision, license_name, license_url, hostname, timestamp).
    export interface WazuhVersionInfo {
      title: string;
      api_version: string;
      revision: number;
      license_name: string;
      license_url: string;
      hostname: string;
      timestamp: string;
    }
  • WazuhClient.getVersion() helper method that calls the API root endpoint (GET /) to retrieve version information.
    async getVersion(): Promise<WazuhApiResponse<WazuhVersionInfo>> {
      return this.get("/");
    }
Behavior3/5

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

With no annotations, the description takes full burden. It merely restates the tool's purpose without revealing any behavioral traits like authentication requirements, response format, or potential side effects. However, since it is a simple read operation with no parameters, the lack of detail is acceptable.

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 sentence of 10 words, perfectly concise with no redundant information. Every word earns its place.

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

Completeness4/5

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

Given no parameters, no output schema, and no annotations, the description adequately states the tool's function. However, it could optionally mention that it returns version and API details. The sibling tools list confirms its distinct role.

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 zero parameters, so the schema is trivially 100% covered. The description adds no parameter information, but the baseline for zero parameters is 4, and no additional detail is needed.

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

Purpose5/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 the specific resource 'Wazuh manager version and API information', distinguishing it from sibling tools like get_agent (which retrieves agent data) or get_manager_config (which retrieves configuration).

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

Usage Guidelines3/5

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

No explicit guidance on when to use this tool versus alternatives. While it is obvious that this is for retrieving version info, the description does not provide context such as 'use this to check the current version' or mention any limitations.

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/solomonneas/wazuh-mcp'

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