get_firmware_versions
Retrieve firmware version information for CIMC, BIOS, storage controllers, and network adapters to manage Cisco C-Series server components.
Instructions
List all component firmware versions: CIMC, BIOS, storage controllers, network adapters, etc.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/firmware.ts:11-28 (handler)The main handler function that retrieves firmware versions by querying the 'firmwareRunning' class and returns formatted JSON with firmware details including dn, type, version, deployment, and packageVersion.
export async function getFirmwareVersions(): Promise<string> { const firmware = await resolveClass("firmwareRunning"); return JSON.stringify( { total: firmware.length, firmware: firmware.map((f) => ({ dn: f.dn, type: f.type, version: f.version, deployment: f.deployment, packageVersion: f.packageVersion, })), }, null, 2, ); } - src/tools/firmware.ts:4-9 (schema)Tool definition with name 'get_firmware_versions', description, and empty input schema (no parameters required).
export const getFirmwareVersionsDef = { name: "get_firmware_versions", description: "List all component firmware versions: CIMC, BIOS, storage controllers, network adapters, etc.", inputSchema: z.object({}), }; - src/index.ts:138-143 (registration)Registration of the tool with the MCP server, wiring together the definition and handler function with error handling wrapper.
server.tool( getFirmwareVersionsDef.name, getFirmwareVersionsDef.description, getFirmwareVersionsDef.inputSchema.shape, wrapHandler(getFirmwareVersions), ); - src/utils/client.ts:49-56 (helper)Helper utility function used by the handler to query all objects of a specific class (firmwareRunning) from the CIMC API via XML request.
export async function resolveClass( classId: string, hierarchical = false, ): Promise<Record<string, string>[]> { const xml = `<configResolveClass cookie="{cookie}" inHierarchical="${hierarchical}" classId="${classId}"/>`; const result = await authenticatedRequest(xml); return extractOutConfigs(result, "configResolveClass"); }