update_wifi_qr
Modify WiFi network credentials in existing QR codes to update SSID, password, encryption, or visibility settings without creating new images.
Instructions
Update the WiFi credentials of a WiFi QR code. Only works on QR codes created with type='wifi'. Note: updating WiFi data changes the QR image content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| short_id | Yes | The short ID of the WiFi QR code to update. | |
| ssid | No | WiFi network name. | |
| password | No | WiFi password. | |
| encryption | No | Encryption type. | |
| hidden | No | Whether the network is hidden. | |
| label | No | Update the label. |
Implementation Reference
- packages/mcp/src/tools.ts:382-387 (handler)The handler function for 'update_wifi_qr' which constructs the PATCH request for the API.
handler: async (input: Record<string, unknown>) => { const { short_id, label, ...wifiFields } = input; const body: Record<string, unknown> = { wifi_data: wifiFields }; if (label !== undefined) body.label = label; return apiRequest(`/api/qr/${short_id}`, { method: "PATCH", body }); }, - packages/mcp/src/tools.ts:374-381 (schema)The input schema validation for the 'update_wifi_qr' tool.
inputSchema: z.object({ short_id: z.string().describe("The short ID of the WiFi QR code to update."), ssid: z.string().optional().describe("WiFi network name."), password: z.string().optional().describe("WiFi password."), encryption: z.enum(["WPA", "WEP", "nopass"]).optional().describe("Encryption type."), hidden: z.boolean().optional().describe("Whether the network is hidden."), label: z.string().optional().describe("Update the label."), }),