delete_qr_code
Permanently delete a QR code and all its scan analytics from the QR for Agent platform. The short URL stops working immediately and this action cannot be undone.
Instructions
Permanently delete a QR code and all its scan analytics. The short URL will stop working immediately. This cannot be undone.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| short_id | Yes | The short ID of the QR code to delete. |
Implementation Reference
- src/modules/qr/qr.service.ts:317-328 (handler)The business logic for deleting a QR code from the database.
export function deleteQrCode(shortId: string, apiKeyId: number): boolean { const existing = db .select() .from(qrCodes) .where(and(eq(qrCodes.shortId, shortId), eq(qrCodes.apiKeyId, apiKeyId))) .get(); if (!existing) return false; db.delete(qrCodes).where(eq(qrCodes.shortId, shortId)).run(); return true; } - packages/mcp/src/tools.ts:182-191 (registration)The MCP tool definition for delete_qr_code, which calls the corresponding API endpoint.
delete_qr_code: { description: "Permanently delete a QR code and all its scan analytics. The short URL will stop working immediately. This cannot be undone.", inputSchema: z.object({ short_id: z.string().describe("The short ID of the QR code to delete."), }), handler: async (input: { short_id: string }) => { return apiRequest(`/api/qr/${input.short_id}`, { method: "DELETE" }); }, },