Skip to main content
Glama
benswel

QR for Agent

delete_qr_code

Permanently delete a QR code and all its scan analytics from the QR for Agent platform. The short URL stops working immediately and this action cannot be undone.

Instructions

Permanently delete a QR code and all its scan analytics. The short URL will stop working immediately. This cannot be undone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
short_idYesThe short ID of the QR code to delete.

Implementation Reference

  • The business logic for deleting a QR code from the database.
    export function deleteQrCode(shortId: string, apiKeyId: number): boolean {
      const existing = db
        .select()
        .from(qrCodes)
        .where(and(eq(qrCodes.shortId, shortId), eq(qrCodes.apiKeyId, apiKeyId)))
        .get();
    
      if (!existing) return false;
    
      db.delete(qrCodes).where(eq(qrCodes.shortId, shortId)).run();
      return true;
    }
  • The MCP tool definition for delete_qr_code, which calls the corresponding API endpoint.
    delete_qr_code: {
      description:
        "Permanently delete a QR code and all its scan analytics. The short URL will stop working immediately. This cannot be undone.",
      inputSchema: z.object({
        short_id: z.string().describe("The short ID of the QR code to delete."),
      }),
      handler: async (input: { short_id: string }) => {
        return apiRequest(`/api/qr/${input.short_id}`, { method: "DELETE" });
      },
    },
Behavior5/5

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

With no annotations provided, the description carries full burden and excels by disclosing: the destructive nature ('Permanently delete'), scope of data loss ('all its scan analytics'), immediate side effects ('short URL will stop working immediately'), and irreversibility ('cannot be undone').

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?

Three sentences with zero waste: action statement, operational side effect, and irreversibility warning. Information is front-loaded and every clause earns its place.

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

Completeness5/5

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

For a single-parameter destructive tool with no output schema and 100% parameter coverage, the description is complete. It adequately covers the operation's purpose, consequences, and irreversible nature without needing to describe return values.

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?

With 100% schema description coverage, the baseline is 3. The description implicitly links 'short URL' to the 'short_id' parameter but does not add syntax details, examples, or constraints beyond what the schema already provides.

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 states the specific action ('Permanently delete'), the resource ('QR code and all its scan analytics'), and distinguishes from sibling bulk_delete_qr_codes through the singular resource reference and the permanence qualifier.

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?

While it does not explicitly name alternatives like bulk_delete_qr_codes, it provides critical usage context through the warning 'This cannot be undone,' which is essential guidance for a destructive operation. It lacks only explicit when-to-use comparisons.

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