Skip to main content
Glama
benswel

QR for Agent

update_wifi_qr

Modify WiFi network credentials in existing QR codes to update SSID, password, encryption, or visibility settings without creating new images.

Instructions

Update the WiFi credentials of a WiFi QR code. Only works on QR codes created with type='wifi'. Note: updating WiFi data changes the QR image content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
short_idYesThe short ID of the WiFi QR code to update.
ssidNoWiFi network name.
passwordNoWiFi password.
encryptionNoEncryption type.
hiddenNoWhether the network is hidden.
labelNoUpdate the label.

Implementation Reference

  • The handler function for 'update_wifi_qr' which constructs the PATCH request for the API.
    handler: async (input: Record<string, unknown>) => {
      const { short_id, label, ...wifiFields } = input;
      const body: Record<string, unknown> = { wifi_data: wifiFields };
      if (label !== undefined) body.label = label;
      return apiRequest(`/api/qr/${short_id}`, { method: "PATCH", body });
    },
  • The input schema validation for the 'update_wifi_qr' tool.
    inputSchema: z.object({
      short_id: z.string().describe("The short ID of the WiFi QR code to update."),
      ssid: z.string().optional().describe("WiFi network name."),
      password: z.string().optional().describe("WiFi password."),
      encryption: z.enum(["WPA", "WEP", "nopass"]).optional().describe("Encryption type."),
      hidden: z.boolean().optional().describe("Whether the network is hidden."),
      label: z.string().optional().describe("Update the label."),
    }),
Behavior3/5

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

With no annotations provided, the description carries the burden of behavioral disclosure and adds valuable context that 'updating WiFi data changes the QR image content'. However, it lacks other important behavioral details such as permission requirements, whether changes are reversible, or what the tool returns upon success.

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?

The description consists of three efficient sentences that are front-loaded with the core action and contain no redundant information. Each sentence earns its place: the first defines the action, the second provides the critical type constraint, and the third discloses the image content side effect.

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?

While the description adequately covers the tool's purpose and constraints for a 6-parameter tool with complete schema documentation, it lacks information about the return value or output format since no output schema is provided. For a mutation operation without annotations, additional context about the response structure would improve completeness.

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

Parameters3/5

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

The input schema has 100% description coverage, documenting all six parameters including the enum values for encryption. The description implies the credential parameters through 'WiFi credentials' but does not add semantic meaning beyond what the schema already provides, meeting the baseline for high schema coverage.

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 'Update the WiFi credentials of a WiFi QR code' provides a specific verb and resource. The constraint 'Only works on QR codes created with type='wifi'' clearly distinguishes this from sibling update tools like `update_vcard_qr` or `update_app_store_qr`.

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?

The description explicitly states the constraint that it 'Only works on QR codes created with type='wifi'', providing clear exclusion criteria. However, it does not explicitly name alternative tools (such as `create_wifi_qr` for new codes or other `update_*` tools for different QR types) that should be used instead when this constraint isn't met.

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