Skip to main content
Glama

extend_qurl

Extend the expiration time of an active qURL by providing a resource ID or qURL display ID and a duration (e.g., '24h', '7d').

Instructions

Extend the expiration of an active qURL. Accepts a resource ID (r_) or qURL display ID (q_). Shorthand for update_qurl with only extend_by — use update_qurl for richer updates (tags, description, expiration).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resource_idYesThe resource ID (r_ prefix) or qURL display ID (q_ prefix) to extend. If a q_ ID is passed, the API resolves it to the parent resource automatically.
extend_byYesDuration to extend by (e.g., "24h", "7d")

Implementation Reference

  • The extendQurlTool factory returns the tool definition including the 'extend_qurl' handler function. The handler calls client.extendQURL with the resource_id and extend_by input, then returns the result as JSON text content.
    export function extendQurlTool(client: IQURLClient) {
      return {
        name: "extend_qurl",
        description:
          "Extend the expiration of an active qURL. Accepts a resource ID (r_) or qURL display ID (q_). " +
          "Shorthand for update_qurl with only extend_by — use update_qurl for richer updates (tags, description, expiration).",
        inputSchema: extendQurlSchema,
        handler: async (input: z.infer<typeof extendQurlSchema>) => {
          const result = await client.extendQURL(input.resource_id, {
            extend_by: input.extend_by,
          });
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(result.data),
              },
            ],
          };
        },
      };
    }
  • The extendQurlSchema defines the input schema with a resource_id (validated via resourceIdSchema) and extend_by (a non-empty string describing the duration to extend by, e.g. '24h').
    export const extendQurlSchema = z.object({
      resource_id: resourceIdSchema("extend"),
      extend_by: z.string().min(1).describe('Duration to extend by (e.g., "24h", "7d")'),
    });
  • src/server.ts:32-73 (registration)
    The extend_qurl tool is registered in createServer() via the ToolFactory pattern - extendQurlTool is listed in the toolFactories array (line 45) and registered with server.tool() in the loop at lines 51-54.
    export function createServer(client: IQURLClient, version: string): McpServer {
      const server = new McpServer({
        name: "qurl",
        version,
      });
    
      // Register tools
      const toolFactories = [
        createQurlTool,
        resolveQurlTool,
        listQurlsTool,
        getQurlTool,
        deleteQurlTool,
        extendQurlTool,
        updateQurlTool,
        mintLinkTool,
        batchCreateTool,
      ] satisfies ToolFactory[];
    
      for (const factory of toolFactories) {
        const tool = factory(client);
        server.tool(tool.name, tool.description, tool.inputSchema.shape, tool.handler);
      }
    
      // Register resources
      for (const factory of [linksResource, usageResource]) {
        const resource = factory(client);
        server.resource(resource.name, resource.uri, resource.handler);
      }
    
      // Register prompts
      const secure = secureAServicePrompt();
      server.prompt(secure.name, secure.description, secure.args, secure.handler);
    
      const audit = auditLinksPrompt();
      server.prompt(audit.name, audit.description, audit.handler);
    
      const rotate = rotateAccessPrompt();
      server.prompt(rotate.name, rotate.description, rotate.args, rotate.handler);
    
      return server;
    }
  • The client.extendQURL method on the QURLClient class delegates to updateQURL (PATCH request), since ExtendQURLInput is a strict subset of UpdateQURLInput (just extend_by).
    async extendQURL(id: string, input: ExtendQURLInput): Promise<{ data: QURL }> {
      // ExtendQURLInput is a strict subset of UpdateQURLInput (just extend_by),
      // so we delegate to updateQURL rather than duplicating the PATCH call.
      return this.updateQURL(id, input);
    }
  • The ExtendQURLInput interface defines the shape for the extend operation - just a single required 'extend_by' string field.
    export interface ExtendQURLInput {
      extend_by: string;
    }
Behavior4/5

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

Discloses automatic resolution of q_ IDs to parent resource, and implies mutation by extending expiration. No annotations exist, so the description carries full burden. It does not mention error handling or if the qURL must be active beyond the word 'active'.

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, front-loaded with purpose, no redundant or vague phrasing. Every word adds value.

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 no output schema and simple parameters, the description covers the main behavior and alternatives. Could mention potential error conditions or constraints (e.g., max extension), but overall adequate.

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 coverage is 100% and schema descriptions are thorough. The description adds minimal new information beyond paraphrasing the schema (e.g., 'resource ID (r_) or qURL display ID (q_)'). Baseline 3 is appropriate.

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 'extend' and the resource 'expiration of an active qURL', and distinguishes itself from the sibling tool update_qurl by positioning as a shorthand for simpler updates.

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

Usage Guidelines5/5

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

Explicitly advises when to use this tool versus update_qurl: 'Shorthand for update_qurl with only extend_by — use update_qurl for richer updates.' This provides clear usage guidance.

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/layervai/qurl-mcp'

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