Skip to main content
Glama
benswel

QR for Agent

set_custom_domain

Configure a custom domain for QR code short URLs to replace default links with branded ones. Requires Pro plan and DNS CNAME setup.

Instructions

Set a custom domain for your QR code short URLs (Pro plan required). When set, all new QR codes will use https://your-domain.com/r/... instead of the default URL. You must configure DNS (CNAME) to point to the QR Agent server. Pass domain=null to remove the custom domain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesYour custom domain without protocol (e.g. 'qr.mybrand.com'). Pass null to remove.

Implementation Reference

  • Tool definition and handler for 'set_custom_domain' within the MCP tool package. The handler makes a request to the /api/domain endpoint.
    set_custom_domain: {
      description:
        "Set a custom domain for your QR code short URLs (Pro plan required). When set, all new QR codes will use https://your-domain.com/r/... instead of the default URL. You must configure DNS (CNAME) to point to the QR Agent server. Pass domain=null to remove the custom domain.",
      inputSchema: z.object({
        domain: z
          .string()
          .nullable()
          .describe(
            "Your custom domain without protocol (e.g. 'qr.mybrand.com'). Pass null to remove."
          ),
      }),
      handler: async (input: { domain: string | null }) => {
        if (input.domain === null) {
          return apiRequest("/api/domain", { method: "DELETE" });
        }
        return apiRequest("/api/domain", {
          method: "PUT",
          body: { domain: input.domain },
        });
      },
    },
Behavior4/5

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

With no annotations provided, the description effectively discloses key behavioral traits: the Pro plan requirement, that it only affects 'new QR codes' (not existing ones), the mandatory DNS CNAME configuration, and the null-parameter removal mechanism. It could clarify what happens if DNS is misconfigured.

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?

Four sentences with zero waste: purpose (sentence 1), behavioral effect (sentence 2), prerequisite (sentence 3), and removal instructions (sentence 4). Information is front-loaded and logically ordered.

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?

For a single-parameter configuration tool with no output schema, the description comprehensively covers the domain setup workflow, plan restrictions, and external DNS requirements. Minor gap: it does not explicitly confirm whether existing QR codes retain old URLs or migrate.

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?

Schema description coverage is 100%, documenting the domain format and null option. The description reinforces the null removal pattern but does not add significant semantic meaning beyond what the schema already provides, meeting the baseline for high-coverage schemas.

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 opens with a specific verb ('Set') and clear resource ('custom domain for your QR code short URLs'), immediately distinguishing it from the sibling 'get_custom_domain'. It further differentiates by noting the 'Pro plan required' constraint.

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?

Clearly states the prerequisite ('Pro plan required') and includes explicit instructions for removal ('Pass domain=null to remove'). However, it does not explicitly reference the sibling 'get_custom_domain' for checking current settings before updating.

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