Skip to main content
Glama
benswel

QR for Agent

update_vcard_qr

Update contact details in an existing vCard QR code without regenerating the image. Modify name, organization, email, phone, or other fields; changes apply directly to the QR.

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

TableJSON Schema
NameRequiredDescriptionDefault
short_idYesThe short ID of the vCard QR code to update.
first_nameNoContact first name.
last_nameNoContact last name.
organizationNoCompany or organization.
titleNoJob title.
emailNoEmail address.
phoneNoPhone number.
urlNoWebsite URL.
addressNoStreet address.
noteNoAdditional notes.
labelNoUpdate the label.

Implementation Reference

  • The handler function for 'update_vcard_qr' that extracts short_id, label, and vcard fields, then sends a PATCH request to /api/qr/{short_id}.
    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 });
    },
  • Input schema definition for update_vcard_qr using Zod. Describes the tool and validates short_id (required), plus optional vCard fields (first_name, last_name, organization, title, email, phone, url, address, note) and label.
    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."),
  • Registration of all tools (including update_vcard_qr) into the McpServer. Each tool from tools.ts is registered with its name, description, inputSchema, and handler via server.tool().
    for (const [name, tool] of Object.entries(tools)) {
      server.tool(
        name,
        tool.description,
        tool.inputSchema.shape,
        async (input: Record<string, unknown>) => {
          try {
            const result = await tool.handler(input as any);
            return {
              content: [
                {
                  type: "text" as const,
                  text: JSON.stringify(result, null, 2),
                },
              ],
            };
          } catch (error) {
            const message = error instanceof Error ? error.message : String(error);
            return {
              content: [
                {
                  type: "text" as const,
                  text: JSON.stringify({
                    error: message,
                    hint: "Check the input parameters and try again. Use list_qr_codes to verify available QR codes.",
                  }),
                },
              ],
              isError: true,
            };
          }
        }
      );
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description reveals key behaviors: partial updates merge with existing data and updating vCard data changes the QR image content. This adds value beyond the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences efficiently cover purpose, constraints, and behavior. No wasted words, and the most critical information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 11 simple parameters, no output schema, and no annotations, the description sufficiently explains scope, update semantics, and side effects. It could mention that all fields except short_id are optional, but required field is already indicated in schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds extra context like 'Partial updates merge with existing data' and the type constraint, enhancing understanding beyond schema. It does not repeat schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Update', resource 'contact details of a vCard QR code', and specifies it only works on QR codes created with type='vcard', distinguishing it from other update tools for different types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly states the precondition 'Only works on QR codes created with type='vcard'', which guides when to use it. However, it does not explicitly list alternatives or when not to use it, but sibling context provides implicit differentiation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/benswel/qr-agent-core'

If you have feedback or need assistance with the MCP directory API, please join our Discord server