opnsense_firmware_check
Triggers a background firmware repository check to refresh the cached upgrade status. Call 'opnsense_firmware_status' afterward.
Instructions
Trigger a background firmware repository check to refresh the cached upgrade status. After calling this, wait briefly and then call 'opnsense_firmware_status' to see fresh upgrade info.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/firmware.ts:158-161 (handler)Handler for the opnsense_firmware_check tool. It sends a POST request to /core/firmware/check to trigger a background firmware repository check, refreshing the cached upgrade status.
case "opnsense_firmware_check": { const result = await client.post("/core/firmware/check"); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } - src/tools/firmware.ts:50-55 (schema)Tool definition with name 'opnsense_firmware_check' and an empty input schema (no parameters required).
{ name: "opnsense_firmware_check", description: "Trigger a background firmware repository check to refresh the cached upgrade status. After calling this, wait briefly and then call 'opnsense_firmware_status' to see fresh upgrade info.", inputSchema: { type: "object" as const, properties: {} }, }, - src/index.ts:66-66 (registration)Registration of all firmware tool definitions (including opnsense_firmware_check) into the toolHandlers map, mapping each tool name to the handleFirmwareTool handler function.
for (const def of firmwareToolDefinitions) toolHandlers.set(def.name, handleFirmwareTool); - src/client/opnsense-client.ts:49-58 (helper)The post() method on OPNsenseClient is used by the handler to make the POST request to /core/firmware/check.
async post<T>(path: string, data?: unknown): Promise<T> { try { const response = await this.http.post<T>(path, data ?? {}, { headers: { "Content-Type": "application/json" }, }); return response.data; } catch (error: unknown) { throw extractError(error, `POST ${path}`); } }