delete_qurl
Revoke a qURL by providing its resource ID to immediately invalidate the link and prevent further access.
Instructions
Revoke/delete a qURL. This immediately invalidates the link.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| resource_id | Yes | The resource ID (must start with r_). delete_qurl does not accept q_ (qURL display) IDs. |
Implementation Reference
- src/tools/delete-qurl.ts:18-35 (handler)The deleteQurlTool factory returns the MCP tool definition including the handler function that calls client.deleteQURL and returns a text confirmation message.
export function deleteQurlTool(client: IQURLClient) { return { name: "delete_qurl", description: "Revoke/delete a qURL. This immediately invalidates the link.", inputSchema: deleteQurlSchema, handler: async (input: z.infer<typeof deleteQurlSchema>) => { await client.deleteQURL(input.resource_id); return { content: [ { type: "text" as const, text: `qURL ${input.resource_id} has been revoked.`, }, ], }; }, }; } - src/tools/delete-qurl.ts:4-16 (schema)Zod schema ('deleteQurlSchema') validating the 'resource_id' input — requires a non-empty string starting with 'r_' (rejects q_ prefixes).
export const deleteQurlSchema = z.object({ // DELETE only accepts r_ (resource) IDs per the API spec — unlike // get/update/extend/mint_link which also accept q_ prefixes. Reject // non-r_ IDs at the schema boundary so agents get a clear error // instead of a confusing API-side rejection. resource_id: z .string() .min(1) .startsWith("r_", "delete_qurl only accepts resource IDs (r_ prefix). Use update_qurl or mint_link for q_ IDs.") .describe( "The resource ID (must start with r_). delete_qurl does not accept q_ (qURL display) IDs.", ), }); - src/server.ts:38-54 (registration)Registration: deleteQurlTool is imported, included in the toolFactories array (line 44), and registered via server.tool() in the loop at lines 51-54.
// 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); } - src/client.ts:351-353 (helper)Client helper method deleteQURL that sends a DELETE HTTP request to /v1/qurls/{id}.
async deleteQURL(id: string): Promise<void> { await this.request("DELETE", this.qurlPath(id)); }