Skip to main content
Glama

get_agent_hotfixes

Retrieve installed Windows hotfixes and patches for a given Wazuh agent to assess patch compliance and update status.

Instructions

List Windows hotfixes/patches installed on a Wazuh agent

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesAgent identifier (e.g., '001')
limitNoMaximum number of hotfixes to return (1-500)
offsetNoPagination offset

Implementation Reference

  • Registration of the 'get_agent_hotfixes' tool on the MCP server with Zod schema for agent_id, limit, and offset parameters
    server.tool(
      "get_agent_hotfixes",
      "List Windows hotfixes/patches installed on a Wazuh agent",
      {
        agent_id: z
          .string()
          .describe("Agent identifier (e.g., '001')"),
        limit: z
          .number()
          .int()
          .min(1)
          .max(500)
          .default(25)
          .describe("Maximum number of hotfixes to return (1-500)"),
        offset: z
          .number()
          .int()
          .min(0)
          .default(0)
          .describe("Pagination offset"),
      },
      async ({ agent_id, limit, offset }) => {
        try {
          const response = await client.getAgentHotfixes(agent_id, { limit, offset });
          const data = response.data;
    
          const result = {
            agent_id,
            hotfixes: data.affected_items.map((h) => h.hotfix),
            total: data.total_affected_items,
            limit,
            offset,
          };
    
          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,
          };
        }
      }
    );
  • Handler function that calls client.getAgentHotfixes() and maps the response to return hotfix data
      async ({ agent_id, limit, offset }) => {
        try {
          const response = await client.getAgentHotfixes(agent_id, { limit, offset });
          const data = response.data;
    
          const result = {
            agent_id,
            hotfixes: data.affected_items.map((h) => h.hotfix),
            total: data.total_affected_items,
            limit,
            offset,
          };
    
          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,
          };
        }
      }
    );
  • Zod schema defining input parameters: agent_id (string), limit (number, 1-500, default 25), offset (number, int, min 0, default 0)
    {
      agent_id: z
        .string()
        .describe("Agent identifier (e.g., '001')"),
      limit: z
        .number()
        .int()
        .min(1)
        .max(500)
        .default(25)
        .describe("Maximum number of hotfixes to return (1-500)"),
      offset: z
        .number()
        .int()
        .min(0)
        .default(0)
        .describe("Pagination offset"),
    },
  • Client helper method that calls the Wazuh API GET /syscollector/{agentId}/hotfixes endpoint
    async getAgentHotfixes(
      agentId: string,
      params: Record<string, string | number> = {}
    ): Promise<WazuhApiResponse<WazuhPaginatedData<WazuhHotfix>>> {
      return this.get(`/syscollector/${agentId}/hotfixes`, params);
    }
  • TypeScript interface WazuhHotfix with an optional hotfix string property
    export interface WazuhHotfix {
      hotfix?: string;
    }
Behavior2/5

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

No annotations are provided, and the description does not disclose behavioral traits beyond the basic function. It omits permissions needed, expected behavior for non-Windows agents, error conditions, or response format, placing full burden on the description which fails to cover these.

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?

Single sentence that is front-loaded and contains no extraneous words. Efficiently conveys the essential purpose.

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

Completeness3/5

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

Given no output schema and 3 parameters, the description is minimal but functional. However, it lacks context about Windows-only applicability, typical usage, or error handling, making it incomplete for a tool with many siblings.

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?

Schema description coverage is 100%, so baseline is 3. The description adds no additional meaning beyond the schema's parameter descriptions (agent_id, limit, offset) and remains generic.

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 tool lists Windows hotfixes/patches on a Wazuh agent, with a specific verb and resource. It distinguishes from sibling tools like get_agent_packages (lists packages) and get_agent_os (OS info).

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 lacks any guidance on when to use this tool vs alternatives. No exclusions or prerequisites are mentioned, and there is no comparison to sibling tools like get_agent_packages for package listing.

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