Skip to main content
Glama
benswel

QR for Agent

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

TableJSON Schema
NameRequiredDescriptionDefault
short_idYesThe short ID of the Social QR code to update.
facebookNoFacebook URL.
instagramNoInstagram URL.
twitterNoTwitter/X URL.
linkedinNoLinkedIn URL.
youtubeNoYouTube URL.
tiktokNoTikTok URL.
githubNoGitHub URL.
websiteNoWebsite URL.
labelNoUpdate the label.

Implementation Reference

  • 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 });
    },
  • 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."),
    }),
  • 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 });
      },
    },
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It successfully explains the merge/partial-update behavior (non-destructive), but omits other critical behavioral traits such as authentication requirements, validation rules for URLs, idempotency guarantees, or error conditions.

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 with zero waste. The first sentence front-loads the core purpose (update social media links), and the second adds the essential behavioral constraint (partial/merge). Every word earns its place.

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

Completeness3/5

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

For a 10-parameter update tool with no output schema or annotations, the description covers the primary operation and merge behavior adequately. However, it lacks information about return values, success/failure indicators, or validation constraints that would help an agent handle the response correctly.

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?

While the schema has 100% coverage documenting each social platform field, the description adds crucial semantic context: 'Partial updates merge with existing data.' This explains how the optional parameters interact (subset updates don't clear unspecified fields), which is not obvious from the schema alone. Baseline 3 with +1 for merge semantics.

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

Purpose4/5

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

The description clearly states the tool updates 'social media links of a Social QR code,' specifying both the action (update) and resource. It distinguishes from siblings like create_social_qr and update_wifi_qr by explicitly naming the Social QR type. To reach 5, it would need explicit differentiation from bulk_update_qr_codes or update_qr_destination.

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

Usage Guidelines3/5

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

The description provides implied usage guidance through 'Partial updates merge with existing data,' informing the agent that incomplete payloads are acceptable. However, it lacks explicit when-to-use guidance versus alternatives like bulk_update_qr_codes or when to prefer this over creating a new code.

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