opnsense_firmware_status
Check OPNsense firmware upgrade status (running, pending, done) from cache. Refresh cache by running a firmware check first if needed.
Instructions
Check for available firmware upgrades and their status (running, pending, done). Reads the cached state — call 'opnsense_firmware_check' first if the cache may be stale.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/firmware.ts:153-156 (handler)The handler function that executes the 'opnsense_firmware_status' tool logic. It calls client.get('/core/firmware/status') and returns the cached upgrade status as a JSON string.
case "opnsense_firmware_status": { const result = await client.get("/core/firmware/status"); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } - src/tools/firmware.ts:44-49 (schema)The input schema definition for 'opnsense_firmware_status' — it takes no parameters (empty object schema).
{ name: "opnsense_firmware_status", description: "Check for available firmware upgrades and their status (running, pending, done). Reads the cached state — call 'opnsense_firmware_check' first if the cache may be stale.", inputSchema: { type: "object" as const, properties: {} }, }, - src/index.ts:39-42 (registration)All tool definitions including firmwareToolDefinitions are aggregated into allToolDefinitions and exposed via ListToolsRequestSchema handler.
const allToolDefinitions = [ ...dnsToolDefinitions, ...firewallToolDefinitions, ...diagnosticsToolDefinitions, - src/index.ts:66-66 (registration)The tool handler is registered in the toolHandlers map: handleFirmwareTool is bound to each firmware tool definition name.
for (const def of firmwareToolDefinitions) toolHandlers.set(def.name, handleFirmwareTool); - src/client/opnsense-client.ts:28-35 (helper)The OPNsenseClient.get method used by the handler to make the HTTP GET request to the OPNsense API.
async get<T>(path: string): Promise<T> { try { const response = await this.http.get<T>(path); return response.data; } catch (error: unknown) { throw extractError(error, `GET ${path}`); } }