update_vcard_qr
Modify contact information in existing vCard QR codes. Change names, organizations, emails, phones, addresses, or notes while preserving the original QR image.
Instructions
Update the contact details of a vCard QR code. Only works on QR codes created with type='vcard'. Partial updates merge with existing data. Note: updating vCard data changes the QR image content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| short_id | Yes | The short ID of the vCard QR code to update. | |
| first_name | No | Contact first name. | |
| last_name | No | Contact last name. | |
| organization | No | Company or organization. | |
| title | No | Job title. | |
| No | Email address. | ||
| phone | No | Phone number. | |
| url | No | Website URL. | |
| address | No | Street address. | |
| note | No | Additional notes. | |
| label | No | Update the label. |
Implementation Reference
- packages/mcp/src/tools.ts:363-368 (handler)The handler function for updating vCard QR code details, which sends a PATCH request to the API.
handler: async (input: Record<string, unknown>) => { const { short_id, label, ...vcardFields } = input; const body: Record<string, unknown> = { vcard_data: vcardFields }; if (label !== undefined) body.label = label; return apiRequest(`/api/qr/${short_id}`, { method: "PATCH", body }); }, - packages/mcp/src/tools.ts:350-362 (schema)The Zod schema defining the input parameters for updating a vCard QR code.
inputSchema: z.object({ short_id: z.string().describe("The short ID of the vCard QR code to update."), first_name: z.string().optional().describe("Contact first name."), last_name: z.string().optional().describe("Contact last name."), organization: z.string().optional().describe("Company or organization."), title: z.string().optional().describe("Job title."), email: z.string().optional().describe("Email address."), phone: z.string().optional().describe("Phone number."), url: z.string().optional().describe("Website URL."), address: z.string().optional().describe("Street address."), note: z.string().optional().describe("Additional notes."), label: z.string().optional().describe("Update the label."), }), - packages/mcp/src/tools.ts:347-369 (registration)The tool definition registration for 'update_vcard_qr' in the MCP tools collection.
update_vcard_qr: { description: "Update the contact details of a vCard QR code. Only works on QR codes created with type='vcard'. Partial updates merge with existing data. Note: updating vCard data changes the QR image content.", inputSchema: z.object({ short_id: z.string().describe("The short ID of the vCard QR code to update."), first_name: z.string().optional().describe("Contact first name."), last_name: z.string().optional().describe("Contact last name."), organization: z.string().optional().describe("Company or organization."), title: z.string().optional().describe("Job title."), email: z.string().optional().describe("Email address."), phone: z.string().optional().describe("Phone number."), url: z.string().optional().describe("Website URL."), address: z.string().optional().describe("Street address."), note: z.string().optional().describe("Additional notes."), label: z.string().optional().describe("Update the label."), }), handler: async (input: Record<string, unknown>) => { const { short_id, label, ...vcardFields } = input; const body: Record<string, unknown> = { vcard_data: vcardFields }; if (label !== undefined) body.label = label; return apiRequest(`/api/qr/${short_id}`, { method: "PATCH", body }); }, },