update_social_qr
Modify social media links in existing QR codes by merging partial updates with current data using the short ID.
Instructions
Update the social media links of a Social QR code. Partial updates merge with existing data.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| short_id | Yes | The short ID of the Social QR code to update. | |
| No | Facebook URL. | ||
| No | Instagram URL. | ||
| No | Twitter/X URL. | ||
| No | LinkedIn URL. | ||
| youtube | No | YouTube URL. | |
| tiktok | No | TikTok URL. | |
| github | No | GitHub URL. | |
| website | No | Website URL. | |
| label | No | Update the label. |
Implementation Reference
- packages/mcp/src/tools.ts:633-638 (handler)The handler function for the 'update_social_qr' MCP tool, which extracts the social links and optional label, and sends a PATCH request to the backend.
handler: async (input: Record<string, unknown>) => { const { short_id, label, ...socialFields } = input; const body: Record<string, unknown> = { social_data: socialFields }; if (label !== undefined) body.label = label; return apiRequest(`/api/qr/${short_id}`, { method: "PATCH", body }); }, - packages/mcp/src/tools.ts:621-632 (schema)The Zod schema defining the input parameters for the 'update_social_qr' tool.
inputSchema: z.object({ short_id: z.string().describe("The short ID of the Social QR code to update."), facebook: z.string().optional().describe("Facebook URL."), instagram: z.string().optional().describe("Instagram URL."), twitter: z.string().optional().describe("Twitter/X URL."), linkedin: z.string().optional().describe("LinkedIn URL."), youtube: z.string().optional().describe("YouTube URL."), tiktok: z.string().optional().describe("TikTok URL."), github: z.string().optional().describe("GitHub URL."), website: z.string().optional().describe("Website URL."), label: z.string().optional().describe("Update the label."), }), - packages/mcp/src/tools.ts:618-639 (registration)The definition and registration of the 'update_social_qr' tool within the MCP tools object.
update_social_qr: { description: "Update the social media links of a Social QR code. Partial updates merge with existing data.", inputSchema: z.object({ short_id: z.string().describe("The short ID of the Social QR code to update."), facebook: z.string().optional().describe("Facebook URL."), instagram: z.string().optional().describe("Instagram URL."), twitter: z.string().optional().describe("Twitter/X URL."), linkedin: z.string().optional().describe("LinkedIn URL."), youtube: z.string().optional().describe("YouTube URL."), tiktok: z.string().optional().describe("TikTok URL."), github: z.string().optional().describe("GitHub URL."), website: z.string().optional().describe("Website URL."), label: z.string().optional().describe("Update the label."), }), handler: async (input: Record<string, unknown>) => { const { short_id, label, ...socialFields } = input; const body: Record<string, unknown> = { social_data: socialFields }; if (label !== undefined) body.label = label; return apiRequest(`/api/qr/${short_id}`, { method: "PATCH", body }); }, },