resolve_qurl
Resolve a qURL access token to retrieve the target URL and temporarily open firewall access for your IP.
Instructions
Resolve a qURL access token to get the target URL and open firewall access. After resolution, the target URL is accessible from your IP for the duration specified in access_grant.expires_in seconds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| access_token | Yes | The access token from a qURL link (e.g., at_k8xqp9h2sj9lx7r4a) |
Implementation Reference
- src/tools/resolve-qurl.ts:11-31 (handler)The factory function that creates the resolve_qurl tool, including its handler that calls client.resolveQURL() and formats the response.
export function resolveQurlTool(client: IQURLClient) { return { name: "resolve_qurl", description: "Resolve a qURL access token to get the target URL and open firewall access. " + "After resolution, the target URL is accessible from your IP for the duration " + "specified in access_grant.expires_in seconds.", inputSchema: resolveQurlSchema, handler: async (input: z.infer<typeof resolveQurlSchema>) => { const result = await client.resolveQURL(input); return { content: [ { type: "text" as const, text: JSON.stringify(result.data), }, ], }; }, }; } - src/tools/resolve-qurl.ts:4-9 (schema)Zod schema for the resolve_qurl tool input, requiring a non-empty 'access_token' string.
export const resolveQurlSchema = z.object({ access_token: z .string() .min(1) .describe("The access token from a qURL link (e.g., at_k8xqp9h2sj9lx7r4a)"), }); - src/client.ts:141-149 (schema)TypeScript interface for ResolveOutput returned by the API call.
export interface ResolveOutput { target_url: string; resource_id: string; access_grant: { expires_in: number; granted_at: string; src_ip: string; }; } - src/client.ts:111-113 (schema)TypeScript interface for ResolveInput (client-side type definition).
export interface ResolveInput { access_token: string; } - src/server.ts:39-54 (registration)Tool registration: resolveQurlTool is included in the toolFactories array and registered via server.tool() in the loop.
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); }